From fabf2b8282402aecb3568205256cfdd13d47e611 Mon Sep 17 00:00:00 2001 From: syedmurtazahassan Date: Tue, 2 Jul 2019 06:15:00 +0200 Subject: [PATCH] HBASE-22572 Javadoc Warnings: @link reference not found (#306) Signed-off-by: Jan Hentschel Signed-off-by: stack --- .../hadoop/hbase/testclassification/FilterTests.java | 2 +- .../apache/hadoop/hbase/testclassification/IOTests.java | 2 +- .../src/main/resources/hbase/checkstyle-suppressions.xml | 1 + .../org/apache/hadoop/hbase/client/MetricsConnection.java | 3 +-- .../java/org/apache/hadoop/hbase/util/WeakObjectPool.java | 6 +++--- .../org/apache/hadoop/hbase/HBaseClassTestRuleChecker.java | 2 +- .../hbase/coprocessor/ProtobufCoprocessorService.java | 4 ++-- .../hbase/mapreduce/MultiTableSnapshotInputFormat.java | 7 +++---- .../hbase/mapreduce/MultiTableSnapshotInputFormatImpl.java | 6 +++--- .../org/apache/hadoop/hbase/coprocessor/package-info.java | 2 +- .../hbase/master/balancer/StochasticLoadBalancer.java | 5 ++++- .../java/org/apache/hadoop/hbase/util/ZKDataMigrator.java | 4 +++- .../test/java/org/apache/hadoop/hbase/HBaseTestCase.java | 6 +++--- .../hadoop/hbase/client/HConnectionTestingUtility.java | 6 +++--- .../hadoop/hbase/client/TestIncrementsFromClientSide.java | 2 +- .../org/apache/hadoop/hbase/master/TestWarmupRegion.java | 2 +- .../hadoop/hbase/regionserver/TestMemStoreChunkPool.java | 2 +- .../org/apache/hadoop/hbase/HBaseZKTestingUtility.java | 2 +- 18 files changed, 34 insertions(+), 30 deletions(-) diff --git a/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/FilterTests.java b/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/FilterTests.java index ebda1244ccc..a91033fa2d3 100644 --- a/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/FilterTests.java +++ b/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/FilterTests.java @@ -19,7 +19,7 @@ package org.apache.hadoop.hbase.testclassification; /** - * Tag a test as related to the {@link org.apache.hadoop.hbase.filter} package. + * Tag a test as related to the {@code org.apache.hadoop.hbase.filter} package. * * @see org.apache.hadoop.hbase.testclassification.ClientTests * @see org.apache.hadoop.hbase.testclassification.CoprocessorTests diff --git a/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/IOTests.java b/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/IOTests.java index f3ab8b56c86..c2375ca4e5c 100644 --- a/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/IOTests.java +++ b/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/IOTests.java @@ -19,7 +19,7 @@ package org.apache.hadoop.hbase.testclassification; /** - * Tag a test as related to the {@link org.apache.hadoop.hbase.io} package. Things like HFile and + * Tag a test as related to the {@code org.apache.hadoop.hbase.io} package. Things like HFile and * the like. * * @see org.apache.hadoop.hbase.testclassification.ClientTests diff --git a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml index 51c4ad40a70..ba5e7514af0 100644 --- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml +++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml @@ -45,4 +45,5 @@ + diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java index d842f907937..5d4634492b1 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java @@ -246,8 +246,7 @@ public class MetricsConnection implements StatisticTrackable { /** Default load factor from {@link java.util.HashMap#DEFAULT_LOAD_FACTOR} */ private static final float LOAD_FACTOR = 0.75f; /** - * Anticipated number of concurrent accessor threads, from - * {@link ConnectionImplementation#getBatchPool()} + * Anticipated number of concurrent accessor threads */ private static final int CONCURRENCY_LEVEL = 256; diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/WeakObjectPool.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/WeakObjectPool.java index 181979f22c4..ef462d8a421 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/WeakObjectPool.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/WeakObjectPool.java @@ -26,9 +26,9 @@ import org.apache.yetus.audience.InterfaceAudience; * A {@code WeakReference} based shared object pool. * The objects are kept in weak references and * associated with keys which are identified by the {@code equals} method. - * The objects are created by {@link ObjectFactory} on demand. - * The object creation is expected to be lightweight, - * and the objects may be excessively created and discarded. + * The objects are created by {@link org.apache.hadoop.hbase.util.ObjectPool.ObjectFactory} on + * demand. The object creation is expected to be lightweight, and the objects may be excessively + * created and discarded. * Thread safe. */ @InterfaceAudience.Private diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRuleChecker.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRuleChecker.java index 708f37cde17..2508a27ee55 100644 --- a/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRuleChecker.java +++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRuleChecker.java @@ -32,7 +32,7 @@ import org.junit.runner.notification.RunListener; import org.junit.runner.notification.RunListener.ThreadSafe; /** - * A RunListener to confirm that we have a {@link CategoryBasedTimeout} class rule for every test. + * A RunListener to confirm that we have a {@link HBaseClassTestRule} class rule for every test. */ @InterfaceAudience.Private @ThreadSafe diff --git a/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/ProtobufCoprocessorService.java b/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/ProtobufCoprocessorService.java index 697e88463f6..63af9ca7c48 100644 --- a/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/ProtobufCoprocessorService.java +++ b/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/ProtobufCoprocessorService.java @@ -37,8 +37,8 @@ import org.apache.hadoop.hbase.util.Threads; /** * Test implementation of a coprocessor endpoint exposing the - * {@link TestRpcServiceProtos.TestProtobufRpcProto} service methods. For internal use by unit tests - * only. + * {@link org.apache.hadoop.hbase.ipc.protobuf.generated.TestRpcServiceProtos.TestProtobufRpcProto} + * service methods. For internal use by unit tests only. */ public class ProtobufCoprocessorService extends TestRpcServiceProtos.TestProtobufRpcProto implements MasterCoprocessor, RegionCoprocessor { diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableSnapshotInputFormat.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableSnapshotInputFormat.java index f2c6eeef695..fa712903040 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableSnapshotInputFormat.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableSnapshotInputFormat.java @@ -66,12 +66,11 @@ import java.util.Map; * * Internally, this input format restores each snapshot into a subdirectory of the given tmp * directory. Input splits and - * record readers are created as described in {@link org.apache.hadoop.hbase.mapreduce - * .TableSnapshotInputFormat} + * record readers are created as described in + * {@link org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormat} * (one per region). * See {@link TableSnapshotInputFormat} for more notes on - * permissioning; the - * same caveats apply here. + * permissioning; the same caveats apply here. * * @see TableSnapshotInputFormat * @see org.apache.hadoop.hbase.client.TableSnapshotScanner diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableSnapshotInputFormatImpl.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableSnapshotInputFormatImpl.java index 200c2bd066f..8a94de55695 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableSnapshotInputFormatImpl.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/MultiTableSnapshotInputFormatImpl.java @@ -44,9 +44,9 @@ import org.apache.hbase.thirdparty.com.google.common.collect.Maps; /** * Shared implementation of mapreduce code over multiple table snapshots. - * Utilized by both mapreduce ({@link org.apache.hadoop.hbase.mapreduce - * .MultiTableSnapshotInputFormat} and mapred - * ({@link org.apache.hadoop.hbase.mapred.MultiTableSnapshotInputFormat} implementations. + * Utilized by both mapreduce + * {@link org.apache.hadoop.hbase.mapreduce.MultiTableSnapshotInputFormat} and mapred + * {@link org.apache.hadoop.hbase.mapred.MultiTableSnapshotInputFormat} implementations. */ @InterfaceAudience.LimitedPrivate({ "HBase" }) @InterfaceStability.Evolving diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/package-info.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/package-info.java index 92eb1219454..7cba1eaa875 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/package-info.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/package-info.java @@ -186,7 +186,7 @@ To implement an Endpoint, you need to:

For a more detailed discussion of how to implement a coprocessor Endpoint, along with some sample -code, see the {@link org.apache.hadoop.hbase.client.coprocessor} package documentation. +code, see the {@code org.apache.hadoop.hbase.client.coprocessor} package documentation.

Coprocessor loading

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java index 7a93c6e0e6b..87e5821de86 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java @@ -28,6 +28,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Random; + import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.ClusterMetrics; import org.apache.hadoop.hbase.HBaseInterfaceAudience; @@ -1028,8 +1029,10 @@ public class StochasticLoadBalancer extends BaseLoadBalancer { abstract double cost(); + @SuppressWarnings("checkstyle:linelength") /** - * Function to compute a scaled cost using {@link org.apache.commons.math3.stat.descriptive.DescriptiveStatistics}. + * Function to compute a scaled cost using + * {@link org.apache.commons.math3.stat.descriptive.DescriptiveStatistics#DescriptiveStatistics()}. * It assumes that this is a zero sum set of costs. It assumes that the worst case * possible is all of the elements in one region server and the rest having 0. * diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ZKDataMigrator.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ZKDataMigrator.java index 6b284ad5057..78ef55ca2c5 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ZKDataMigrator.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ZKDataMigrator.java @@ -93,7 +93,9 @@ public class ZKDataMigrator { * Gets table state from ZK. * @param zkw ZKWatcher instance to use * @param tableName table we're checking - * @return Null or {@link ZooKeeperProtos.DeprecatedTableState.State} found in znode. + * @return Null or + * {@link org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos.DeprecatedTableState.State} + * found in znode. * @throws KeeperException * @deprecated Since 2.0.0. To be removed in hbase-3.0.0. */ diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java index 7d296fa0e5c..d3aff18269e 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java @@ -176,7 +176,7 @@ public abstract class HBaseTestCase extends TestCase { } /** - * Create a table of name name with {@link COLUMNS} for + * Create a table of name {@code name} with {@link #COLUMNS} for * families. * @param name Name to give table. * @return Column descriptor. @@ -186,7 +186,7 @@ public abstract class HBaseTestCase extends TestCase { } /** - * Create a table of name name with {@link COLUMNS} for + * Create a table of name {@code name} with {@link #COLUMNS} for * families. * @param name Name to give table. * @param versions How many versions to allow per column. @@ -199,7 +199,7 @@ public abstract class HBaseTestCase extends TestCase { } /** - * Create a table of name name with {@link COLUMNS} for + * Create a table of name {@code name} with {@link #COLUMNS} for * families. * @param name Name to give table. * @param versions How many versions to allow per column. diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java index a16def9a593..07d2a730e30 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java @@ -22,7 +22,7 @@ import org.apache.hadoop.hbase.ZooKeeperConnectionException; import org.mockito.Mockito; /** - * {@link ConnectionImplementation} testing utility. + * {@link Connection} testing utility. */ public class HConnectionTestingUtility { @@ -32,9 +32,9 @@ public class HConnectionTestingUtility { * to HBaseTestingUtility to give it access. */ /** - * Get a Mocked {@link ConnectionImplementation} that goes with the passed conf + * Get a Mocked {@link Connection} that goes with the passed conf * configuration instance. Minimally the mock will return <code>conf</conf> when - * {@link ConnectionImplementation#getConfiguration()} is invoked. Be sure to shutdown the + * {@link Connection#getConfiguration()} is invoked. Be sure to shutdown the * connection when done by calling {@link Connection#close()} else it will stick around; this is * probably not what you want. * @param conf configuration diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIncrementsFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIncrementsFromClientSide.java index 09d16273f00..8a41470992d 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIncrementsFromClientSide.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIncrementsFromClientSide.java @@ -53,7 +53,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Run Increment tests that use the HBase clients; {@link HTable}. + * Run Increment tests that use the HBase clients; {@link TableBuilder}. * * Test is parameterized to run the slow and fast increment code paths. If fast, in the @before, we * do a rolling restart of the single regionserver so that it can pick up the go fast configuration. diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWarmupRegion.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWarmupRegion.java index 437ddfc3c5d..79cde38b2b0 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWarmupRegion.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWarmupRegion.java @@ -48,7 +48,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Run tests that use the HBase clients; {@link org.apache.hadoop.hbase.client.HTable}. + * Run tests that use the HBase clients; {@link org.apache.hadoop.hbase.client.TableBuilder}. * Sets up the HBase mini cluster once at start and runs through all client tests. * Each creates a table named for the method and does its stuff against that. */ diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreChunkPool.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreChunkPool.java index 8eea7c53301..b29a5cdf7c4 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreChunkPool.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreChunkPool.java @@ -42,7 +42,7 @@ import org.junit.Test; import org.junit.experimental.categories.Category; /** - * Test the {@link MemStoreChunkPool} class + * Test the {@link org.apache.hadoop.hbase.regionserver.ChunkCreator.MemStoreChunkPool} class */ @Category({RegionServerTests.class, SmallTests.class}) public class TestMemStoreChunkPool { diff --git a/hbase-zookeeper/src/test/java/org/apache/hadoop/hbase/HBaseZKTestingUtility.java b/hbase-zookeeper/src/test/java/org/apache/hadoop/hbase/HBaseZKTestingUtility.java index 527ddab2595..8711deaf7df 100644 --- a/hbase-zookeeper/src/test/java/org/apache/hadoop/hbase/HBaseZKTestingUtility.java +++ b/hbase-zookeeper/src/test/java/org/apache/hadoop/hbase/HBaseZKTestingUtility.java @@ -146,7 +146,7 @@ public class HBaseZKTestingUtility extends HBaseCommonTestingUtility { } /** - * Shuts down zk cluster created by call to {@link #startMiniZKCluster(File)} or does nothing. + * Shuts down zk cluster created by call to {@link #startMiniZKCluster()} or does nothing. * @see #startMiniZKCluster() */ public void shutdownMiniZKCluster() throws IOException {