saintstack commented on a change in pull request #3532: URL: https://github.com/apache/hbase/pull/3532#discussion_r686374412
########## File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java ########## @@ -339,6 +340,21 @@ public Get setFilter(Filter filter) { return this; } + /** + * Set the maximum result size. The default is -1; this means that no specific + * maximum result size will be set for this Get. + * + * If set to a value greater than zero, the server may respond with a Result where + * {@link Result#mayHaveMoreCellsInRow()} is true. The user is required to handle + * this case. Review comment: I want a Cell Streaming API. ########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java ########## @@ -7518,11 +7516,35 @@ void prepareGet(final Get get) throws IOException { @Override public List<Cell> get(Get get, boolean withCoprocessor) throws IOException { - return get(get, withCoprocessor, HConstants.NO_NONCE, HConstants.NO_NONCE); + return getInternal(get, withCoprocessor, HConstants.NO_NONCE, HConstants.NO_NONCE).getFirst(); } - private List<Cell> get(Get get, boolean withCoprocessor, long nonceGroup, long nonce) - throws IOException { + private Result get(Get get, boolean withCoprocessor, long nonceGroup, long nonce) + throws IOException { + Pair<List<Cell>, ScannerContext> result = getInternal(get, withCoprocessor, nonceGroup, nonce); + boolean stale = this.getRegionInfo().getReplicaId() != 0; + + return Result.create( + result.getFirst(), + get.isCheckExistenceOnly() ? !result.getFirst().isEmpty() : null, + stale, + result.getSecond().mayHaveMoreCellsInRow()); + } + + private Pair<List<Cell>, ScannerContext> getInternal(Get get, boolean withCoprocessor, long nonceGroup, long nonce) + throws IOException { + ScannerContext scannerContext = ScannerContext.newBuilder() Review comment: Thanks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org