Skip to content

Commit e7c8a05

Browse files
author
Ray Mattingly
committed
fix warnings
1 parent 31a7882 commit e7c8a05

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3653,7 +3653,9 @@ public ScanResponse scan(final RpcController controller, final ScanRequest reque
36533653
}
36543654

36553655
quota.addScanResult(results);
3656-
quota.addBlockBytesScanned(rpcCall.getBlockBytesScanned());
3656+
if (rpcCall != null) {
3657+
quota.addBlockBytesScanned(rpcCall.getBlockBytesScanned());
3658+
}
36573659
addResults(builder, results, (HBaseRpcController) controller,
36583660
RegionReplicaUtil.isDefaultReplica(region.getRegionInfo()),
36593661
isClientCellBlockSupport(rpcCall));

hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestBlockBytesScannedQuota.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ public void testBBSMultiGet() throws Exception {
195195
assertEquals(100, doMultiGets(100, 10, rowCount, FAMILY, QUALIFIER, table));
196196
assertEquals(100, doMultiGets(100, 10, rowCount, FAMILY, QUALIFIER, table));
197197

198-
// Add 100 block/min limit
198+
// Add ~100 block/min limit
199199
admin.setQuota(QuotaSettingsFactory.throttleUser(userName, ThrottleType.REQUEST_SIZE,
200-
Math.round(100 * blockSize), TimeUnit.MINUTES));
200+
Math.round(100.1 * blockSize), TimeUnit.MINUTES));
201201
triggerUserCacheRefresh(TEST_UTIL, false, TABLE_NAME);
202202

203203
// should execute approximately 10 batches of 10 requests

0 commit comments

Comments
 (0)