本文整理了Java中org.apache.hadoop.hbase.client.Append.isReturnResults()
方法的一些代码示例,展示了Append.isReturnResults()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Append.isReturnResults()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Append
类名称:Append
方法名:isReturnResults
暂无
代码示例来源:origin: apache/hbase
public Result append(Append mutation, long nonceGroup, long nonce) throws IOException {
return doDelta(Operation.APPEND, mutation, nonceGroup, nonce, mutation.isReturnResults());
}
代码示例来源:origin: apache/hbase
throw new RuntimeException(e);
out.setReturnResults(in.isReturnResults());
return out;
代码示例来源:origin: com.google.cloud.bigtable/bigtable-hbase-2.x
/**
* {@inheritDoc}
*/
@Override
public CompletableFuture<Result> append(Append append) {
ReadModifyWriteRowRequest request = hbaseAdapter.adapt(append);
Function<? super ReadModifyWriteRowResponse, ? extends Result> adaptRowFunction = response ->
append.isReturnResults()
? Adapters.ROW_ADAPTER.adaptResponse(response.getRow())
: null;
return client.readModifyWriteRowAsync(request).thenApply(adaptRowFunction);
}
代码示例来源:origin: GoogleCloudPlatform/cloud-bigtable-client
/**
* {@inheritDoc}
*/
@Override
public CompletableFuture<Result> append(Append append) {
ReadModifyWriteRowRequest request = hbaseAdapter.adapt(append);
Function<? super ReadModifyWriteRowResponse, ? extends Result> adaptRowFunction = response ->
append.isReturnResults()
? Adapters.ROW_ADAPTER.adaptResponse(response.getRow())
: null;
return client.readModifyWriteRowAsync(request).thenApply(adaptRowFunction);
}
代码示例来源:origin: co.cask.hbase/hbase
return append.isReturnResults() ? new Result(allKVs) : null;
代码示例来源:origin: harbby/presto-connectors
return mutate.isReturnResults() ? Result.create(allKVs) : null;
代码示例来源:origin: com.google.cloud.bigtable/bigtable-hbase
/** {@inheritDoc} */
@Override
public Result append(Append append) throws IOException {
LOG.trace("append(Append)");
Span span = TRACER.spanBuilder("BigtableTable.append").startSpan();
try (Scope scope = TRACER.withSpan(span)) {
ReadModifyWriteRowRequest request = hbaseAdapter.adapt(append);
ReadModifyWriteRowResponse response = client.readModifyWriteRow(request);
// The bigtable API will always return the mutated results. In order to maintain
// compatibility, simply return null when results were not requested.
if (append.isReturnResults()) {
return Adapters.ROW_ADAPTER.adaptResponse(response.getRow());
} else {
return null;
}
} catch (Throwable t) {
span.setStatus(Status.UNKNOWN);
throw logAndCreateIOException("append", append.getRow(), t);
} finally {
span.end();
}
}
代码示例来源:origin: GoogleCloudPlatform/cloud-bigtable-client
/** {@inheritDoc} */
@Override
public Result append(Append append) throws IOException {
LOG.trace("append(Append)");
Span span = TRACER.spanBuilder("BigtableTable.append").startSpan();
try (Scope scope = TRACER.withSpan(span)) {
ReadModifyWriteRowRequest request = hbaseAdapter.adapt(append);
ReadModifyWriteRowResponse response = client.readModifyWriteRow(request);
// The bigtable API will always return the mutated results. In order to maintain
// compatibility, simply return null when results were not requested.
if (append.isReturnResults()) {
return Adapters.ROW_ADAPTER.adaptResponse(response.getRow());
} else {
return null;
}
} catch (Throwable t) {
span.setStatus(Status.UNKNOWN);
throw logAndCreateIOException("append", append.getRow(), t);
} finally {
span.end();
}
}
内容来源于网络,如有侵权,请联系作者删除!