You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ja...@apache.org on 2019/07/13 14:43:05 UTC

[hbase] branch branch-1.3 updated: HBASE-22571 Javadoc Warnings related to @return tag

This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1.3 by this push:
     new 249b080  HBASE-22571 Javadoc Warnings related to @return tag
249b080 is described below

commit 249b08070dd588cdbe9d738f0682068bf2efa691
Author: syedmurtazahassan <sy...@gmail.com>
AuthorDate: Sat Jul 13 13:34:48 2019 +0200

    HBASE-22571 Javadoc Warnings related to @return tag
    
    Signed-off-by: Jan Hentschel <ja...@ultratendency.com>
---
 .../apache/hadoop/hbase/regionserver/HRegion.java  |  9 ++++++--
 .../hadoop/hbase/regionserver/RSRpcServices.java   |  2 +-
 .../apache/hadoop/hbase/snapshot/SnapshotInfo.java |  1 -
 .../java/org/apache/hadoop/hbase/HBaseCluster.java |  8 --------
 .../apache/hadoop/hbase/HBaseTestingUtility.java   |  2 +-
 .../TestServerSideScanMetricsFromClientSide.java   | 24 +++++++++++-----------
 .../coprocessor/TestOpenTableInCoprocessor.java    |  5 ++---
 .../hadoop/hbase/master/TestRegionPlacement.java   |  2 +-
 .../hbase/master/balancer/BalancerTestBase.java    |  2 +-
 .../hadoop/hbase/util/MultiThreadedAction.java     |  3 ++-
 .../hbase/util/test/LoadTestDataGenerator.java     |  3 +--
 11 files changed, 28 insertions(+), 33 deletions(-)

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 e48c635..074503f 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
@@ -3106,6 +3106,11 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
     }
   }
 
