diff --git a/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/AsyncFSOutput.java b/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/AsyncFSOutput.java index b88b32bdb81..cd186f904a9 100644 --- a/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/AsyncFSOutput.java +++ b/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/AsyncFSOutput.java @@ -89,8 +89,6 @@ public interface AsyncFSOutput extends Closeable { @Override void close() throws IOException; - /** - * @return byteSize success synced to underlying filesystem. - */ + /** Returns byteSize success synced to underlying filesystem. */ long getSyncedLength(); } diff --git a/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/util/RecoverLeaseFSUtils.java b/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/util/RecoverLeaseFSUtils.java index e4a410aa9c3..0014185b85c 100644 --- a/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/util/RecoverLeaseFSUtils.java +++ b/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/util/RecoverLeaseFSUtils.java @@ -186,9 +186,7 @@ public final class RecoverLeaseFSUtils { return recovered; } - /** - * @return Detail to append to any log message around lease recovering. - */ + /** Returns Detail to append to any log message around lease recovering. */ private static String getLogMessageDetail(final int nbAttempt, final Path p, final long startWaiting) { return "attempt=" + nbAttempt + " on file=" + p + " after " diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterId.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterId.java index e769e80847f..9b7a5de19bd 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterId.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterId.java @@ -45,9 +45,7 @@ public class ClusterId { this.id = uuid; } - /** - * @return The clusterid serialized using pb w/ pb magic prefix - */ + /** Returns The clusterid serialized using pb w/ pb magic prefix */ public byte[] toByteArray() { return ProtobufUtil.prependPBMagic(convert().toByteArray()); } @@ -74,9 +72,7 @@ public class ClusterId { } } - /** - * @return A pb instance to represent this instance. - */ + /** Returns A pb instance to represent this instance. */ public ClusterIdProtos.ClusterId convert() { ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder(); return builder.setClusterId(this.id).build(); diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterMetrics.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterMetrics.java index 769d48496af..8be97fa1fda 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterMetrics.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterMetrics.java @@ -69,33 +69,23 @@ import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Public public interface ClusterMetrics { - /** - * @return the HBase version string as reported by the HMaster - */ + /** Returns the HBase version string as reported by the HMaster */ @Nullable String getHBaseVersion(); - /** - * @return the names of region servers on the dead list - */ + /** Returns the names of region servers on the dead list */ List getDeadServerNames(); - /** - * @return the names of region servers on the live list - */ + /** Returns the names of region servers on the live list */ Map getLiveServerMetrics(); - /** - * @return the number of regions deployed on the cluster - */ + /** Returns the number of regions deployed on the cluster */ default int getRegionCount() { return getLiveServerMetrics().entrySet().stream() .mapToInt(v -> v.getValue().getRegionMetrics().size()).sum(); } - /** - * @return the number of requests since last report - */ + /** Returns the number of requests since last report */ default long getRequestCount() { return getLiveServerMetrics().entrySet().stream() .flatMap(v -> v.getValue().getRegionMetrics().values().stream()) @@ -109,9 +99,7 @@ public interface ClusterMetrics { @Nullable ServerName getMasterName(); - /** - * @return the names of backup masters - */ + /** Returns the names of backup masters */ List getBackupMasterNames(); @InterfaceAudience.Private @@ -142,9 +130,7 @@ public interface ClusterMetrics { List getServersName(); - /** - * @return the average cluster load - */ + /** Returns the average cluster load */ default double getAverageLoad() { int serverSize = getLiveServerMetrics().size(); if (serverSize == 0) { diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java index b202f0ec43e..e218437694b 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java @@ -107,9 +107,7 @@ public class ClusterStatus implements ClusterMetrics { this.metrics = metrics; } - /** - * @return the names of region servers on the dead list - */ + /** Returns the names of region servers on the dead list */ @Override public List getDeadServerNames() { return metrics.getDeadServerNames(); @@ -187,9 +185,7 @@ public class ClusterStatus implements ClusterMetrics { return metrics.getRegionStatesInTransition(); } - /** - * @return the HBase version string as reported by the HMaster - */ + /** Returns the HBase version string as reported by the HMaster */ public String getHBaseVersion() { return metrics.getHBaseVersion(); } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/CoprocessorEnvironment.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/CoprocessorEnvironment.java index edbc5f479d6..94909f1c14e 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/CoprocessorEnvironment.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/CoprocessorEnvironment.java @@ -28,19 +28,19 @@ import org.apache.yetus.audience.InterfaceStability; @InterfaceStability.Evolving public interface CoprocessorEnvironment { - /** @return the Coprocessor interface version */ + /** Returns the Coprocessor interface version */ int getVersion(); - /** @return the HBase version as a string (e.g. "0.21.0") */ + /** Returns the HBase version as a string (e.g. "0.21.0") */ String getHBaseVersion(); - /** @return the loaded coprocessor instance */ + /** Returns the loaded coprocessor instance */ C getInstance(); - /** @return the priority assigned to the loaded coprocessor */ + /** Returns the priority assigned to the loaded coprocessor */ int getPriority(); - /** @return the load sequence number */ + /** Returns the load sequence number */ int getLoadSequence(); /** @@ -49,8 +49,6 @@ public interface CoprocessorEnvironment { */ Configuration getConfiguration(); - /** - * @return the classloader for the loaded coprocessor instance - */ + /** Returns the classloader for the loaded coprocessor instance */ ClassLoader getClassLoader(); } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/HBaseServerException.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/HBaseServerException.java index 2e4ebbd0baa..3484995c1bf 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HBaseServerException.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HBaseServerException.java @@ -63,9 +63,7 @@ public class HBaseServerException extends HBaseIOException { this.serverOverloaded = serverOverloaded; } - /** - * @return True if server was considered overloaded when exception was thrown - */ + /** Returns True if server was considered overloaded when exception was thrown */ public boolean isServerOverloaded() { return serverOverloaded; } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java index 4694afbb0b1..d55b417d482 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java @@ -193,17 +193,13 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable= 0 && (Bytes.compareTo(row, endKey) < 0 || Bytes.equals(endKey, HConstants.EMPTY_BYTE_ARRAY)); } - /** - * @return true if this region is from hbase:meta - */ + /** Returns true if this region is from hbase:meta */ public boolean isMetaTable() { return isMetaRegion(); } - /** - * @return true if this region is a meta region - */ + /** Returns true if this region is a meta region */ @Override public boolean isMetaRegion() { return tableName.equals(HRegionInfo.FIRST_META_REGIONINFO.getTable()); } - /** - * @return true if this region is from a system table - */ + /** Returns true if this region is from a system table */ public boolean isSystemTable() { return tableName.isSystemTable(); } - /** - * @return true if has been split and has daughters. - */ + /** Returns true if has been split and has daughters. */ @Override public boolean isSplit() { return this.split; @@ -570,9 +552,7 @@ public class HRegionInfo implements RegionInfo { this.split = split; } - /** - * @return true if this region is offline. - */ + /** Returns true if this region is offline. */ @Override public boolean isOffline() { return this.offLine; @@ -587,9 +567,7 @@ public class HRegionInfo implements RegionInfo { this.offLine = offLine; } - /** - * @return true if this is a split parent region. - */ + /** Returns true if this is a split parent region. */ @Override public boolean isSplitParent() { if (!isSplit()) return false; diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java index bdaad3beafe..6c8ea810d03 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java @@ -160,9 +160,7 @@ public class HTableDescriptor implements TableDescriptor, Comparable getValues() { return delegatee.getValues(); @@ -525,9 +523,7 @@ public class HTableDescriptor implements TableDescriptor, Comparablecell matches the regex 'info:merge.*'. - */ + /** Returns True if the column in cell matches the regex 'info:merge.*'. */ private static boolean isMergeQualifierPrefix(Cell cell) { // Check to see if has family and that qualifier starts with the merge qualifier 'merge' return CellUtil.matchingFamily(cell, HConstants.CATALOG_FAMILY) @@ -825,9 +821,7 @@ public class MetaTableAccessor { } } - /** - * @return Get closest metatable region row to passed row - */ + /** Returns Get closest metatable region row to passed row */ @NonNull private static RegionInfo getClosestRegionInfo(Connection connection, @NonNull final TableName tableName, @NonNull final byte[] row) throws IOException { @@ -1228,9 +1222,7 @@ public class MetaTableAccessor { abstract void add(Result r); - /** - * @return Collected results; wait till visits complete to collect all possible results - */ + /** Returns Collected results; wait till visits complete to collect all possible results */ List getResults() { return this.results; } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLoad.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLoad.java index 6184940313d..0a762bf78a6 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLoad.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLoad.java @@ -332,9 +332,7 @@ public class RegionLoad implements RegionMetrics { return (int) metrics.getUncompressedStoreFileSize().get(Size.Unit.KILOBYTE); } - /** - * @return the data locality of region in the regionserver. - */ + /** Returns the data locality of region in the regionserver. */ @Override public float getDataLocality() { return metrics.getDataLocality(); @@ -355,9 +353,7 @@ public class RegionLoad implements RegionMetrics { return metrics.getLastMajorCompactionTimestamp(); } - /** - * @return the reference count for the stores of this region - */ + /** Returns the reference count for the stores of this region */ public int getStoreRefCount() { return metrics.getStoreRefCount(); } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionMetrics.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionMetrics.java index 73d036e7370..645a31a8552 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionMetrics.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionMetrics.java @@ -28,58 +28,38 @@ import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Public public interface RegionMetrics { - /** - * @return the region name - */ + /** Returns the region name */ byte[] getRegionName(); - /** - * @return the number of stores - */ + /** Returns the number of stores */ int getStoreCount(); - /** - * @return the number of storefiles - */ + /** Returns the number of storefiles */ int getStoreFileCount(); - /** - * @return the total size of the storefiles - */ + /** Returns the total size of the storefiles */ Size getStoreFileSize(); - /** - * @return the memstore size - */ + /** Returns the memstore size */ Size getMemStoreSize(); - /** - * @return the number of read requests made to region - */ + /** Returns the number of read requests made to region */ long getReadRequestCount(); - /** - * @return the number of write requests made to region - */ + /** Returns the number of write requests made to region */ long getWriteRequestCount(); - /** - * @return the number of write requests and read requests made to region - */ + /** Returns the number of write requests and read requests made to region */ default long getRequestCount() { return getReadRequestCount() + getWriteRequestCount(); } - /** - * @return the region name as a string - */ + /** Returns the region name as a string */ default String getNameAsString() { return Bytes.toStringBinary(getRegionName()); } - /** - * @return the number of filtered read requests made to region - */ + /** Returns the number of filtered read requests made to region */ long getFilteredReadRequestCount(); /** @@ -90,29 +70,19 @@ public interface RegionMetrics { */ Size getStoreFileIndexSize(); - /** - * @return The current total size of root-level indexes for the region - */ + /** Returns The current total size of root-level indexes for the region */ Size getStoreFileRootLevelIndexSize(); - /** - * @return The total size of all index blocks, not just the root level - */ + /** Returns The total size of all index blocks, not just the root level */ Size getStoreFileUncompressedDataIndexSize(); - /** - * @return The total size of all Bloom filter blocks, not just loaded into the block cache - */ + /** Returns The total size of all Bloom filter blocks, not just loaded into the block cache */ Size getBloomFilterSize(); - /** - * @return the total number of cells in current compaction - */ + /** Returns the total number of cells in current compaction */ long getCompactingCellCount(); - /** - * @return the number of already compacted kvs in current compaction - */ + /** Returns the number of already compacted kvs in current compaction */ long getCompactedCellCount(); /** @@ -121,29 +91,19 @@ public interface RegionMetrics { */ long getCompletedSequenceId(); - /** - * @return completed sequence id per store. - */ + /** Returns completed sequence id per store. */ Map getStoreSequenceId(); - /** - * @return the uncompressed size of the storefiles - */ + /** Returns the uncompressed size of the storefiles */ Size getUncompressedStoreFileSize(); - /** - * @return the data locality of region in the regionserver. - */ + /** Returns the data locality of region in the regionserver. */ float getDataLocality(); - /** - * @return the timestamp of the oldest hfile for any store of this region. - */ + /** Returns the timestamp of the oldest hfile for any store of this region. */ long getLastMajorCompactionTimestamp(); - /** - * @return the reference count for the stores of this region - */ + /** Returns the reference count for the stores of this region */ int getStoreRefCount(); /** @@ -158,9 +118,7 @@ public interface RegionMetrics { */ float getDataLocalityForSsd(); - /** - * @return the data at local weight of this region in the regionserver - */ + /** Returns the data at local weight of this region in the regionserver */ long getBlocksLocalWeight(); /** @@ -169,13 +127,9 @@ public interface RegionMetrics { */ long getBlocksLocalWithSsdWeight(); - /** - * @return the block total weight of this region - */ + /** Returns the block total weight of this region */ long getBlocksTotalWeight(); - /** - * @return the compaction state of this region - */ + /** Returns the compaction state of this region */ CompactionState getCompactionState(); } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerMetrics.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerMetrics.java index 46678ac2460..5cf190c04f9 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerMetrics.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerMetrics.java @@ -33,38 +33,26 @@ public interface ServerMetrics { ServerName getServerName(); - /** - * @return the version number of a regionserver. - */ + /** Returns the version number of a regionserver. */ default int getVersionNumber() { return 0; } - /** - * @return the string type version of a regionserver. - */ + /** Returns the string type version of a regionserver. */ default String getVersion() { return "0.0.0"; } - /** - * @return the number of requests per second. - */ + /** Returns the number of requests per second. */ long getRequestCountPerSecond(); - /** - * @return total Number of requests from the start of the region server. - */ + /** Returns total Number of requests from the start of the region server. */ long getRequestCount(); - /** - * @return the amount of used heap - */ + /** Returns the amount of used heap */ Size getUsedHeapSize(); - /** - * @return the maximum allowable size of the heap - */ + /** Returns the maximum allowable size of the heap */ Size getMaxHeapSize(); int getInfoServerPort(); @@ -87,14 +75,10 @@ public interface ServerMetrics { @Nullable ReplicationLoadSink getReplicationLoadSink(); - /** - * @return region load metrics - */ + /** Returns region load metrics */ Map getRegionMetrics(); - /** - * @return metrics per user - */ + /** Returns metrics per user */ Map getUserMetrics(); /** @@ -103,14 +87,10 @@ public interface ServerMetrics { */ Set getCoprocessorNames(); - /** - * @return the timestamp (server side) of generating this metrics - */ + /** Returns the timestamp (server side) of generating this metrics */ long getReportTimestamp(); - /** - * @return the last timestamp (server side) of generating this metrics - */ + /** Returns the last timestamp (server side) of generating this metrics */ long getLastReportTimestamp(); /** diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/Size.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/Size.java index c248849e363..99062635f77 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/Size.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/Size.java @@ -69,9 +69,7 @@ public final class Size implements Comparable { this.unit = Preconditions.checkNotNull(unit); } - /** - * @return size unit - */ + /** Returns size unit */ public Unit getUnit() { return unit; } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/UserMetrics.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/UserMetrics.java index 2710aa9be27..05108c70e74 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/UserMetrics.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/UserMetrics.java @@ -40,19 +40,13 @@ public interface UserMetrics { long getFilteredReadRequestsCount(); } - /** - * @return the user name - */ + /** Returns the user name */ byte[] getUserName(); - /** - * @return the number of read requests made by user - */ + /** Returns the number of read requests made by user */ long getReadRequestCount(); - /** - * @return the number of write requests made by user - */ + /** Returns the number of write requests made by user */ long getWriteRequestCount(); /** @@ -63,20 +57,14 @@ public interface UserMetrics { return getReadRequestCount() + getWriteRequestCount(); } - /** - * @return the user name as a string - */ + /** Returns the user name as a string */ default String getNameAsString() { return Bytes.toStringBinary(getUserName()); } - /** - * @return metrics per client(hostname) - */ + /** Returns metrics per client(hostname) */ Map getClientMetrics(); - /** - * @return count of filtered read requests for a user - */ + /** Returns count of filtered read requests for a user */ long getFilteredReadRequests(); } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java index d1bbdac45e8..e6e1cb693d5 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java @@ -112,9 +112,7 @@ public interface Admin extends Abortable, Closeable { @Override boolean isAborted(); - /** - * @return Connection used by this object. - */ + /** Returns Connection used by this object. */ Connection getConnection(); /** @@ -1710,9 +1708,7 @@ public interface Admin extends Abortable, Closeable { List getRegionMetrics(ServerName serverName, TableName tableName) throws IOException; - /** - * @return Configuration used by the instance. - */ + /** Returns Configuration used by the instance. */ Configuration getConfiguration(); /** diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java index c83bc76f56b..bf1a29196db 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java @@ -90,9 +90,7 @@ public class Append extends Mutation { return this; } - /** - * @return current setting for returnResults - */ + /** Returns current setting for returnResults */ // This method makes public the superclasses's protected method. @Override public boolean isReturnResults() { diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java index a47ca261e03..2d6d499042e 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java @@ -1051,34 +1051,24 @@ public interface AsyncAdmin { CompletableFuture recommissionRegionServer(ServerName server, List encodedRegionNames); - /** - * @return cluster status wrapped by {@link CompletableFuture} - */ + /** Returns cluster status wrapped by {@link CompletableFuture} */ CompletableFuture getClusterMetrics(); - /** - * @return cluster status wrapped by {@link CompletableFuture} - */ + /** Returns cluster status wrapped by {@link CompletableFuture} */ CompletableFuture getClusterMetrics(EnumSet