|
23 | 23 | import com.alipay.oceanbase.hbase.filter.HBaseFilterUtils;
|
24 | 24 | import com.alipay.oceanbase.hbase.result.ClientStreamScanner;
|
25 | 25 | import com.alipay.oceanbase.hbase.util.*;
|
| 26 | +import com.alipay.oceanbase.rpc.ObGlobal; |
26 | 27 | import com.alipay.oceanbase.rpc.ObTableClient;
|
27 | 28 | import com.alipay.oceanbase.rpc.exception.ObTableException;
|
28 | 29 | import com.alipay.oceanbase.rpc.location.model.partition.Partition;
|
|
49 | 50 | import com.google.protobuf.Message;
|
50 | 51 | import com.google.protobuf.Service;
|
51 | 52 | import com.google.protobuf.ServiceException;
|
| 53 | +import jdk.nashorn.internal.objects.Global; |
52 | 54 | import org.apache.hadoop.classification.InterfaceAudience;
|
53 | 55 | import org.apache.hadoop.conf.Configuration;
|
54 | 56 | import org.apache.hadoop.hbase.*;
|
@@ -465,7 +467,7 @@ public boolean exists(Get get) throws IOException {
|
465 | 467 | @Override
|
466 | 468 | public boolean[] existsAll(List<Get> gets) throws IOException {
|
467 | 469 | boolean[] ret = new boolean[gets.size()];
|
468 |
| - if (CompatibilityUtil.isBatchSupport()) { |
| 470 | + if (ObGlobal.isHBaseBatchGetSupport()) { |
469 | 471 | Result[] results = new Result[gets.size()];
|
470 | 472 | batch(gets, results);
|
471 | 473 | for (int i = 0; i < gets.size(); ++i) {
|
@@ -644,7 +646,7 @@ public void batch(final List<? extends Row> actions, final Object[] results) thr
|
644 | 646 | BatchError batchError = new BatchError();
|
645 | 647 | obTableClient.setRuntimeBatchExecutor(executePool);
|
646 | 648 | List<Integer> resultMapSingleOp = new LinkedList<>();
|
647 |
| - if (!CompatibilityUtil.isBatchSupport()) { |
| 649 | + if (!ObGlobal.isHBaseBatchGetSupport()) { |
648 | 650 | try {
|
649 | 651 | compatOldServerBatch(actions, results, batchError);
|
650 | 652 | } catch (Exception e) {
|
@@ -934,7 +936,7 @@ public Result call() throws IOException {
|
934 | 936 | @Override
|
935 | 937 | public Result[] get(List<Get> gets) throws IOException {
|
936 | 938 | 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 |
938 | 940 | batch(gets, results);
|
939 | 941 | } else {
|
940 | 942 | List<Future<Result>> futures = new LinkedList<>();
|
|
0 commit comments