本文整理了Java中org.apache.hadoop.hbase.client.Get.getConsistency()
方法的一些代码示例,展示了Get.getConsistency()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Get.getConsistency()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Get
类名称:Get
方法名:getConsistency
暂无
代码示例来源:origin: apache/hbase
static boolean isReplicaGet(Row row) {
return (row instanceof Get) && (((Get)row).getConsistency() == Consistency.TIMELINE);
}
代码示例来源:origin: apache/hbase
private Result get(Get get, final boolean checkExistenceOnly) throws IOException {
if (get.isCheckExistenceOnly() != checkExistenceOnly || get.getConsistency() == null) {
get = ReflectionUtils.newInstance(get.getClass(), get);
get.setCheckExistenceOnly(checkExistenceOnly);
if (get.getConsistency() == null){
get.setConsistency(DEFAULT_CONSISTENCY);
if (get.getConsistency() == Consistency.STRONG) {
final Get configuredGet = get;
ClientServiceCallable<Result> callable = new ClientServiceCallable<Result>(this.connection, getName(),
代码示例来源:origin: apache/hbase
this.setConsistency(get.getConsistency());
代码示例来源:origin: apache/hbase
this.familyMap = get.getFamilyMap();
this.asyncPrefetch = false;
this.consistency = get.getConsistency();
this.setIsolationLevel(get.getIsolationLevel());
this.loadColumnFamiliesOnDemand = get.getLoadColumnFamiliesOnDemandValue();
代码示例来源:origin: apache/hbase
throw new RuntimeException(e);
out.setConsistency(consistencyFromHBase(in.getConsistency()));
out.setTargetReplicaId(in.getReplicaId());
out.setCacheBlocks(in.getCacheBlocks());
代码示例来源:origin: org.apache.hbase/hbase-client
static boolean isReplicaGet(Row row) {
return (row instanceof Get) && (((Get)row).getConsistency() == Consistency.TIMELINE);
}
代码示例来源:origin: apache/hbase
builder.setExistenceOnly(true);
if (get.getConsistency() != null && get.getConsistency() != Consistency.STRONG) {
builder.setConsistency(toConsistency(get.getConsistency()));
代码示例来源:origin: apache/hbase
builder.setExistenceOnly(true);
if (get.getConsistency() != null && get.getConsistency() != Consistency.STRONG) {
builder.setConsistency(toConsistency(get.getConsistency()));
代码示例来源: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
assertEquals(get.getConsistency(), scan.getConsistency());
assertEquals(get.getFilter(), scan.getFilter());
assertEquals(get.getId(), scan.getId());
代码示例来源:origin: apache/hbase
assertTrue(get.getAuthorizations().toString().equals(copyGet.getAuthorizations().toString()));
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
private Result get(Get get, final boolean checkExistenceOnly) throws IOException {
if (get.isCheckExistenceOnly() != checkExistenceOnly || get.getConsistency() == null) {
get = ReflectionUtils.newInstance(get.getClass(), get);
get.setCheckExistenceOnly(checkExistenceOnly);
if (get.getConsistency() == null){
get.setConsistency(DEFAULT_CONSISTENCY);
if (get.getConsistency() == Consistency.STRONG) {
final Get configuredGet = get;
ClientServiceCallable<Result> callable = new ClientServiceCallable<Result>(this.connection, getName(),
代码示例来源:origin: org.apache.hbase/hbase-client
this.setConsistency(get.getConsistency());
代码示例来源:origin: org.apache.hbase/hbase-client
this.familyMap = get.getFamilyMap();
this.asyncPrefetch = false;
this.consistency = get.getConsistency();
this.setIsolationLevel(get.getIsolationLevel());
this.loadColumnFamiliesOnDemand = get.getLoadColumnFamiliesOnDemandValue();
代码示例来源:origin: harbby/presto-connectors
private static boolean isReplicaGet(Row row) {
return (row instanceof Get) && (((Get)row).getConsistency() == Consistency.TIMELINE);
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
static boolean isReplicaGet(Row row) {
return (row instanceof Get) && (((Get)row).getConsistency() == Consistency.TIMELINE);
}
代码示例来源:origin: org.apache.hbase/hbase-client
builder.setExistenceOnly(true);
if (get.getConsistency() != null && get.getConsistency() != Consistency.STRONG) {
builder.setConsistency(toConsistency(get.getConsistency()));
代码示例来源:origin: org.apache.hbase/hbase-client
builder.setExistenceOnly(true);
if (get.getConsistency() != null && get.getConsistency() != Consistency.STRONG) {
builder.setConsistency(toConsistency(get.getConsistency()));
代码示例来源:origin: org.apache.hbase/hbase-client
assertEquals(get.getConsistency(), scan.getConsistency());
assertEquals(get.getFilter(), scan.getFilter());
assertEquals(get.getId(), scan.getId());
代码示例来源:origin: org.apache.hbase/hbase-client
assertTrue(get.getAuthorizations().toString().equals(copyGet.getAuthorizations().toString()));
assertTrue(Bytes.equals(get.getACL(), copyGet.getACL()));
assertEquals(get.getConsistency(), copyGet.getConsistency());
assertEquals(get.getReplicaId(), copyGet.getReplicaId());
assertEquals(get.getIsolationLevel(), copyGet.getIsolationLevel());
内容来源于网络,如有侵权,请联系作者删除!