+  /**
+   * 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 {@code batchOp}.
+   */
   private long doMiniBatchMutation(BatchOperationInProgress<?> batchOp) throws IOException {
     boolean isInReplay = batchOp.isInReplay();
     // variable to note if all Put items are for the same CF -- metrics related
@@ -7772,7 +7777,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
           }
         } finally {
           this.updatesLock.readLock().unlock();
-          // For increment/append, a region scanner for doing a get operation could throw 
+          // For increment/append, a region scanner for doing a get operation could throw
           // FileNotFoundException. So we call dropMemstoreContents() in finally block
           // after releasing read lock
           dropMemstoreContents();
@@ -8015,7 +8020,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
           }
         } finally {
           this.updatesLock.readLock().unlock();
-          // For increment/append, a region scanner for doing a get operation could throw 
+          // For increment/append, a region scanner for doing a get operation could throw
           // FileNotFoundException. So we call dropMemstoreContents() in finally block
           // after releasing read lock
           dropMemstoreContents();
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
index 75d5e1a..00fbdc9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
@@ -373,7 +373,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
    * Starts the nonce operation for a mutation, if needed.
    * @param mutation Mutation.
    * @param nonceGroup Nonce group from the request.
-   * @returns whether to proceed this mutation.
+   * @return whether to proceed this mutation.
    */
   private boolean startNonceOperation(final MutationProto mutation, long nonceGroup)
       throws IOException, OperationConflictException {
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java
index 80b180b..52c7da5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java
@@ -582,7 +582,6 @@ public final class SnapshotInfo extends Configured implements Tool {
    * @param filesMap {@link Map} the map to put the mapping entries
    * @param uniqueHFilesArchiveSize {@link AtomicLong} the accumulated store file size in archive
    * @param uniqueHFilesSize {@link AtomicLong} the accumulated store file size shared
-   * @return the snapshot stats
    */
   private static void getSnapshotFilesMap(final Configuration conf,
       final SnapshotDescription snapshot, final ExecutorService exec,
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseCluster.java
index ce1da03..3273f96 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseCluster.java
@@ -130,14 +130,12 @@ public abstract class HBaseCluster implements Closeable, Configurable {
 
   /**
    * Stops the given region server, by attempting a gradual stop.
-   * @return whether the operation finished with success
    * @throws IOException if something goes wrong
    */
   public abstract void stopRegionServer(ServerName serverName) throws IOException;
 
   /**
    * Wait for the specified region server to join the cluster
-   * @return whether the operation finished with success
    * @throws IOException if something goes wrong or timeout occurs
    */
   public void waitForRegionServerToStart(String hostname, int port, long timeout)
@@ -157,7 +155,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
 
   /**
    * Wait for the specified region server to stop the thread / process.
-   * @return whether the operation finished with success
    * @throws IOException if something goes wrong or timeout occurs
    */
   public abstract void waitForRegionServerToStop(ServerName serverName, long timeout)
@@ -187,7 +184,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
 
   /**
    * Wait for the specified zookeeper node to join the cluster
-   * @return whether the operation finished with success
    * @throws IOException if something goes wrong or timeout occurs
    */
   public abstract void waitForZkNodeToStart(ServerName serverName, long timeout)
@@ -195,7 +191,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
 
   /**
    * Wait for the specified zookeeper node to stop the thread / process.
-   * @return whether the operation finished with success
    * @throws IOException if something goes wrong or timeout occurs
    */
   public abstract void waitForZkNodeToStop(ServerName serverName, long timeout)
@@ -224,7 +219,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
 
   /**
    * Wait for the specified datanode to join the cluster
-   * @return whether the operation finished with success
    * @throws IOException if something goes wrong or timeout occurs
    */
   public abstract void waitForDataNodeToStart(ServerName serverName, long timeout)
@@ -232,7 +226,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
 
   /**
    * Wait for the specified datanode to stop the thread / process.
-   * @return whether the operation finished with success
    * @throws IOException if something goes wrong or timeout occurs
    */
   public abstract void waitForDataNodeToStop(ServerName serverName, long timeout)
@@ -242,7 +235,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
    * Starts a new master on the given hostname or if this is a mini/local cluster,
    * starts a master locally.
    * @param hostname the hostname to start the master on
-   * @return whether the operation finished with success
    * @throws IOException if something goes wrong
    */
   public abstract void startMaster(String hostname, int port) throws IOException;
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index cbd8296..6073b46 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -3576,7 +3576,7 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
    * @param startKey
    * @param endKey
    * @param numRegions the number of regions to be created. it has to be greater than 3.
-   * @return
+   * @return resulting split keys
    */
   public byte[][] getRegionSplitStartKeys(byte[] startKey, byte[] endKey, int numRegions){
     assertTrue(numRegions>3);
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 da294b1..5a4b448 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
@@ -98,12 +98,12 @@ public class TestServerSideScanMetricsFromClientSide {
 
   /**
    * Make puts to put the input value into each combination of row, family, and qualifier
-   * @param rows
-   * @param families
-   * @param qualifiers
-   * @param value
-   * @return
-   * @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 an IO problem is encountered
    */
   static ArrayList<Put> createPuts(byte[][] rows, byte[][] families, byte[][] qualifiers,
       byte[] value) throws IOException {
@@ -128,7 +128,7 @@ public class TestServerSideScanMetricsFromClientSide {
    * @return The approximate heap size of a cell in the test table. All cells should have
    *         approximately the same heap size, so the value is cached to avoid repeating the
    *         calculation
-   * @throws Exception
+   * @throws Exception on unexpected failure
    */
   private long getCellHeapSize() throws Exception {
     if (CELL_HEAP_SIZE == -1) {
@@ -299,11 +299,11 @@ public class TestServerSideScanMetricsFromClientSide {
   }
 
   /**
-   * Run the scan to completetion and check the metric against the specified value
-   * @param scan
-   * @param metricKey
-   * @param expectedValue
-   * @throws Exception
+   * Run the scan to completion and check the metric against the specified value
+   * @param scan The scan instance to use to record metrics
+   * @param metricKey The metric key name
+   * @param expectedValue The expected value of metric
+   * @throws Exception on unexpected failure
    */
   public void testMetric(Scan scan, String metricKey, long expectedValue) throws Exception {
     assertTrue("Scan should be configured to record metrics", scan.isScanMetricsEnabled());
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 17488a9..f522b98 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
@@ -83,9 +83,8 @@ public class TestOpenTableInCoprocessor {
   public static class CustomThreadPoolCoprocessor extends BaseRegionObserver {
 
     /**
-     * Get a pool that has only ever one thread. A second action added to the pool (running
-     * concurrently), will cause an exception.
-     * @return
+     * @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/TestRegionPlacement.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java
index a2cb354..4062d79 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java
@@ -296,7 +296,7 @@ public class TestRegionPlacement {
    * @param plan The assignment plan
    * @param p1 The first switch position
    * @param p2 The second switch position
-   * @return
+   * @return the shuffled assignment plan
    */
   private FavoredNodesPlan shuffleAssignmentPlan(FavoredNodesPlan plan,
       FavoredNodesPlan.Position p1, FavoredNodesPlan.Position p2) {
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 37cabeb..3c97c45 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
@@ -372,7 +372,7 @@ public class BalancerTestBase {
    *
    * @param list
    * @param plans
-   * @return
+   * @return a list of all added {@link ServerAndLoad} values.
    */
   protected List<ServerAndLoad> reconcile(List<ServerAndLoad> list,
                                           List<RegionPlan> plans,
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
index 0d25a68..90ddd65 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
@@ -324,7 +324,8 @@ public abstract class MultiThreadedAction {
    * @param verifyCfAndColumnIntegrity verify that cf/column set in the result is complete. Note
    *                                   that to use this multiPut should be used, or verification
    *                                   has to happen after writes, otherwise there can be races.
-   * @return
+   * @return true if the values of row result makes sense for row/cf/column combination and true if
+   *         the cf/column set in the result is complete, false otherwise.
    */
   public boolean verifyResultAgainstDataGenerator(Result result, boolean verifyValues,
       boolean verifyCfAndColumnIntegrity) {
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 676d3c3..e9bd643 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
@@ -141,8 +141,7 @@ public abstract class LoadTestDataGenerator {
   }
 
   /**
-   * Return the arguments passed to the generator as list of object
-   * @return
+   * @return the arguments passed to the generator as a list of objects.
    */
   public String[] getArgs() {
     return this.args;