Skip to content

Commit 66afd6c

Browse files
committed
use ObGlobal control version
1 parent c743157 commit 66afd6c

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

src/main/java/com/alipay/oceanbase/hbase/OHTable.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.alipay.oceanbase.hbase.filter.HBaseFilterUtils;
2424
import com.alipay.oceanbase.hbase.result.ClientStreamScanner;
2525
import com.alipay.oceanbase.hbase.util.*;
26+
import com.alipay.oceanbase.rpc.ObGlobal;
2627
import com.alipay.oceanbase.rpc.ObTableClient;
2728
import com.alipay.oceanbase.rpc.exception.ObTableException;
2829
import com.alipay.oceanbase.rpc.location.model.partition.Partition;
@@ -49,6 +50,7 @@
4950
import com.google.protobuf.Message;
5051
import com.google.protobuf.Service;
5152
import com.google.protobuf.ServiceException;
53+
import jdk.nashorn.internal.objects.Global;
5254
import org.apache.hadoop.classification.InterfaceAudience;
5355
import org.apache.hadoop.conf.Configuration;
5456
import org.apache.hadoop.hbase.*;
@@ -465,7 +467,7 @@ public boolean exists(Get get) throws IOException {
465467
@Override
466468
public boolean[] existsAll(List<Get> gets) throws IOException {
467469
boolean[] ret = new boolean[gets.size()];
468-
if (CompatibilityUtil.isBatchSupport()) {
470+
if (ObGlobal.isHBaseBatchGetSupport()) {
469471
Result[] results = new Result[gets.size()];
470472
batch(gets, results);
471473
for (int i = 0; i < gets.size(); ++i) {
@@ -644,7 +646,7 @@ public void batch(final List<? extends Row> actions, final Object[] results) thr
644646
BatchError batchError = new BatchError();
645647
obTableClient.setRuntimeBatchExecutor(executePool);
646648
List<Integer> resultMapSingleOp = new LinkedList<>();
647-
if (!CompatibilityUtil.isBatchSupport()) {
649+
if (!ObGlobal.isHBaseBatchGetSupport()) {
648650
try {
649651
compatOldServerBatch(actions, results, batchError);
650652
} catch (Exception e) {
@@ -934,7 +936,7 @@ public Result call() throws IOException {
934936
@Override
935937
public Result[] get(List<Get> gets) throws IOException {
936938
Result[] results = new Result[gets.size()];
937-
if (CompatibilityUtil.isBatchSupport()) { // get only supported in BatchSupport version
939+
if (ObGlobal.isHBaseBatchGetSupport()) { // get only supported in BatchSupport version
938940
batch(gets, results);
939941
} else {
940942
List<Future<Result>> futures = new LinkedList<>();

src/main/java/com/alipay/oceanbase/hbase/util/CompatibilityUtil.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)