Skip to content

Commit

Permalink
Fix QA bot issues
Browse files Browse the repository at this point in the history
- Checkstyle warnings
- License headers
- Javadoc tags
- Shading issues
  • Loading branch information
bharathv committed Dec 20, 2019
1 parent 31a04be commit fed4495
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.client;

import static org.apache.hadoop.hbase.HConstants.DEFAULT_HBASE_RPC_TIMEOUT;
Expand Down Expand Up @@ -49,12 +66,12 @@

/**
* Master based registry implementation. Makes RPCs to the configured master addresses from config
* {@value HConstants#MASTER_ADDRS_KEY}.
* {@value org.apache.hadoop.hbase.HConstants#MASTER_ADDRS_KEY}.
*
* It has the ability to burst the same RPC to multiple masters as a batch and returns whatever
* comes back first (a.k.a hedged RPCs). Number of target masters in a single batch is controlled
* via {@value HConstants#MASTER_REGISTRY_NUM_HEDGED_REQS_KEY}. If it is set to 1 (default), it is
* equivalent to picking a random master from the configured list.
* via {@value org.apache.hadoop.hbase.HConstants#MASTER_REGISTRY_NUM_HEDGED_REQS_KEY}. If it is
* set to 1 (default), it is equivalent to picking a random master from the configured list.
*
* TODO: Handle changes to the configuration dynamically without having to restart the client.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.exceptions;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5130,7 +5130,7 @@ public void testCheckAndDeleteWithCompareOp() throws IOException {
* Test ScanMetrics
*/
@Test
@SuppressWarnings ("unused")
@SuppressWarnings({"unused", "checkstyle:EmptyBlock"})
public void testScanMetrics() throws Exception {
final TableName tableName = name.getTableName();

Expand Down Expand Up @@ -5169,7 +5169,8 @@ public void testScanMetrics() throws Exception {
scan2.setScanMetricsEnabled(true);
scan2.setCaching(numRecords + 1);
try (ResultScanner scanner = ht.getScanner(scan2)) {
for (Result result : scanner.next(numRecords - 1)) {}
for (Result result : scanner.next(numRecords - 1)) {
}
scanner.close();
// closing the scanner will set the metrics.
assertNotNull(scanner.getScanMetrics());
Expand All @@ -5182,8 +5183,8 @@ public void testScanMetrics() throws Exception {
try (ResultScanner scanner = ht.getScanner(scan2)) {
// per HBASE-5717, this should still collect even if you don't run all the way to
// the end of the scanner. So this is asking for 2 of the 3 rows we inserted.
for (Result result : scanner.next(numRecords - 1)) {}

for (Result result : scanner.next(numRecords - 1)) {
}
ScanMetrics scanMetrics = scanner.getScanMetrics();
assertEquals("Did not access all the regions in the table", numOfRegions,
scanMetrics.countOfRegions.get());
Expand Down

0 comments on commit fed4495

Please sign in to comment.