Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
aace87c
add single conlumn family put test (#158)
WeiXinChan Feb 21, 2025
2303237
Secondary part tests (#159)
WeiXinChan Feb 25, 2025
278b82c
update tests (#160)
WeiXinChan Feb 28, 2025
61c1e97
fix batch get route bug (#162)
WeiXinChan Mar 5, 2025
8201c3a
add single cf scan test (#163)
WeiXinChan Mar 5, 2025
d3e8e8a
finish connection function
stuBirdFly Mar 10, 2025
5458d78
add table template manager for hbase (#164)
maochongxin Mar 10, 2025
430b00a
open distributed execute before tests
WeiXinChan Mar 11, 2025
09e45da
fix test
WeiXinChan Mar 11, 2025
da2c08d
Merge pull request #166 from WeiXinChan/tmp11
WeiXinChan Mar 11, 2025
8e9eb45
add append、increment and checkAndMutate test case
stuBirdFly Mar 13, 2025
4cecf68
query and mutate delete
maochongxin Mar 2, 2025
e915dfe
header
maochongxin Mar 13, 2025
a9f3c43
fix review
maochongxin Mar 14, 2025
2769ef4
[Test] add hbase get test cases for secondary part
shenyunlong Mar 14, 2025
67aea58
[Fix] fix review
shenyunlong Mar 14, 2025
cadb2eb
change partition defination
WeiXinChan Mar 14, 2025
362590b
put test case
maochongxin Mar 14, 2025
659a7af
add batch test case
GroundWu Mar 18, 2025
5a9f0e8
Revert "add batch test case"
GroundWu Mar 18, 2025
473b35a
add batch test case
GroundWu Mar 18, 2025
535fe65
code format
GroundWu Mar 18, 2025
0cad695
[Test] add test cases for hbase scan and ttl in secondary partition s…
shenyunlong Mar 18, 2025
1698da5
add cell ttl test
stuBirdFly Mar 18, 2025
059ff37
fix unstable case
maochongxin Mar 19, 2025
418551d
fix del case
maochongxin Mar 19, 2025
7eaf7fb
[Test] add hbase rowkey TTL test cases for seconary partition scenari…
shenyunlong Mar 20, 2025
58f85cc
fix del 4007
maochongxin Mar 22, 2025
a5d33eb
fix case stability
maochongxin Mar 25, 2025
075be67
[Test] add testcases for hbase timeseries model get/scan
shenyunlong Mar 26, 2025
566c9a9
[Test] improve test cases stablility
shenyunlong Mar 26, 2025
3336857
add hbase abnormal test case
stuBirdFly Mar 26, 2025
855211c
revert table client manager
maochongxin Mar 27, 2025
39d2388
add hbase batch test
GroundWu Mar 28, 2025
d77526a
add K Q T to scan range column
maochongxin Mar 31, 2025
a616f2a
fix
maochongxin Mar 31, 2025
cff129c
[Fix] hbase multi partition scan return repetitive data
shenyunlong Apr 1, 2025
216d65f
check not support cases
maochongxin Apr 1, 2025
cc9c1ff
always add scan range columns
maochongxin Apr 2, 2025
74e8ca7
fix merge secondary_part conflict
stuBirdFly Apr 10, 2025
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
218 changes: 185 additions & 33 deletions src/main/java/com/alipay/oceanbase/hbase/OHTable.java

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions src/test/java/com/alipay/oceanbase/hbase/HTableTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -2219,7 +2219,7 @@ public void testColumnValueFilter() throws Exception {
scan.addFamily(family.getBytes());
scan.setMaxVersions(10);
filter = new ColumnValueFilter(Bytes.toBytes(family), Bytes.toBytes(column2),
CompareOperator.GREATER, Bytes.toBytes(value1));
CompareOperator.LESS, Bytes.toBytes(value1));
scan.setFilter(filter);
scanner = hTable.getScanner(scan);

Expand Down Expand Up @@ -2890,7 +2890,7 @@ public void testGetFilter() throws Exception {
get = new Get(toBytes(key1));
get.setMaxVersions(10);
get.addFamily(toBytes(family));
valueFilter = new ValueFilter(CompareFilter.CompareOp.GREATER, new BinaryComparator(
valueFilter = new ValueFilter(CompareFilter.CompareOp.LESS, new BinaryComparator(
toBytes(value1)));
get.setFilter(valueFilter);
r = hTable.get(get);
Expand All @@ -2908,7 +2908,7 @@ public void testGetFilter() throws Exception {
get = new Get(toBytes(key1));
get.setMaxVersions(10);
get.addFamily(toBytes(family));
valueFilter = new ValueFilter(CompareFilter.CompareOp.GREATER, new BinaryComparator(
valueFilter = new ValueFilter(CompareFilter.CompareOp.LESS, new BinaryComparator(
toBytes(value3)));
get.setFilter(valueFilter);
r = hTable.get(get);
Expand Down Expand Up @@ -2948,7 +2948,7 @@ public void testGetFilter() throws Exception {
get = new Get(toBytes(key1));
get.setMaxVersions(10);
get.addFamily(toBytes(family));
qualifierFilter = new QualifierFilter(CompareFilter.CompareOp.GREATER,
qualifierFilter = new QualifierFilter(CompareFilter.CompareOp.LESS,
new BinaryComparator(toBytes(column1)));
get.setFilter(qualifierFilter);
r = hTable.get(get);
Expand Down Expand Up @@ -3073,7 +3073,7 @@ public void testGetFilter() throws Exception {

filterList = new FilterList();
filterList.addFilter(new ColumnCountGetFilter(1));
filterList.addFilter(new QualifierFilter(CompareFilter.CompareOp.GREATER,
filterList.addFilter(new QualifierFilter(CompareFilter.CompareOp.LESS,
new BinaryComparator(toBytes(column2))));
get = new Get(toBytes(key1));
get.setMaxVersions(10);
Expand Down Expand Up @@ -3274,7 +3274,7 @@ public void testGetFilter() throws Exception {
Assert.assertEquals(7, r.rawCells().length);

singleColumnValueFilter = new SingleColumnValueFilter(Bytes.toBytes(family),
Bytes.toBytes(column2), CompareFilter.CompareOp.GREATER, new BinaryComparator(
Bytes.toBytes(column2), CompareFilter.CompareOp.LESS, new BinaryComparator(
toBytes(value2)));
singleColumnValueFilter.setLatestVersionOnly(false);
get = new Get(toBytes(key1));
Expand Down Expand Up @@ -5014,16 +5014,16 @@ public void testCheckAndPut() throws IOException, InterruptedException {
Assert.assertTrue(ret);

ret = hTable.checkAndPut(key.getBytes(), "family1".getBytes(), column.getBytes(),
CompareFilter.CompareOp.GREATER, "value1".getBytes(), put);
CompareFilter.CompareOp.LESS, "value1".getBytes(), put);
Assert.assertFalse(ret);
ret = hTable.checkAndPut(key.getBytes(), "family1".getBytes(), column.getBytes(),
CompareFilter.CompareOp.GREATER_OR_EQUAL, "value1".getBytes(), put);
CompareFilter.CompareOp.LESS_OR_EQUAL, "value1".getBytes(), put);
Assert.assertTrue(ret);
ret = hTable.checkAndPut(key.getBytes(), "family1".getBytes(), column.getBytes(),
CompareFilter.CompareOp.LESS, "".getBytes(), put);
CompareFilter.CompareOp.GREATER, "".getBytes(), put);
Assert.assertFalse(ret);
ret = hTable.checkAndPut(key.getBytes(), "family1".getBytes(), column.getBytes(),
CompareFilter.CompareOp.LESS_OR_EQUAL, "".getBytes(), put);
CompareFilter.CompareOp.GREATER_OR_EQUAL, "".getBytes(), put);
Assert.assertFalse(ret);

get = new Get(key.getBytes());
Expand Down Expand Up @@ -5061,16 +5061,16 @@ public void testCheckAndPut() throws IOException, InterruptedException {
});

ret = builder.qualifier(toBytes(column))
.ifMatches(CompareOperator.GREATER, toBytes("value1")).thenPut(put);
.ifMatches(CompareOperator.LESS, toBytes("value1")).thenPut(put);
Assert.assertFalse(ret);
ret = builder.qualifier(toBytes(column))
.ifMatches(CompareOperator.GREATER_OR_EQUAL, toBytes("value1")).thenPut(put);
.ifMatches(CompareOperator.LESS_OR_EQUAL, toBytes("value1")).thenPut(put);
Assert.assertTrue(ret);
ret = builder.qualifier(toBytes(column)).ifMatches(CompareOperator.LESS, toBytes(""))
ret = builder.qualifier(toBytes(column)).ifMatches(CompareOperator.GREATER, toBytes(""))
.thenPut(put);
Assert.assertFalse(ret);
ret = builder.qualifier(toBytes(column))
.ifMatches(CompareOperator.LESS_OR_EQUAL, toBytes("")).thenPut(put);
.ifMatches(CompareOperator.GREATER_OR_EQUAL, toBytes("")).thenPut(put);
Assert.assertFalse(ret);

get = new Get(key.getBytes());
Expand Down Expand Up @@ -5121,22 +5121,22 @@ public void testCheckAndDelete() throws IOException {
put.addColumn(family.getBytes(), column.getBytes(), "value6".getBytes());
hTable.put(put);
ret = hTable.checkAndDelete(key.getBytes(), "family1".getBytes(), column.getBytes(),
CompareFilter.CompareOp.GREATER, "value5".getBytes(), delete);
CompareFilter.CompareOp.LESS, "value5".getBytes(), delete);
Assert.assertTrue(ret);
put = new Put(key.getBytes());
put.addColumn(family.getBytes(), column.getBytes(), "value5".getBytes());
hTable.put(put);
ret = hTable.checkAndDelete(key.getBytes(), "family1".getBytes(), column.getBytes(),
CompareFilter.CompareOp.GREATER_OR_EQUAL, "value5".getBytes(), delete);
CompareFilter.CompareOp.LESS_OR_EQUAL, "value5".getBytes(), delete);
Assert.assertTrue(ret);
put = new Put(key.getBytes());
put.addColumn(family.getBytes(), column.getBytes(), "value1".getBytes());
hTable.put(put);
ret = hTable.checkAndDelete(key.getBytes(), "family1".getBytes(), column.getBytes(),
CompareFilter.CompareOp.LESS, "value1".getBytes(), delete);
CompareFilter.CompareOp.GREATER, "value1".getBytes(), delete);
Assert.assertFalse(ret);
ret = hTable.checkAndDelete(key.getBytes(), "family1".getBytes(), column.getBytes(),
CompareFilter.CompareOp.LESS_OR_EQUAL, "value1".getBytes(), delete);
CompareFilter.CompareOp.GREATER_OR_EQUAL, "value1".getBytes(), delete);
Assert.assertTrue(ret);

Get get = new Get(key.getBytes());
Expand Down Expand Up @@ -5209,22 +5209,22 @@ public void testCheckAndDelete() throws IOException {
put.addColumn(family.getBytes(), column.getBytes(), "value6".getBytes());
hTable.put(put);
ret = builder.qualifier(toBytes(column))
.ifMatches(CompareOperator.GREATER, toBytes("value5")).thenDelete(delete);
.ifMatches(CompareOperator.LESS, toBytes("value5")).thenDelete(delete);
Assert.assertTrue(ret);
put = new Put(key.getBytes());
put.addColumn(family.getBytes(), column.getBytes(), "value5".getBytes());
hTable.put(put);
ret = builder.qualifier(toBytes(column))
.ifMatches(CompareOperator.GREATER_OR_EQUAL, toBytes("value5")).thenDelete(delete);
.ifMatches(CompareOperator.LESS_OR_EQUAL, toBytes("value5")).thenDelete(delete);
Assert.assertTrue(ret);
put = new Put(key.getBytes());
put.addColumn(family.getBytes(), column.getBytes(), "value1".getBytes());
hTable.put(put);
ret = builder.qualifier(toBytes(column)).ifMatches(CompareOperator.LESS, toBytes("value1"))
ret = builder.qualifier(toBytes(column)).ifMatches(CompareOperator.GREATER, toBytes("value1"))
.thenDelete(delete);
Assert.assertFalse(ret);
ret = builder.qualifier(toBytes(column))
.ifMatches(CompareOperator.LESS_OR_EQUAL, toBytes("value1")).thenDelete(delete);
.ifMatches(CompareOperator.GREATER_OR_EQUAL, toBytes("value1")).thenDelete(delete);
Assert.assertTrue(ret);

get = new Get(key.getBytes());
Expand Down Expand Up @@ -5349,9 +5349,9 @@ public void testCheckAndMutate() throws IOException {
rowMutations.add(put1);
rowMutations.add(put2);
rowMutations.add(put3);
// test greater op
// test GREATER op
ret = hTable.checkAndMutate(key.getBytes(), family.getBytes(), column1.getBytes(),
CompareFilter.CompareOp.LESS, value1.getBytes(), rowMutations);
CompareFilter.CompareOp.GREATER, value1.getBytes(), rowMutations);
Assert.assertFalse(ret);
get = new Get(key.getBytes());
get.addFamily(family.getBytes());
Expand All @@ -5361,7 +5361,7 @@ public void testCheckAndMutate() throws IOException {

// test less op
ret = hTable.checkAndMutate(key.getBytes(), family.getBytes(), column1.getBytes(),
CompareFilter.CompareOp.LESS, value2.getBytes(), rowMutations);
CompareFilter.CompareOp.GREATER, value2.getBytes(), rowMutations);
Assert.assertTrue(ret);
get = new Get(key.getBytes());
get.addFamily(family.getBytes());
Expand Down Expand Up @@ -5487,7 +5487,7 @@ public void testCheckAndMutate() throws IOException {
rowMutations.add(put1);
rowMutations.add(put2);
rowMutations.add(put3);
// test greater op
// test LESS op
ret = builder.qualifier(toBytes(column1)).ifMatches(CompareOperator.LESS, toBytes(value1))
.thenMutate(rowMutations);
Assert.assertFalse(ret);
Expand All @@ -5498,7 +5498,7 @@ public void testCheckAndMutate() throws IOException {
Assert.assertEquals(6, r.rawCells().length);

// test less op
ret = builder.qualifier(toBytes(column1)).ifMatches(CompareOperator.LESS, toBytes(value2))
ret = builder.qualifier(toBytes(column1)).ifMatches(CompareOperator.GREATER, toBytes(value2))
.thenMutate(rowMutations);
Assert.assertTrue(ret);
get = new Get(key.getBytes());
Expand Down
Loading