HBASE-22571 Javadoc Warnings related to @return tag

Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
This commit is contained in:
syedmurtazahassan 2019-07-13 13:34:48 +02:00 committed by Jan Hentschel
parent 5fc84844b3
commit 30e874ae58
No known key found for this signature in database
GPG Key ID: 5CD818B19CC299A3
22 changed files with 42 additions and 56 deletions

View File

@ -434,7 +434,7 @@ class SimpleRequestController implements RequestController {
* *
* @param loc * @param loc
* @param heapSizeOfRow * @param heapSizeOfRow
* @return * @return either Include {@link ReturnCode} or Skip {@link ReturnCode}
*/ */
@Override @Override
public ReturnCode canTakeOperation(HRegionLocation loc, long heapSizeOfRow) { public ReturnCode canTakeOperation(HRegionLocation loc, long heapSizeOfRow) {

View File

@ -143,11 +143,11 @@ public class TestTableInputFormat {
/** /**
* Verify that the result and key have expected values. * Verify that the result and key have expected values.
* *
* @param r * @param r single row result
* @param key * @param key the row key
* @param expectedKey * @param expectedKey the expected key
* @param expectedValue * @param expectedValue the expected value
* @return * @return true if the result contains the expected key and value, false otherwise.
*/ */
static boolean checkResult(Result r, ImmutableBytesWritable key, static boolean checkResult(Result r, ImmutableBytesWritable key,
byte[] expectedKey, byte[] expectedValue) { byte[] expectedKey, byte[] expectedValue) {

View File

@ -141,11 +141,11 @@ public class TestTableInputFormat {
/** /**
* Verify that the result and key have expected values. * Verify that the result and key have expected values.
* *
* @param r * @param r single row result
* @param key * @param key the row key
* @param expectedKey * @param expectedKey the expected key
* @param expectedValue * @param expectedValue the expected value
* @return * @return true if the result contains the expected key and value, false otherwise.
*/ */
static boolean checkResult(Result r, ImmutableBytesWritable key, static boolean checkResult(Result r, ImmutableBytesWritable key,
byte[] expectedKey, byte[] expectedValue) { byte[] expectedKey, byte[] expectedValue) {

View File

@ -126,8 +126,8 @@ public final class VersionInfoUtil {
/** /**
* Returns the version components * Returns the version components
* Examples: "1.2.3" returns [1, 2, 3], "4.5.6-SNAPSHOT" returns [4, 5, 6, "SNAPSHOT"] * Examples: "1.4.3" returns [1, 4, 3], "4.5.6-SNAPSHOT" returns [4, 5, 6, "SNAPSHOT"]
* @returns the components of the version string * @return the components of the version string
*/ */
private static String[] getVersionComponents(final HBaseProtos.VersionInfo versionInfo) { private static String[] getVersionComponents(final HBaseProtos.VersionInfo versionInfo) {
return versionInfo.getVersion().split("[\\.-]"); return versionInfo.getVersion().split("[\\.-]");

View File

@ -218,8 +218,7 @@ public class EntityLock {
} }
/** /**
* Shutdown the thread cleanly, quietly. We done. * @return Shuts down the thread clean and quietly.
* @return
*/ */
Thread shutdown() { Thread shutdown() {
shutdown = true; shutdown = true;

View File

@ -4000,8 +4000,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
/** /**
* Called to do a piece of the batch that came in to {@link #batchMutate(Mutation[], long, long)} * 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. * In here we also handle replay of edits on region recover. Also gets change in size brought
* @return Change in size brought about by applying <code>batchOp</code> * about by applying {@code batchOp}.
*/ */
private void doMiniBatchMutate(BatchOperation<?> batchOp) throws IOException { private void doMiniBatchMutate(BatchOperation<?> batchOp) throws IOException {
boolean success = false; boolean success = false;

View File

@ -302,7 +302,6 @@ public class MemStoreLABImpl implements MemStoreLAB {
* <code>c</code>. Postcondition is that curChunk.get() * <code>c</code>. Postcondition is that curChunk.get()
* != c * != c
* @param c the chunk to retire * @param c the chunk to retire
* @return true if we won the race to retire the chunk
*/ */
private void tryRetireChunk(Chunk c) { private void tryRetireChunk(Chunk c) {
currChunk.compareAndSet(c, null); currChunk.compareAndSet(c, null);

View File

@ -530,7 +530,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
* Starts the nonce operation for a mutation, if needed. * Starts the nonce operation for a mutation, if needed.
* @param mutation Mutation. * @param mutation Mutation.
* @param nonceGroup Nonce group from the request. * @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) private boolean startNonceOperation(final MutationProto mutation, long nonceGroup)
throws IOException { throws IOException {

View File

@ -614,7 +614,6 @@ public final class SnapshotInfo extends AbstractHBaseTool {
* @param uniqueHFilesArchiveSize {@link AtomicLong} the accumulated store file size in archive * @param uniqueHFilesArchiveSize {@link AtomicLong} the accumulated store file size in archive
* @param uniqueHFilesSize {@link AtomicLong} the accumulated store file size shared * @param uniqueHFilesSize {@link AtomicLong} the accumulated store file size shared
* @param uniqueHFilesMobSize {@link AtomicLong} the accumulated mob store file size shared * @param uniqueHFilesMobSize {@link AtomicLong} the accumulated mob store file size shared
* @return the snapshot stats
*/ */
private static void getSnapshotFilesMap(final Configuration conf, private static void getSnapshotFilesMap(final Configuration conf,
final SnapshotDescription snapshot, final ExecutorService exec, final SnapshotDescription snapshot, final ExecutorService exec,

View File

@ -140,14 +140,12 @@ public abstract class HBaseCluster implements Closeable, Configurable {
/** /**
* Stops the given region server, by attempting a gradual stop. * Stops the given region server, by attempting a gradual stop.
* @return whether the operation finished with success
* @throws IOException if something goes wrong * @throws IOException if something goes wrong
*/ */
public abstract void stopRegionServer(ServerName serverName) throws IOException; public abstract void stopRegionServer(ServerName serverName) throws IOException;
/** /**
* Wait for the specified region server to join the cluster * 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 * @throws IOException if something goes wrong or timeout occurs
*/ */
public void waitForRegionServerToStart(String hostname, int port, long timeout) public void waitForRegionServerToStart(String hostname, int port, long timeout)
@ -167,7 +165,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
/** /**
* Wait for the specified region server to stop the thread / process. * 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 * @throws IOException if something goes wrong or timeout occurs
*/ */
public abstract void waitForRegionServerToStop(ServerName serverName, long timeout) public abstract void waitForRegionServerToStop(ServerName serverName, long timeout)
@ -197,7 +194,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
/** /**
* Wait for the specified zookeeper node to join the cluster * 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 * @throws IOException if something goes wrong or timeout occurs
*/ */
public abstract void waitForZkNodeToStart(ServerName serverName, long timeout) public abstract void waitForZkNodeToStart(ServerName serverName, long timeout)
@ -205,7 +201,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
/** /**
* Wait for the specified zookeeper node to stop the thread / process. * 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 * @throws IOException if something goes wrong or timeout occurs
*/ */
public abstract void waitForZkNodeToStop(ServerName serverName, long timeout) public abstract void waitForZkNodeToStop(ServerName serverName, long timeout)
@ -234,7 +229,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
/** /**
* Wait for the specified datanode to join the cluster * 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 * @throws IOException if something goes wrong or timeout occurs
*/ */
public abstract void waitForDataNodeToStart(ServerName serverName, long timeout) public abstract void waitForDataNodeToStart(ServerName serverName, long timeout)
@ -242,7 +236,6 @@ public abstract class HBaseCluster implements Closeable, Configurable {
/** /**
* Wait for the specified datanode to stop the thread / process. * 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 * @throws IOException if something goes wrong or timeout occurs
*/ */
public abstract void waitForDataNodeToStop(ServerName serverName, long timeout) public abstract void waitForDataNodeToStop(ServerName serverName, long timeout)
@ -252,7 +245,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 new master on the given hostname or if this is a mini/local cluster,
* starts a master locally. * starts a master locally.
* @param hostname the hostname to start the master on * @param hostname the hostname to start the master on
* @return whether the operation finished with success
* @throws IOException if something goes wrong * @throws IOException if something goes wrong
*/ */
public abstract void startMaster(String hostname, int port) throws IOException; public abstract void startMaster(String hostname, int port) throws IOException;

View File

@ -3518,7 +3518,7 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
* @param startKey * @param startKey
* @param endKey * @param endKey
* @param numRegions the number of regions to be created. it has to be greater than 3. * @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){ public byte[][] getRegionSplitStartKeys(byte[] startKey, byte[] endKey, int numRegions){
assertTrue(numRegions>3); assertTrue(numRegions>3);

View File

@ -109,12 +109,12 @@ public class TestServerSideScanMetricsFromClientSide {
/** /**
* Make puts to put the input value into each combination of row, family, and qualifier * Make puts to put the input value into each combination of row, family, and qualifier
* @param rows * @param rows the rows to use
* @param families * @param families the column families to use
* @param qualifiers * @param qualifiers the column qualifiers to use
* @param value * @param value the value to put
* @return * @return the putted input values added in puts
* @throws IOException * @throws IOException If an IO problem is encountered
*/ */
static ArrayList<Put> createPuts(byte[][] rows, byte[][] families, byte[][] qualifiers, static ArrayList<Put> createPuts(byte[][] rows, byte[][] families, byte[][] qualifiers,
byte[] value) throws IOException { byte[] value) throws IOException {
@ -139,7 +139,7 @@ public class TestServerSideScanMetricsFromClientSide {
* @return The approximate heap size of a cell in the test table. All cells should have * @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 * approximately the same heap size, so the value is cached to avoid repeating the
* calculation * calculation
* @throws Exception * @throws Exception on unexpected failure
*/ */
private long getCellHeapSize() throws Exception { private long getCellHeapSize() throws Exception {
if (CELL_HEAP_SIZE == -1) { if (CELL_HEAP_SIZE == -1) {
@ -323,11 +323,11 @@ public class TestServerSideScanMetricsFromClientSide {
} }
/** /**
* Run the scan to completetion and check the metric against the specified value * Run the scan to completion and check the metric against the specified value
* @param scan * @param scan The scan instance to use to record metrics
* @param metricKey * @param metricKey The metric key name
* @param expectedValue * @param expectedValue The expected value of metric
* @throws Exception * @throws Exception on unexpected failure
*/ */
public void testMetric(Scan scan, String metricKey, long expectedValue) throws Exception { public void testMetric(Scan scan, String metricKey, long expectedValue) throws Exception {
assertTrue("Scan should be configured to record metrics", scan.isScanMetricsEnabled()); assertTrue("Scan should be configured to record metrics", scan.isScanMetricsEnabled());

View File

@ -94,9 +94,8 @@ public class TestOpenTableInCoprocessor {
public static class CustomThreadPoolCoprocessor implements RegionCoprocessor, RegionObserver { public static class CustomThreadPoolCoprocessor implements RegionCoprocessor, RegionObserver {
/** /**
* Get a pool that has only ever one thread. A second action added to the pool (running * @return a pool that has one thread only at every time. A second action added to the pool (
* concurrently), will cause an exception. * running concurrently), will cause an exception.
* @return
*/ */
private ExecutorService getPool() { private ExecutorService getPool() {
int maxThreads = 1; int maxThreads = 1;

View File

@ -78,10 +78,9 @@ public class RandomKeyValueUtil {
* increases. The result consists of a prefix, which is a deterministic * increases. The result consists of a prefix, which is a deterministic
* increasing function of i, and a random suffix. * increasing function of i, and a random suffix.
* *
* @param rand * @param rand random number generator to use
* random number generator to use
* @param i * @param i
* @return * @return the random key
*/ */
public static byte[] randomOrderedKey(Random rand, int i) { public static byte[] randomOrderedKey(Random rand, int i) {
StringBuilder k = new StringBuilder(); StringBuilder k = new StringBuilder();

View File

@ -301,7 +301,7 @@ public class TestRegionPlacement {
* @param plan The assignment plan * @param plan The assignment plan
* @param p1 The first switch position * @param p1 The first switch position
* @param p2 The second switch position * @param p2 The second switch position
* @return * @return the shuffled assignment plan
*/ */
private FavoredNodesPlan shuffleAssignmentPlan(FavoredNodesPlan plan, private FavoredNodesPlan shuffleAssignmentPlan(FavoredNodesPlan plan,
FavoredNodesPlan.Position p1, FavoredNodesPlan.Position p2) throws IOException { FavoredNodesPlan.Position p1, FavoredNodesPlan.Position p2) throws IOException {

View File

@ -328,7 +328,7 @@ public class BalancerTestBase {
* *
* @param list * @param list
* @param plans * @param plans
* @return * @return a list of all added {@link ServerAndLoad} values.
*/ */
protected List<ServerAndLoad> reconcile(List<ServerAndLoad> list, protected List<ServerAndLoad> reconcile(List<ServerAndLoad> list,
List<RegionPlan> plans, List<RegionPlan> plans,

View File

@ -792,7 +792,7 @@ public class TestHStore {
* @param numRows * @param numRows
* @param qualifier * @param qualifier
* @param family * @param family
* @return * @return the rows key-value list
*/ */
List<Cell> getKeyValueSet(long[] timestamps, int numRows, List<Cell> getKeyValueSet(long[] timestamps, int numRows,
byte[] qualifier, byte[] family) { byte[] qualifier, byte[] family) {

View File

@ -843,7 +843,7 @@ public class TestHStoreFile extends HBaseTestCase {
* @param numRows * @param numRows
* @param qualifier * @param qualifier
* @param family * @param family
* @return * @return the rows key-value list
*/ */
List<KeyValue> getKeyValueSet(long[] timestamps, int numRows, List<KeyValue> getKeyValueSet(long[] timestamps, int numRows,
byte[] qualifier, byte[] family) { byte[] qualifier, byte[] family) {

View File

@ -130,7 +130,6 @@ public class TestMobStoreScanner {
* *
* @param reversed if true, scan will be backward order * @param reversed if true, scan will be backward order
* @param mobScanRaw if true, scan will get the mob reference * @param mobScanRaw if true, scan will get the mob reference
* @return this
*/ */
public void setScan(Scan scan, boolean reversed, boolean mobScanRaw) { public void setScan(Scan scan, boolean reversed, boolean mobScanRaw) {
scan.setReversed(reversed); scan.setReversed(reversed);

View File

@ -320,7 +320,8 @@ public abstract class MultiThreadedAction {
* @param verifyCfAndColumnIntegrity verify that cf/column set in the result is complete. Note * @param verifyCfAndColumnIntegrity verify that cf/column set in the result is complete. Note
* that to use this multiPut should be used, or verification * that to use this multiPut should be used, or verification
* has to happen after writes, otherwise there can be races. * 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, public boolean verifyResultAgainstDataGenerator(Result result, boolean verifyValues,
boolean verifyCfAndColumnIntegrity) { boolean verifyCfAndColumnIntegrity) {

View File

@ -165,8 +165,7 @@ public abstract class LoadTestDataGenerator {
} }
/** /**
* Return the arguments passed to the generator as list of object * @return the arguments passed to the generator as a list of objects.
* @return
*/ */
public String[] getArgs() { public String[] getArgs() {
return this.args; return this.args;

View File

@ -124,7 +124,7 @@ public class MiniZooKeeperCluster {
* Selects a ZK client port. * Selects a ZK client port.
* *
* @param seedPort the seed port to start with; -1 means first time. * @param seedPort the seed port to start with; -1 means first time.
* @Returns a valid and unused client port * @return a valid and unused client port
*/ */
private int selectClientPort(int seedPort) { private int selectClientPort(int seedPort) {
int i; int i;