From e5008c893fbe2a86e7a54a9ac796711d5791dd34 Mon Sep 17 00:00:00 2001 From: Murtaza Hassan Date: Mon, 17 Jun 2019 17:01:27 +0200 Subject: [PATCH] HBASE-22571 changes made according to comments by Jan --- .../hadoop/hbase/client/SimpleRequestController.java | 2 +- .../hadoop/hbase/mapred/TestTableInputFormat.java | 3 ++- .../hadoop/hbase/mapreduce/TestTableInputFormat.java | 3 ++- .../hadoop/hbase/client/locking/EntityLock.java | 2 +- .../apache/hadoop/hbase/regionserver/HRegion.java | 2 +- .../TestServerSideScanMetricsFromClientSide.java | 12 ++++++------ .../coprocessor/TestOpenTableInCoprocessor.java | 4 ++-- .../hbase/master/balancer/BalancerTestBase.java | 2 +- .../apache/hadoop/hbase/regionserver/TestHStore.java | 2 +- .../hadoop/hbase/regionserver/TestHStoreFile.java | 2 +- .../hbase/util/test/LoadTestDataGenerator.java | 2 +- 11 files changed, 19 insertions(+), 17 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/SimpleRequestController.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/SimpleRequestController.java index 913e711bb6fa..1c395f110aa7 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/SimpleRequestController.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/SimpleRequestController.java @@ -434,7 +434,7 @@ private void waitForRegion() throws InterruptedIOException { * * @param loc * @param heapSizeOfRow - * @return either Include ReturnCode or Skip ReturnCode + * @return either Include {@link ReturnCode} or Skip {@link ReturnCode} */ @Override public ReturnCode canTakeOperation(HRegionLocation loc, long heapSizeOfRow) { diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java index e44b5120ec00..a64ea2894025 100644 --- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java +++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java @@ -147,7 +147,8 @@ public static Table createTable(byte[] tableName, byte[][] families) throws IOEx * @param key * @param expectedKey * @param expectedValue - * @return true if succeed + * @return true if result and key have expected values, false otherwise. Where result is a single + * row result. */ static boolean checkResult(Result r, ImmutableBytesWritable key, byte[] expectedKey, byte[] expectedValue) { diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java index ea85f31ed728..1d0a320fa47d 100644 --- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java +++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java @@ -145,7 +145,8 @@ public static Table createTable(byte[] tableName, byte[][] families) throws IOEx * @param key * @param expectedKey * @param expectedValue - * @return true if succeed + * @return true if result and key have expected values, false otherwise. Where result is a single + * row result. */ static boolean checkResult(Result r, ImmutableBytesWritable key, byte[] expectedKey, byte[] expectedValue) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/locking/EntityLock.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/locking/EntityLock.java index 009b4eb5b24e..e49fe8c8c931 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/locking/EntityLock.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/locking/EntityLock.java @@ -218,7 +218,7 @@ public LockHeartbeatWorker(final String desc) { } /** - * @return Shutdown the thread cleanly, quietly. We done. + * @return Shuts down the thread clean and quietly. */ Thread shutdown() { shutdown = true; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 27425ca0d20f..e1b260596b96 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -4090,7 +4090,7 @@ OperationStatus[] batchMutate(BatchOperation batchOp) throws IOException { /** * Called to do a piece of the batch that came in to {@link #batchMutate(Mutation[], long, long)} * In here we also handle replay of edits on region recover. Also gets change in size brought - * about by applying batchOp + * about by applying {@code batchOp}. */ private void doMiniBatchMutate(BatchOperation batchOp) throws IOException { boolean success = false; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java index 10a1884323db..c3e679de7a74 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java @@ -109,12 +109,12 @@ public static void tearDownAfterClass() throws Exception { /** * Make puts to put the input value into each combination of row, family, and qualifier - * @param rows - * @param families - * @param qualifiers - * @param value - * @return the putted values added in puts - * @throws IOException + * @param rows the rows to use + * @param families the column families to use + * @param qualifiers the column qualifiers to use + * @param value the value to put + * @return the putted input values added in puts + * @throws IOException If IO problem is encountered */ static ArrayList createPuts(byte[][] rows, byte[][] families, byte[][] qualifiers, byte[] value) throws IOException { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestOpenTableInCoprocessor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestOpenTableInCoprocessor.java index ac379bb74145..860a86b1e5ae 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestOpenTableInCoprocessor.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestOpenTableInCoprocessor.java @@ -94,8 +94,8 @@ public void prePut(final ObserverContext e, final public static class CustomThreadPoolCoprocessor implements RegionCoprocessor, RegionObserver { /** - * @return a pool that has only ever one thread. A second action added to the pool (running - * concurrently), will cause an exception. + * @return a pool that has one thread only at every time. A second action added to the pool ( + * running concurrently), will cause an exception. */ private ExecutorService getPool() { int maxThreads = 1; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/BalancerTestBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/BalancerTestBase.java index 27a343516d90..6a3aaee5f5e5 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/BalancerTestBase.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/BalancerTestBase.java @@ -328,7 +328,7 @@ protected String printMock(List balancedCluster) { * * @param list * @param plans - * @return the result which has all added map ServerAndLoad values + * @return a list of all added {@link ServerAndLoad} values. */ protected List reconcile(List list, List plans, diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java index 77af1aedda82..a020197b586e 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java @@ -794,7 +794,7 @@ private static void flushStore(HStore store, long id) throws IOException { * @param numRows * @param qualifier * @param family - * @return KeyValues list + * @return row KeyValues list */ List getKeyValueSet(long[] timestamps, int numRows, byte[] qualifier, byte[] family) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java index 3b4bb018a5ba..95613a605e5b 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java @@ -844,7 +844,7 @@ private HStoreFile mockStoreFile(boolean bulkLoad, * @param numRows * @param qualifier * @param family - * @return KeyValues list + * @return row KeyValues list */ List getKeyValueSet(long[] timestamps, int numRows, byte[] qualifier, byte[] family) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/test/LoadTestDataGenerator.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/test/LoadTestDataGenerator.java index 061d91397a7b..089a181cb8d6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/test/LoadTestDataGenerator.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/test/LoadTestDataGenerator.java @@ -165,7 +165,7 @@ public Get beforeGet(long rowkeyBase, Get get) throws IOException { } /** - * @return Return the arguments passed to the generator as list of object + * @return the arguments passed to the generator as a list of objects. */ public String[] getArgs() { return this.args;