infraio commented on a change in pull request #656: HBASE-23063 Add an option
to enable multiget in parallel
URL: https://github.com/apache/hbase/pull/656#discussion_r328425056
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ServerCall.java
##########
@@ -431,31 +436,42 @@ public boolean isClientCellBlockSupported() {
@Override
public long getResponseCellSize() {
- return responseCellSize;
+ return responseCellSize.get();
}
@Override
- public void incrementResponseCellSize(long cellSize) {
- responseCellSize += cellSize;
+ public long getNumsOfGet() {
+ return getsNum.get();
+ }
+
+ public long incrementGetsNum() {
+ return this.getsNum.incrementAndGet();
}
@Override
- public long getResponseBlockSize() {
- return responseBlockSize;
+ public void addResultSize(Result result) {
+ if (result != null && !result.isEmpty()) {
+ for (Cell c : result.rawCells()) {
+
this.responseCellSize.addAndGet(PrivateCellUtil.estimatedSerializedSizeOf(c));
+ }
+ }
}
@Override
- public void incrementResponseBlockSize(long blockSize) {
- responseBlockSize += blockSize;
+ public boolean isAboveQuota(long maxQuotaResultSize, long
maxRowsPerMultiGet) {
Review comment:
This should not a method of RpcContext? This can be a static "util" method
in RSRpcServices?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services