org.apache.hadoop.hbase.client.Get.getReplicaId()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.apache.hadoop.hbase.client.Get.getReplicaId()方法的一些代码示例,展示了Get.getReplicaId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Get.getReplicaId()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Get
类名称:Get
方法名:getReplicaId

Get.getReplicaId介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

boolean isTargetReplicaSpecified = (get.getReplicaId() >= 0);
try {
 rl = getRegionLocations(true,
  (isTargetReplicaSpecified ? get.getReplicaId() : RegionReplicaUtil.DEFAULT_REPLICA_ID),
  cConnection, tableName, get.getRow());
} catch (RetriesExhaustedException | DoNotRetryIOException e) {
 addCallsForReplica(cs, rl, get.getReplicaId(), get.getReplicaId());
 endIndex = 1;
} else {

代码示例来源:origin: apache/hbase

this.setReplicaId(get.getReplicaId());
this.setConsistency(get.getConsistency());

代码示例来源:origin: apache/hbase

super.setReplicaId(get.getReplicaId());

代码示例来源:origin: apache/hbase

out.setTargetReplicaId(in.getReplicaId());
out.setCacheBlocks(in.getCacheBlocks());
out.setStoreLimit(in.getMaxResultsPerColumnFamily());

代码示例来源:origin: apache/hbase

assertEquals(get.getColumnFamilyTimeRange().get(Bytes.toBytes("cf")).getMax(),
    scan.getColumnFamilyTimeRange().get(Bytes.toBytes("cf")).getMax());
assertEquals(get.getReplicaId(), scan.getReplicaId());
assertEquals(get.getACL(), scan.getACL());
assertEquals(get.getAuthorizations().getLabels(), scan.getAuthorizations().getLabels());

代码示例来源:origin: apache/hbase

@Test
public void testConsistency() throws Exception {
 byte[] rowName = Bytes.toBytes("testConsistency");
 TGet tGet = new TGet(wrap(rowName));
 tGet.setConsistency(TConsistency.STRONG);
 Get get = getFromThrift(tGet);
 assertEquals(Consistency.STRONG, get.getConsistency());
 tGet.setConsistency(TConsistency.TIMELINE);
 tGet.setTargetReplicaId(1);
 get = getFromThrift(tGet);
 assertEquals(Consistency.TIMELINE, get.getConsistency());
 assertEquals(1, get.getReplicaId());
 TScan tScan = new TScan();
 tScan.setConsistency(TConsistency.STRONG);
 Scan scan = scanFromThrift(tScan);
 assertEquals(Consistency.STRONG, scan.getConsistency());
 tScan.setConsistency(TConsistency.TIMELINE);
 tScan.setTargetReplicaId(1);
 scan = scanFromThrift(tScan);
 assertEquals(Consistency.TIMELINE, scan.getConsistency());
 assertEquals(1, scan.getReplicaId());
 TResult tResult = new TResult();
 assertFalse(tResult.isSetStale());
 tResult.setStale(true);
 assertTrue(tResult.isSetStale());
}

代码示例来源:origin: apache/hbase

assertTrue(Bytes.equals(get.getACL(), copyGet.getACL()));
assertEquals(get.getConsistency(), copyGet.getConsistency());
assertEquals(get.getReplicaId(), copyGet.getReplicaId());
assertEquals(get.getIsolationLevel(), copyGet.getIsolationLevel());

代码示例来源:origin: org.apache.hbase/hbase-client

boolean isTargetReplicaSpecified = (get.getReplicaId() >= 0);
try {
 rl = getRegionLocations(true,
  (isTargetReplicaSpecified ? get.getReplicaId() : RegionReplicaUtil.DEFAULT_REPLICA_ID),
  cConnection, tableName, get.getRow());
} catch (RetriesExhaustedException | DoNotRetryIOException e) {
 addCallsForReplica(cs, rl, get.getReplicaId(), get.getReplicaId());
 endIndex = 1;
} else {

代码示例来源:origin: org.apache.hbase/hbase-client

this.setReplicaId(get.getReplicaId());
this.setConsistency(get.getConsistency());

代码示例来源:origin: org.apache.hbase/hbase-client

super.setReplicaId(get.getReplicaId());

代码示例来源:origin: org.apache.hbase/hbase-client

assertEquals(get.getColumnFamilyTimeRange().get(Bytes.toBytes("cf")).getMax(),
    scan.getColumnFamilyTimeRange().get(Bytes.toBytes("cf")).getMax());
assertEquals(get.getReplicaId(), scan.getReplicaId());
assertEquals(get.getACL(), scan.getACL());
assertEquals(get.getAuthorizations().getLabels(), scan.getAuthorizations().getLabels());

代码示例来源:origin: org.apache.hbase/hbase-client

assertTrue(Bytes.equals(get.getACL(), copyGet.getACL()));
assertEquals(get.getConsistency(), copyGet.getConsistency());
assertEquals(get.getReplicaId(), copyGet.getReplicaId());
assertEquals(get.getIsolationLevel(), copyGet.getIsolationLevel());

代码示例来源:origin: harbby/presto-connectors

boolean isTargetReplicaSpecified = (get.getReplicaId() >= 0);
RegionLocations rl = getRegionLocations(true, (isTargetReplicaSpecified ? get.getReplicaId()
  : RegionReplicaUtil.DEFAULT_REPLICA_ID), cConnection, tableName, get.getRow());
ResultBoundedCompletionService<Result> cs =
 addCallsForReplica(cs, rl, get.getReplicaId(), get.getReplicaId());
} else {
 addCallsForReplica(cs, rl, 0, 0);

代码示例来源:origin: harbby/presto-connectors

this.setReplicaId(get.getReplicaId());
this.setConsistency(get.getConsistency());

代码示例来源:origin: com.aliyun.hbase/alihbase-client

boolean isTargetReplicaSpecified = (get.getReplicaId() >= 0);
try {
 rl = getRegionLocations(true,
  (isTargetReplicaSpecified ? get.getReplicaId() : RegionReplicaUtil.DEFAULT_REPLICA_ID),
  cConnection, tableName, get.getRow());
} catch (RetriesExhaustedException | DoNotRetryIOException e) {
 addCallsForReplica(cs, rl, get.getReplicaId(), get.getReplicaId());
 endIndex = 1;
} else {

代码示例来源:origin: com.aliyun.hbase/alihbase-client

this.setReplicaId(get.getReplicaId());
this.setConsistency(get.getConsistency());

相关文章