Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0293b45
range relevant filter (#80)
miyuan-ljr Oct 16, 2024
3c8c531
Range relevant filter (#79)
miyuan-ljr Oct 16, 2024
fe9da78
Namespace mapping to database in observer in one HBase client; set RP…
JackShi148 Oct 17, 2024
e8a6ce5
fuzzy (#81)
miyuan-ljr Oct 21, 2024
868f52b
DependentColumnFilter, singleColumnValueExcludeFilter and single cf s…
JackShi148 Oct 22, 2024
be654df
hbase support batch (#84)
stuBirdFly Oct 22, 2024
697c5d0
Add DeleteFamilyVersion function and corresponding test cases (#85)
JackShi148 Oct 23, 2024
3411491
hbase support batchCallBack (#86)
stuBirdFly Oct 23, 2024
71ff69d
add native hbase test (#90)
stuBirdFly Oct 28, 2024
8848394
BufferedMutator 1.3 batch (#88)
JackShi148 Oct 30, 2024
3520de0
Correct test case for the multi-cf bug (#100)
JackShi148 Oct 30, 2024
9776399
Optimize test case and add sql script for multi-namespace test (#101)
JackShi148 Oct 30, 2024
f1588f8
batch compat old server (#106)
stuBirdFly Nov 7, 2024
1d6548c
refine (#115)
miyuan-ljr Nov 15, 2024
972ac62
family filter (#83)
miyuan-ljr Nov 15, 2024
1c85fe3
fix encode (#111)
miyuan-ljr Nov 15, 2024
9334ea0
fix: Change single column family get operation to sync query (#96)
maochongxin Nov 4, 2024
548846f
[Fix] dependency conflict (#116)
shenyunlong Nov 15, 2024
96be169
[Chore] remove the use of sofa common log
shenyunlong Nov 19, 2024
855faca
add version control (#108)
miyuan-ljr Nov 21, 2024
8bc51ca
add test case (#125)
miyuan-ljr Nov 25, 2024
82fb109
Merge branch 'master' of github.com:oceanbase/obkv-hbase-client-java
stuBirdFly Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<project.build.sourceEncoding>${project.encoding}</project.build.sourceEncoding>
<project.encoding>UTF-8</project.encoding>
<slf4j.version>1.7.21</slf4j.version>
<table.client.version>1.2.14.1-SNAPSHOT</table.client.version>
<table.client.version>1.2.14.4-SNAPSHOT</table.client.version>
</properties>

<dependencyManagement>
Expand Down
686 changes: 466 additions & 220 deletions src/main/java/com/alipay/oceanbase/hbase/OHTable.java

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions src/main/java/com/alipay/oceanbase/hbase/OHTablePool.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

public class OHTablePool implements Closeable {

private String originTabelName = null;
private final PoolMap<String, HTableInterface> tables;
private final int maxSize;
private final PoolMap.PoolType poolType;
Expand Down Expand Up @@ -314,6 +315,9 @@ int getCurrentPoolSize(String tableName) {
* @param paramUrl the table root server http url
*/
public void setParamUrl(final String tableName, String paramUrl) {
if (originTabelName == null) {
originTabelName = tableName;
}
setTableAttribute(tableName, HBASE_OCEANBASE_PARAM_URL, Bytes.toBytes(paramUrl));
}

Expand All @@ -334,6 +338,9 @@ public String getParamUrl(final String tableName) {
* @param fullUserName the table login username
*/
public void setFullUserName(final String tableName, final String fullUserName) {
if (originTabelName == null) {
originTabelName = tableName;
}
setTableAttribute(tableName, HBASE_OCEANBASE_FULL_USER_NAME, Bytes.toBytes(fullUserName));
}

Expand All @@ -354,6 +361,9 @@ public String getFullUserName(final String tableName) {
* @param password the table login password
*/
public void setPassword(final String tableName, final String password) {
if (originTabelName == null) {
originTabelName = tableName;
}
setTableAttribute(tableName, HBASE_OCEANBASE_PASSWORD, Bytes.toBytes(password));
}

Expand All @@ -374,6 +384,9 @@ public String getPassword(final String tableName) {
* @param sysUserName the sys username
*/
public void setSysUserName(final String tableName, final String sysUserName) {
if (originTabelName == null) {
originTabelName = tableName;
}
setTableAttribute(tableName, HBASE_OCEANBASE_SYS_USER_NAME, Bytes.toBytes(sysUserName));
}

Expand All @@ -394,6 +407,9 @@ public String getSysUserName(final String tableName) {
* @param sysPassword the sys user password
*/
public void setSysPassword(final String tableName, final String sysPassword) {
if (originTabelName == null) {
originTabelName = tableName;
}
setTableAttribute(tableName, HBASE_OCEANBASE_SYS_PASSWORD, Bytes.toBytes(sysPassword));
}

Expand Down Expand Up @@ -481,6 +497,10 @@ public long getWriteBufferSize(String tableName) {
.toLong(attr);
}

public String getOriginTableName() {
return this.originTabelName;
}

/**
* Sets the operation timeout for the specified tables in this pool.
*
Expand Down Expand Up @@ -520,6 +540,9 @@ public int getOperationTimeout(String tableName) {
* @param odpAddr ODP address
*/
public void setOdpAddr(final String tableName, String odpAddr) {
if (originTabelName == null) {
originTabelName = tableName;
}
setTableAttribute(tableName, HBASE_OCEANBASE_ODP_ADDR, Bytes.toBytes(odpAddr));
}

Expand All @@ -545,6 +568,9 @@ public String getOdpAddr(String tableName) {
* @param odpPort ODP port
*/
public void setOdpPort(final String tableName, int odpPort) {
if (originTabelName == null) {
originTabelName = tableName;
}
setTableAttribute(tableName, HBASE_OCEANBASE_ODP_PORT, Bytes.toBytes(odpPort));
}

Expand All @@ -564,6 +590,9 @@ public int getOdpPort(String tableName) {
* @param odpMode ODP mode
*/
public void setOdpMode(final String tableName, boolean odpMode) {
if (originTabelName == null) {
originTabelName = tableName;
}
setTableAttribute(tableName, HBASE_OCEANBASE_ODP_MODE, Bytes.toBytes(odpMode));
}

Expand All @@ -583,6 +612,9 @@ public boolean getOdpMode(String tableName) {
* @param database ODP database name
*/
public void setDatabase(final String tableName, String database) {
if (originTabelName == null) {
originTabelName = tableName;
}
setTableAttribute(tableName, HBASE_OCEANBASE_DATABASE, Bytes.toBytes(database));
}

Expand Down Expand Up @@ -653,6 +685,9 @@ public Object getTableExtendAttribute(String tableName, String attributeName) {
}

public void setRuntimeBatchExecutor(String tableName, ExecutorService runtimeBatchExecutor) {
if (originTabelName == null) {
originTabelName = tableName;
}
setTableExtendAttribute(tableName, HBASE_OCEANBASE_BATCH_EXECUTOR, runtimeBatchExecutor);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,8 @@ public final class OHConstants {

public static final int MAX_KEYVALUE_SIZE_DEFAULT = -1;

public static final String SOCKET_TIMEOUT = "ipc.socket.timeout";

public static final int DEFAULT_SOCKET_TIMEOUT = 20000; // 20 seconds

}
Loading