HBASE-27220 Apply the spotless format change in HBASE-27208 to our code base

Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
Duo Zhang 2022-07-19 10:00:23 +08:00
parent 1c56b5fad5
commit 99f2ab5aa8
410 changed files with 1260 additions and 3464 deletions

View File

@ -89,8 +89,6 @@ public interface AsyncFSOutput extends Closeable {
@Override @Override
void close() throws IOException; void close() throws IOException;
/** /** Returns byteSize success synced to underlying filesystem. */
* @return byteSize success synced to underlying filesystem.
*/
long getSyncedLength(); long getSyncedLength();
} }

View File

@ -186,9 +186,7 @@ public final class RecoverLeaseFSUtils {
return recovered; return recovered;
} }
/** /** Returns Detail to append to any log message around lease recovering. */
* @return Detail to append to any log message around lease recovering.
*/
private static String getLogMessageDetail(final int nbAttempt, final Path p, private static String getLogMessageDetail(final int nbAttempt, final Path p,
final long startWaiting) { final long startWaiting) {
return "attempt=" + nbAttempt + " on file=" + p + " after " return "attempt=" + nbAttempt + " on file=" + p + " after "

View File

@ -45,9 +45,7 @@ public class ClusterId {
this.id = uuid; this.id = uuid;
} }
/** /** Returns The clusterid serialized using pb w/ pb magic prefix */
* @return The clusterid serialized using pb w/ pb magic prefix
*/
public byte[] toByteArray() { public byte[] toByteArray() {
return ProtobufUtil.prependPBMagic(convert().toByteArray()); return ProtobufUtil.prependPBMagic(convert().toByteArray());
} }
@ -74,9 +72,7 @@ public class ClusterId {
} }
} }
/** /** Returns A pb instance to represent this instance. */
* @return A pb instance to represent this instance.
*/
public ClusterIdProtos.ClusterId convert() { public ClusterIdProtos.ClusterId convert() {
ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder(); ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
return builder.setClusterId(this.id).build(); return builder.setClusterId(this.id).build();

View File

@ -69,33 +69,23 @@ import org.apache.yetus.audience.InterfaceAudience;
@InterfaceAudience.Public @InterfaceAudience.Public
public interface ClusterMetrics { public interface ClusterMetrics {
/** /** Returns the HBase version string as reported by the HMaster */
* @return the HBase version string as reported by the HMaster
*/
@Nullable @Nullable
String getHBaseVersion(); String getHBaseVersion();
/** /** Returns the names of region servers on the dead list */
* @return the names of region servers on the dead list
*/
List<ServerName> getDeadServerNames(); List<ServerName> getDeadServerNames();
/** /** Returns the names of region servers on the live list */
* @return the names of region servers on the live list
*/
Map<ServerName, ServerMetrics> getLiveServerMetrics(); Map<ServerName, ServerMetrics> getLiveServerMetrics();
/** /** Returns the number of regions deployed on the cluster */
* @return the number of regions deployed on the cluster
*/
default int getRegionCount() { default int getRegionCount() {
return getLiveServerMetrics().entrySet().stream() return getLiveServerMetrics().entrySet().stream()
.mapToInt(v -> v.getValue().getRegionMetrics().size()).sum(); .mapToInt(v -> v.getValue().getRegionMetrics().size()).sum();
} }
/** /** Returns the number of requests since last report */
* @return the number of requests since last report
*/
default long getRequestCount() { default long getRequestCount() {
return getLiveServerMetrics().entrySet().stream() return getLiveServerMetrics().entrySet().stream()
.flatMap(v -> v.getValue().getRegionMetrics().values().stream()) .flatMap(v -> v.getValue().getRegionMetrics().values().stream())
@ -109,9 +99,7 @@ public interface ClusterMetrics {
@Nullable @Nullable
ServerName getMasterName(); ServerName getMasterName();
/** /** Returns the names of backup masters */
* @return the names of backup masters
*/
List<ServerName> getBackupMasterNames(); List<ServerName> getBackupMasterNames();
@InterfaceAudience.Private @InterfaceAudience.Private
@ -142,9 +130,7 @@ public interface ClusterMetrics {
List<ServerName> getServersName(); List<ServerName> getServersName();
/** /** Returns the average cluster load */
* @return the average cluster load
*/
default double getAverageLoad() { default double getAverageLoad() {
int serverSize = getLiveServerMetrics().size(); int serverSize = getLiveServerMetrics().size();
if (serverSize == 0) { if (serverSize == 0) {

View File

@ -107,9 +107,7 @@ public class ClusterStatus implements ClusterMetrics {
this.metrics = metrics; this.metrics = metrics;
} }
/** /** Returns the names of region servers on the dead list */
* @return the names of region servers on the dead list
*/
@Override @Override
public List<ServerName> getDeadServerNames() { public List<ServerName> getDeadServerNames() {
return metrics.getDeadServerNames(); return metrics.getDeadServerNames();
@ -187,9 +185,7 @@ public class ClusterStatus implements ClusterMetrics {
return metrics.getRegionStatesInTransition(); return metrics.getRegionStatesInTransition();
} }
/** /** Returns the HBase version string as reported by the HMaster */
* @return the HBase version string as reported by the HMaster
*/
public String getHBaseVersion() { public String getHBaseVersion() {
return metrics.getHBaseVersion(); return metrics.getHBaseVersion();
} }

View File

@ -28,19 +28,19 @@ import org.apache.yetus.audience.InterfaceStability;
@InterfaceStability.Evolving @InterfaceStability.Evolving
public interface CoprocessorEnvironment<C extends Coprocessor> { public interface CoprocessorEnvironment<C extends Coprocessor> {
/** @return the Coprocessor interface version */ /** Returns the Coprocessor interface version */
int getVersion(); 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(); String getHBaseVersion();
/** @return the loaded coprocessor instance */ /** Returns the loaded coprocessor instance */
C getInstance(); C getInstance();
/** @return the priority assigned to the loaded coprocessor */ /** Returns the priority assigned to the loaded coprocessor */
int getPriority(); int getPriority();
/** @return the load sequence number */ /** Returns the load sequence number */
int getLoadSequence(); int getLoadSequence();
/** /**
@ -49,8 +49,6 @@ public interface CoprocessorEnvironment<C extends Coprocessor> {
*/ */
Configuration getConfiguration(); Configuration getConfiguration();
/** /** Returns the classloader for the loaded coprocessor instance */
* @return the classloader for the loaded coprocessor instance
*/
ClassLoader getClassLoader(); ClassLoader getClassLoader();
} }

View File

@ -63,9 +63,7 @@ public class HBaseServerException extends HBaseIOException {
this.serverOverloaded = serverOverloaded; this.serverOverloaded = serverOverloaded;
} }
/** /** Returns True if server was considered overloaded when exception was thrown */
* @return True if server was considered overloaded when exception was thrown
*/
public boolean isServerOverloaded() { public boolean isServerOverloaded() {
return serverOverloaded; return serverOverloaded;
} }

View File

@ -193,17 +193,13 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
return ColumnFamilyDescriptorBuilder.isLegalColumnFamilyName(b); return ColumnFamilyDescriptorBuilder.isLegalColumnFamilyName(b);
} }
/** /** Returns Name of this column family */
* @return Name of this column family
*/
@Override @Override
public byte[] getName() { public byte[] getName() {
return delegatee.getName(); return delegatee.getName();
} }
/** /** Returns The name string of this column family */
* @return The name string of this column family
*/
@Override @Override
public String getNameAsString() { public String getNameAsString() {
return delegatee.getNameAsString(); return delegatee.getNameAsString();
@ -650,9 +646,7 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
return delegatee.toString(); return delegatee.toString();
} }
/** /** Returns Column family descriptor with only the customized attributes. */
* @return Column family descriptor with only the customized attributes.
*/
@Override @Override
public String toStringCustomizedValues() { public String toStringCustomizedValues() {
return delegatee.toStringCustomizedValues(); return delegatee.toStringCustomizedValues();

View File

@ -104,7 +104,7 @@ public class HRegionInfo implements RegionInfo {
} }
/** /**
* @return Return a short, printable name for this region (usually encoded name) for us logging. * Returns Return a short, printable name for this region (usually encoded name) for us logging.
*/ */
@Override @Override
public String getShortNameToLog() { public String getShortNameToLog() {
@ -425,7 +425,7 @@ public class HRegionInfo implements RegionInfo {
return RegionInfo.isEncodedRegionName(regionName); return RegionInfo.isEncodedRegionName(regionName);
} }
/** @return the regionId */ /** Returns the regionId */
@Override @Override
public long getRegionId() { public long getRegionId() {
return regionId; return regionId;
@ -440,9 +440,7 @@ public class HRegionInfo implements RegionInfo {
return regionName; return regionName;
} }
/** /** Returns Region name as a String for use in logging, etc. */
* @return Region name as a String for use in logging, etc.
*/
@Override @Override
public String getRegionNameAsString() { public String getRegionNameAsString() {
if (RegionInfo.hasEncodedName(this.regionName)) { if (RegionInfo.hasEncodedName(this.regionName)) {
@ -456,9 +454,7 @@ public class HRegionInfo implements RegionInfo {
return Bytes.toStringBinary(this.regionName) + "." + this.getEncodedName(); return Bytes.toStringBinary(this.regionName) + "." + this.getEncodedName();
} }
/** /** Returns the encoded region name */
* @return the encoded region name
*/
@Override @Override
public synchronized String getEncodedName() { public synchronized String getEncodedName() {
if (this.encodedName == null) { if (this.encodedName == null) {
@ -475,17 +471,13 @@ public class HRegionInfo implements RegionInfo {
return this.encodedNameAsBytes; return this.encodedNameAsBytes;
} }
/** /** Returns the startKey */
* @return the startKey
*/
@Override @Override
public byte[] getStartKey() { public byte[] getStartKey() {
return startKey; return startKey;
} }
/** /** Returns the endKey */
* @return the endKey
*/
@Override @Override
public byte[] getEndKey() { public byte[] getEndKey() {
return endKey; return endKey;
@ -524,40 +516,30 @@ public class HRegionInfo implements RegionInfo {
return firstKeyInRange && lastKeyInRange; return firstKeyInRange && lastKeyInRange;
} }
/** /** Returns true if the given row falls in this region. */
* @return true if the given row falls in this region.
*/
@Override @Override
public boolean containsRow(byte[] row) { public boolean containsRow(byte[] row) {
return Bytes.compareTo(row, startKey) >= 0 return Bytes.compareTo(row, startKey) >= 0
&& (Bytes.compareTo(row, endKey) < 0 || Bytes.equals(endKey, HConstants.EMPTY_BYTE_ARRAY)); && (Bytes.compareTo(row, endKey) < 0 || Bytes.equals(endKey, HConstants.EMPTY_BYTE_ARRAY));
} }
/** /** Returns true if this region is from hbase:meta */
* @return true if this region is from hbase:meta
*/
public boolean isMetaTable() { public boolean isMetaTable() {
return isMetaRegion(); return isMetaRegion();
} }
/** /** Returns true if this region is a meta region */
* @return true if this region is a meta region
*/
@Override @Override
public boolean isMetaRegion() { public boolean isMetaRegion() {
return tableName.equals(HRegionInfo.FIRST_META_REGIONINFO.getTable()); return tableName.equals(HRegionInfo.FIRST_META_REGIONINFO.getTable());
} }
/** /** Returns true if this region is from a system table */
* @return true if this region is from a system table
*/
public boolean isSystemTable() { public boolean isSystemTable() {
return tableName.isSystemTable(); return tableName.isSystemTable();
} }
/** /** Returns true if has been split and has daughters. */
* @return true if has been split and has daughters.
*/
@Override @Override
public boolean isSplit() { public boolean isSplit() {
return this.split; return this.split;
@ -570,9 +552,7 @@ public class HRegionInfo implements RegionInfo {
this.split = split; this.split = split;
} }
/** /** Returns true if this region is offline. */
* @return true if this region is offline.
*/
@Override @Override
public boolean isOffline() { public boolean isOffline() {
return this.offLine; return this.offLine;
@ -587,9 +567,7 @@ public class HRegionInfo implements RegionInfo {
this.offLine = offLine; this.offLine = offLine;
} }
/** /** Returns true if this is a split parent region. */
* @return true if this is a split parent region.
*/
@Override @Override
public boolean isSplitParent() { public boolean isSplitParent() {
if (!isSplit()) return false; if (!isSplit()) return false;

View File

@ -160,9 +160,7 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
return delegatee.isMetaTable(); return delegatee.isMetaTable();
} }
/** /** Returns Getter for fetching an unmodifiable map. */
* @return Getter for fetching an unmodifiable map.
*/
@Override @Override
public Map<Bytes, Bytes> getValues() { public Map<Bytes, Bytes> getValues() {
return delegatee.getValues(); return delegatee.getValues();
@ -525,9 +523,7 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
return delegatee.toStringCustomizedValues(); return delegatee.toStringCustomizedValues();
} }
/** /** Returns map of all table attributes formatted into string. */
* @return map of all table attributes formatted into string.
*/
public String toStringTableAttributes() { public String toStringTableAttributes() {
return delegatee.toStringTableAttributes(); return delegatee.toStringTableAttributes();
} }
@ -611,9 +607,7 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
return hasRegionMemStoreReplication(); return hasRegionMemStoreReplication();
} }
/** /** Returns true if the read-replicas memstore replication is enabled. */
* @return true if the read-replicas memstore replication is enabled.
*/
@Override @Override
public boolean hasRegionMemStoreReplication() { public boolean hasRegionMemStoreReplication() {
return delegatee.hasRegionMemStoreReplication(); return delegatee.hasRegionMemStoreReplication();

View File

@ -304,9 +304,7 @@ public class MetaTableAccessor {
regionInfo.getReplicaId()); regionInfo.getReplicaId());
} }
/** /** Returns Return the {@link HConstants#CATALOG_FAMILY} row from hbase:meta. */
* @return Return the {@link HConstants#CATALOG_FAMILY} row from hbase:meta.
*/
public static Result getCatalogFamilyRow(Connection connection, RegionInfo ri) public static Result getCatalogFamilyRow(Connection connection, RegionInfo ri)
throws IOException { throws IOException {
Get get = new Get(getMetaKeyForRegion(ri)); Get get = new Get(getMetaKeyForRegion(ri));
@ -433,9 +431,7 @@ public class MetaTableAccessor {
return false; return false;
} }
/** /** Returns True if the column in <code>cell</code> matches the regex 'info:merge.*'. */
* @return True if the column in <code>cell</code> matches the regex 'info:merge.*'.
*/
private static boolean isMergeQualifierPrefix(Cell cell) { private static boolean isMergeQualifierPrefix(Cell cell) {
// Check to see if has family and that qualifier starts with the merge qualifier 'merge' // Check to see if has family and that qualifier starts with the merge qualifier 'merge'
return CellUtil.matchingFamily(cell, HConstants.CATALOG_FAMILY) return CellUtil.matchingFamily(cell, HConstants.CATALOG_FAMILY)
@ -825,9 +821,7 @@ public class MetaTableAccessor {
} }
} }
/** /** Returns Get closest metatable region row to passed <code>row</code> */
* @return Get closest metatable region row to passed <code>row</code>
*/
@NonNull @NonNull
private static RegionInfo getClosestRegionInfo(Connection connection, private static RegionInfo getClosestRegionInfo(Connection connection,
@NonNull final TableName tableName, @NonNull final byte[] row) throws IOException { @NonNull final TableName tableName, @NonNull final byte[] row) throws IOException {
@ -1228,9 +1222,7 @@ public class MetaTableAccessor {
abstract void add(Result r); abstract void add(Result r);
/** /** Returns Collected results; wait till visits complete to collect all possible results */
* @return Collected results; wait till visits complete to collect all possible results
*/
List<T> getResults() { List<T> getResults() {
return this.results; return this.results;
} }

View File

@ -332,9 +332,7 @@ public class RegionLoad implements RegionMetrics {
return (int) metrics.getUncompressedStoreFileSize().get(Size.Unit.KILOBYTE); return (int) metrics.getUncompressedStoreFileSize().get(Size.Unit.KILOBYTE);
} }
/** /** Returns the data locality of region in the regionserver. */
* @return the data locality of region in the regionserver.
*/
@Override @Override
public float getDataLocality() { public float getDataLocality() {
return metrics.getDataLocality(); return metrics.getDataLocality();
@ -355,9 +353,7 @@ public class RegionLoad implements RegionMetrics {
return metrics.getLastMajorCompactionTimestamp(); return metrics.getLastMajorCompactionTimestamp();
} }
/** /** Returns the reference count for the stores of this region */
* @return the reference count for the stores of this region
*/
public int getStoreRefCount() { public int getStoreRefCount() {
return metrics.getStoreRefCount(); return metrics.getStoreRefCount();
} }

View File

@ -28,58 +28,38 @@ import org.apache.yetus.audience.InterfaceAudience;
@InterfaceAudience.Public @InterfaceAudience.Public
public interface RegionMetrics { public interface RegionMetrics {
/** /** Returns the region name */
* @return the region name
*/
byte[] getRegionName(); byte[] getRegionName();
/** /** Returns the number of stores */
* @return the number of stores
*/
int getStoreCount(); int getStoreCount();
/** /** Returns the number of storefiles */
* @return the number of storefiles
*/
int getStoreFileCount(); int getStoreFileCount();
/** /** Returns the total size of the storefiles */
* @return the total size of the storefiles
*/
Size getStoreFileSize(); Size getStoreFileSize();
/** /** Returns the memstore size */
* @return the memstore size
*/
Size getMemStoreSize(); Size getMemStoreSize();
/** /** Returns the number of read requests made to region */
* @return the number of read requests made to region
*/
long getReadRequestCount(); long getReadRequestCount();
/** /** Returns the number of write requests made to region */
* @return the number of write requests made to region
*/
long getWriteRequestCount(); long getWriteRequestCount();
/** /** Returns the number of write requests and read requests made to region */
* @return the number of write requests and read requests made to region
*/
default long getRequestCount() { default long getRequestCount() {
return getReadRequestCount() + getWriteRequestCount(); return getReadRequestCount() + getWriteRequestCount();
} }
/** /** Returns the region name as a string */
* @return the region name as a string
*/
default String getNameAsString() { default String getNameAsString() {
return Bytes.toStringBinary(getRegionName()); return Bytes.toStringBinary(getRegionName());
} }
/** /** Returns the number of filtered read requests made to region */
* @return the number of filtered read requests made to region
*/
long getFilteredReadRequestCount(); long getFilteredReadRequestCount();
/** /**
@ -90,29 +70,19 @@ public interface RegionMetrics {
*/ */
Size getStoreFileIndexSize(); Size getStoreFileIndexSize();
/** /** Returns The current total size of root-level indexes for the region */
* @return The current total size of root-level indexes for the region
*/
Size getStoreFileRootLevelIndexSize(); Size getStoreFileRootLevelIndexSize();
/** /** Returns The total size of all index blocks, not just the root level */
* @return The total size of all index blocks, not just the root level
*/
Size getStoreFileUncompressedDataIndexSize(); Size getStoreFileUncompressedDataIndexSize();
/** /** Returns The total size of all Bloom filter blocks, not just loaded into the block cache */
* @return The total size of all Bloom filter blocks, not just loaded into the block cache
*/
Size getBloomFilterSize(); Size getBloomFilterSize();
/** /** Returns the total number of cells in current compaction */
* @return the total number of cells in current compaction
*/
long getCompactingCellCount(); long getCompactingCellCount();
/** /** Returns the number of already compacted kvs in current compaction */
* @return the number of already compacted kvs in current compaction
*/
long getCompactedCellCount(); long getCompactedCellCount();
/** /**
@ -121,29 +91,19 @@ public interface RegionMetrics {
*/ */
long getCompletedSequenceId(); long getCompletedSequenceId();
/** /** Returns completed sequence id per store. */
* @return completed sequence id per store.
*/
Map<byte[], Long> getStoreSequenceId(); Map<byte[], Long> getStoreSequenceId();
/** /** Returns the uncompressed size of the storefiles */
* @return the uncompressed size of the storefiles
*/
Size getUncompressedStoreFileSize(); Size getUncompressedStoreFileSize();
/** /** Returns the data locality of region in the regionserver. */
* @return the data locality of region in the regionserver.
*/
float getDataLocality(); float getDataLocality();
/** /** Returns the timestamp of the oldest hfile for any store of this region. */
* @return the timestamp of the oldest hfile for any store of this region.
*/
long getLastMajorCompactionTimestamp(); long getLastMajorCompactionTimestamp();
/** /** Returns the reference count for the stores of this region */
* @return the reference count for the stores of this region
*/
int getStoreRefCount(); int getStoreRefCount();
/** /**
@ -158,9 +118,7 @@ public interface RegionMetrics {
*/ */
float getDataLocalityForSsd(); float getDataLocalityForSsd();
/** /** Returns the data at local weight of this region in the regionserver */
* @return the data at local weight of this region in the regionserver
*/
long getBlocksLocalWeight(); long getBlocksLocalWeight();
/** /**
@ -169,13 +127,9 @@ public interface RegionMetrics {
*/ */
long getBlocksLocalWithSsdWeight(); long getBlocksLocalWithSsdWeight();
/** /** Returns the block total weight of this region */
* @return the block total weight of this region
*/
long getBlocksTotalWeight(); long getBlocksTotalWeight();
/** /** Returns the compaction state of this region */
* @return the compaction state of this region
*/
CompactionState getCompactionState(); CompactionState getCompactionState();
} }

View File

@ -33,38 +33,26 @@ public interface ServerMetrics {
ServerName getServerName(); ServerName getServerName();
/** /** Returns the version number of a regionserver. */
* @return the version number of a regionserver.
*/
default int getVersionNumber() { default int getVersionNumber() {
return 0; return 0;
} }
/** /** Returns the string type version of a regionserver. */
* @return the string type version of a regionserver.
*/
default String getVersion() { default String getVersion() {
return "0.0.0"; return "0.0.0";
} }
/** /** Returns the number of requests per second. */
* @return the number of requests per second.
*/
long getRequestCountPerSecond(); long getRequestCountPerSecond();
/** /** Returns total Number of requests from the start of the region server. */
* @return total Number of requests from the start of the region server.
*/
long getRequestCount(); long getRequestCount();
/** /** Returns the amount of used heap */
* @return the amount of used heap
*/
Size getUsedHeapSize(); Size getUsedHeapSize();
/** /** Returns the maximum allowable size of the heap */
* @return the maximum allowable size of the heap
*/
Size getMaxHeapSize(); Size getMaxHeapSize();
int getInfoServerPort(); int getInfoServerPort();
@ -87,14 +75,10 @@ public interface ServerMetrics {
@Nullable @Nullable
ReplicationLoadSink getReplicationLoadSink(); ReplicationLoadSink getReplicationLoadSink();
/** /** Returns region load metrics */
* @return region load metrics
*/
Map<byte[], RegionMetrics> getRegionMetrics(); Map<byte[], RegionMetrics> getRegionMetrics();
/** /** Returns metrics per user */
* @return metrics per user
*/
Map<byte[], UserMetrics> getUserMetrics(); Map<byte[], UserMetrics> getUserMetrics();
/** /**
@ -103,14 +87,10 @@ public interface ServerMetrics {
*/ */
Set<String> getCoprocessorNames(); Set<String> getCoprocessorNames();
/** /** Returns the timestamp (server side) of generating this metrics */
* @return the timestamp (server side) of generating this metrics
*/
long getReportTimestamp(); long getReportTimestamp();
/** /** Returns the last timestamp (server side) of generating this metrics */
* @return the last timestamp (server side) of generating this metrics
*/
long getLastReportTimestamp(); long getLastReportTimestamp();
/** /**

View File

@ -69,9 +69,7 @@ public final class Size implements Comparable<Size> {
this.unit = Preconditions.checkNotNull(unit); this.unit = Preconditions.checkNotNull(unit);
} }
/** /** Returns size unit */
* @return size unit
*/
public Unit getUnit() { public Unit getUnit() {
return unit; return unit;
} }

View File

@ -40,19 +40,13 @@ public interface UserMetrics {
long getFilteredReadRequestsCount(); long getFilteredReadRequestsCount();
} }
/** /** Returns the user name */
* @return the user name
*/
byte[] getUserName(); byte[] getUserName();
/** /** Returns the number of read requests made by user */
* @return the number of read requests made by user
*/
long getReadRequestCount(); long getReadRequestCount();
/** /** Returns the number of write requests made by user */
* @return the number of write requests made by user
*/
long getWriteRequestCount(); long getWriteRequestCount();
/** /**
@ -63,20 +57,14 @@ public interface UserMetrics {
return getReadRequestCount() + getWriteRequestCount(); return getReadRequestCount() + getWriteRequestCount();
} }
/** /** Returns the user name as a string */
* @return the user name as a string
*/
default String getNameAsString() { default String getNameAsString() {
return Bytes.toStringBinary(getUserName()); return Bytes.toStringBinary(getUserName());
} }
/** /** Returns metrics per client(hostname) */
* @return metrics per client(hostname)
*/
Map<String, ClientMetrics> getClientMetrics(); Map<String, ClientMetrics> getClientMetrics();
/** /** Returns count of filtered read requests for a user */
* @return count of filtered read requests for a user
*/
long getFilteredReadRequests(); long getFilteredReadRequests();
} }

View File

@ -112,9 +112,7 @@ public interface Admin extends Abortable, Closeable {
@Override @Override
boolean isAborted(); boolean isAborted();
/** /** Returns Connection used by this object. */
* @return Connection used by this object.
*/
Connection getConnection(); Connection getConnection();
/** /**
@ -1710,9 +1708,7 @@ public interface Admin extends Abortable, Closeable {
List<RegionMetrics> getRegionMetrics(ServerName serverName, TableName tableName) List<RegionMetrics> getRegionMetrics(ServerName serverName, TableName tableName)
throws IOException; throws IOException;
/** /** Returns Configuration used by the instance. */
* @return Configuration used by the instance.
*/
Configuration getConfiguration(); Configuration getConfiguration();
/** /**

View File

@ -90,9 +90,7 @@ public class Append extends Mutation {
return this; return this;
} }
/** /** Returns current setting for returnResults */
* @return current setting for returnResults
*/
// This method makes public the superclasses's protected method. // This method makes public the superclasses's protected method.
@Override @Override
public boolean isReturnResults() { public boolean isReturnResults() {

View File

@ -1051,34 +1051,24 @@ public interface AsyncAdmin {
CompletableFuture<Void> recommissionRegionServer(ServerName server, CompletableFuture<Void> recommissionRegionServer(ServerName server,
List<byte[]> encodedRegionNames); List<byte[]> encodedRegionNames);
/** /** Returns cluster status wrapped by {@link CompletableFuture} */
* @return cluster status wrapped by {@link CompletableFuture}
*/
CompletableFuture<ClusterMetrics> getClusterMetrics(); CompletableFuture<ClusterMetrics> getClusterMetrics();
/** /** Returns cluster status wrapped by {@link CompletableFuture} */
* @return cluster status wrapped by {@link CompletableFuture}
*/
CompletableFuture<ClusterMetrics> getClusterMetrics(EnumSet<Option> options); CompletableFuture<ClusterMetrics> getClusterMetrics(EnumSet<Option> options);
/** /** Returns current master server name wrapped by {@link CompletableFuture} */
* @return current master server name wrapped by {@link CompletableFuture}
*/
default CompletableFuture<ServerName> getMaster() { default CompletableFuture<ServerName> getMaster() {
return getClusterMetrics(EnumSet.of(Option.MASTER)).thenApply(ClusterMetrics::getMasterName); return getClusterMetrics(EnumSet.of(Option.MASTER)).thenApply(ClusterMetrics::getMasterName);
} }
/** /** Returns current backup master list wrapped by {@link CompletableFuture} */
* @return current backup master list wrapped by {@link CompletableFuture}
*/
default CompletableFuture<Collection<ServerName>> getBackupMasters() { default CompletableFuture<Collection<ServerName>> getBackupMasters() {
return getClusterMetrics(EnumSet.of(Option.BACKUP_MASTERS)) return getClusterMetrics(EnumSet.of(Option.BACKUP_MASTERS))
.thenApply(ClusterMetrics::getBackupMasterNames); .thenApply(ClusterMetrics::getBackupMasterNames);
} }
/** /** Returns current live region servers list wrapped by {@link CompletableFuture} */
* @return current live region servers list wrapped by {@link CompletableFuture}
*/
default CompletableFuture<Collection<ServerName>> getRegionServers() { default CompletableFuture<Collection<ServerName>> getRegionServers() {
return getClusterMetrics(EnumSet.of(Option.SERVERS_NAME)) return getClusterMetrics(EnumSet.of(Option.SERVERS_NAME))
.thenApply(ClusterMetrics::getServersName); .thenApply(ClusterMetrics::getServersName);
@ -1110,9 +1100,7 @@ public interface AsyncAdmin {
return future; return future;
} }
/** /** Returns a list of master coprocessors wrapped by {@link CompletableFuture} */
* @return a list of master coprocessors wrapped by {@link CompletableFuture}
*/
default CompletableFuture<List<String>> getMasterCoprocessorNames() { default CompletableFuture<List<String>> getMasterCoprocessorNames() {
return getClusterMetrics(EnumSet.of(Option.MASTER_COPROCESSORS)) return getClusterMetrics(EnumSet.of(Option.MASTER_COPROCESSORS))
.thenApply(ClusterMetrics::getMasterCoprocessorNames); .thenApply(ClusterMetrics::getMasterCoprocessorNames);

View File

@ -250,9 +250,7 @@ public final class CheckAndMutate implements Row {
this.action = action; this.action = action;
} }
/** /** Returns the row */
* @return the row
*/
@Override @Override
public byte[] getRow() { public byte[] getRow() {
return row; return row;
@ -281,58 +279,42 @@ public final class CheckAndMutate implements Row {
return Bytes.hashCode(this.getRow()); return Bytes.hashCode(this.getRow());
} }
/** /** Returns the family to check */
* @return the family to check
*/
public byte[] getFamily() { public byte[] getFamily() {
return family; return family;
} }
/** /** Returns the qualifier to check */
* @return the qualifier to check
*/
public byte[] getQualifier() { public byte[] getQualifier() {
return qualifier; return qualifier;
} }
/** /** Returns the comparison operator */
* @return the comparison operator
*/
public CompareOperator getCompareOp() { public CompareOperator getCompareOp() {
return op; return op;
} }
/** /** Returns the expected value */
* @return the expected value
*/
public byte[] getValue() { public byte[] getValue() {
return value; return value;
} }
/** /** Returns the filter to check */
* @return the filter to check
*/
public Filter getFilter() { public Filter getFilter() {
return filter; return filter;
} }
/** /** Returns whether this has a filter or not */
* @return whether this has a filter or not
*/
public boolean hasFilter() { public boolean hasFilter() {
return filter != null; return filter != null;
} }
/** /** Returns the time range to check */
* @return the time range to check
*/
public TimeRange getTimeRange() { public TimeRange getTimeRange() {
return timeRange; return timeRange;
} }
/** /** Returns the action done if check succeeds */
* @return the action done if check succeeds
*/
public Row getAction() { public Row getAction() {
return action; return action;
} }

View File

@ -32,16 +32,12 @@ public class CheckAndMutateResult {
this.result = result; this.result = result;
} }
/** /** Returns Whether the CheckAndMutate operation is successful or not */
* @return Whether the CheckAndMutate operation is successful or not
*/
public boolean isSuccess() { public boolean isSuccess() {
return success; return success;
} }
/** /** Returns It is used only for CheckAndMutate operations with Increment/Append. Otherwise null */
* @return It is used only for CheckAndMutate operations with Increment/Append. Otherwise null
*/
public Result getResult() { public Result getResult() {
return result; return result;
} }

View File

@ -58,9 +58,7 @@ final class ClientIdGenerator {
return id; return id;
} }
/** /** Returns PID of the current process, if it can be extracted from JVM name, or null. */
* @return PID of the current process, if it can be extracted from JVM name, or null.
*/
public static Long getPid() { public static Long getPid() {
String name = ManagementFactory.getRuntimeMXBean().getName(); String name = ManagementFactory.getRuntimeMXBean().getName();
String[] nameParts = name.split("@"); String[] nameParts = name.split("@");

View File

@ -246,13 +246,11 @@ public interface ClusterConnection extends Connection {
void clearCaches(final ServerName sn); void clearCaches(final ServerName sn);
/** /**
* @return Nonce generator for this ClusterConnection; may be null if disabled in configuration. * Returns Nonce generator for this ClusterConnection; may be null if disabled in configuration.
*/ */
NonceGenerator getNonceGenerator(); NonceGenerator getNonceGenerator();
/** /** Returns Default AsyncProcess associated with this connection. */
* @return Default AsyncProcess associated with this connection.
*/
AsyncProcess getAsyncProcess(); AsyncProcess getAsyncProcess();
/** /**
@ -263,34 +261,22 @@ public interface ClusterConnection extends Connection {
*/ */
RpcRetryingCallerFactory getNewRpcRetryingCallerFactory(Configuration conf); RpcRetryingCallerFactory getNewRpcRetryingCallerFactory(Configuration conf);
/** /** Returns Connection's RpcRetryingCallerFactory instance */
* @return Connection's RpcRetryingCallerFactory instance
*/
RpcRetryingCallerFactory getRpcRetryingCallerFactory(); RpcRetryingCallerFactory getRpcRetryingCallerFactory();
/** /** Returns Connection's RpcControllerFactory instance */
* @return Connection's RpcControllerFactory instance
*/
RpcControllerFactory getRpcControllerFactory(); RpcControllerFactory getRpcControllerFactory();
/** /** Returns a ConnectionConfiguration object holding parsed configuration values */
* @return a ConnectionConfiguration object holding parsed configuration values
*/
ConnectionConfiguration getConnectionConfiguration(); ConnectionConfiguration getConnectionConfiguration();
/** /** Returns the current statistics tracker associated with this connection */
* @return the current statistics tracker associated with this connection
*/
ServerStatisticTracker getStatisticsTracker(); ServerStatisticTracker getStatisticsTracker();
/** /** Returns the configured client backoff policy */
* @return the configured client backoff policy
*/
ClientBackoffPolicy getBackoffPolicy(); ClientBackoffPolicy getBackoffPolicy();
/** /** Returns the MetricsConnection instance associated with this connection. */
* @return the MetricsConnection instance associated with this connection.
*/
MetricsConnection getConnectionMetrics(); MetricsConnection getConnectionMetrics();
/** /**

View File

@ -77,39 +77,25 @@ public interface ColumnFamilyDescriptor {
return lcf.getConfiguration().hashCode() - rcf.getConfiguration().hashCode(); return lcf.getConfiguration().hashCode() - rcf.getConfiguration().hashCode();
}; };
/** /** Returns The storefile/hfile blocksize for this column family. */
* @return The storefile/hfile blocksize for this column family.
*/
int getBlocksize(); int getBlocksize();
/** /** Returns bloom filter type used for new StoreFiles in ColumnFamily */
* @return bloom filter type used for new StoreFiles in ColumnFamily
*/
BloomType getBloomFilterType(); BloomType getBloomFilterType();
/** /** Returns Compression type setting. */
* @return Compression type setting.
*/
Compression.Algorithm getCompactionCompressionType(); Compression.Algorithm getCompactionCompressionType();
/** /** Returns Compression type setting for major compactions. */
* @return Compression type setting for major compactions.
*/
Compression.Algorithm getMajorCompactionCompressionType(); Compression.Algorithm getMajorCompactionCompressionType();
/** /** Returns Compression type setting for minor compactions. */
* @return Compression type setting for minor compactions.
*/
Compression.Algorithm getMinorCompactionCompressionType(); Compression.Algorithm getMinorCompactionCompressionType();
/** /** Returns Compression type setting. */
* @return Compression type setting.
*/
Compression.Algorithm getCompressionType(); Compression.Algorithm getCompressionType();
/** /** Returns an unmodifiable map. */
* @return an unmodifiable map.
*/
Map<String, String> getConfiguration(); Map<String, String> getConfiguration();
/** /**
@ -118,24 +104,16 @@ public interface ColumnFamilyDescriptor {
*/ */
String getConfigurationValue(String key); String getConfigurationValue(String key);
/** /** Returns replication factor set for this CF */
* @return replication factor set for this CF
*/
short getDFSReplication(); short getDFSReplication();
/** /** Returns the data block encoding algorithm used in block cache and optionally on disk */
* @return the data block encoding algorithm used in block cache and optionally on disk
*/
DataBlockEncoding getDataBlockEncoding(); DataBlockEncoding getDataBlockEncoding();
/** /** Returns Return the raw crypto key attribute for the family, or null if not set */
* @return Return the raw crypto key attribute for the family, or null if not set
*/
byte[] getEncryptionKey(); byte[] getEncryptionKey();
/** /** Returns Return the encryption algorithm in use by this family */
* @return Return the encryption algorithm in use by this family
*/
String getEncryptionType(); String getEncryptionType();
/** /**
@ -144,19 +122,13 @@ public interface ColumnFamilyDescriptor {
*/ */
MemoryCompactionPolicy getInMemoryCompaction(); MemoryCompactionPolicy getInMemoryCompaction();
/** /** Returns return the KeepDeletedCells */
* @return return the KeepDeletedCells
*/
KeepDeletedCells getKeepDeletedCells(); KeepDeletedCells getKeepDeletedCells();
/** /** Returns maximum number of versions */
* @return maximum number of versions
*/
int getMaxVersions(); int getMaxVersions();
/** /** Returns The minimum number of versions to keep. */
* @return The minimum number of versions to keep.
*/
int getMinVersions(); int getMinVersions();
/** /**
@ -171,19 +143,13 @@ public interface ColumnFamilyDescriptor {
*/ */
long getMobThreshold(); long getMobThreshold();
/** /** Returns a copy of Name of this column family */
* @return a copy of Name of this column family
*/
byte[] getName(); byte[] getName();
/** /** Returns Name of this column family */
* @return Name of this column family
*/
String getNameAsString(); String getNameAsString();
/** /** Returns the scope tag */
* @return the scope tag
*/
int getScope(); int getScope();
/** /**
@ -193,9 +159,7 @@ public interface ColumnFamilyDescriptor {
*/ */
String getStoragePolicy(); String getStoragePolicy();
/** /** Returns Time-to-live of cell contents, in seconds. */
* @return Time-to-live of cell contents, in seconds.
*/
int getTimeToLive(); int getTimeToLive();
/** /**
@ -228,19 +192,13 @@ public interface ColumnFamilyDescriptor {
*/ */
boolean isBlockCacheEnabled(); boolean isBlockCacheEnabled();
/** /** Returns true if we should cache bloomfilter blocks on write */
* @return true if we should cache bloomfilter blocks on write
*/
boolean isCacheBloomsOnWrite(); boolean isCacheBloomsOnWrite();
/** /** Returns true if we should cache data blocks on write */
* @return true if we should cache data blocks on write
*/
boolean isCacheDataOnWrite(); boolean isCacheDataOnWrite();
/** /** Returns true if we should cache index blocks on write */
* @return true if we should cache index blocks on write
*/
boolean isCacheIndexesOnWrite(); boolean isCacheIndexesOnWrite();
/** /**
@ -249,9 +207,7 @@ public interface ColumnFamilyDescriptor {
*/ */
boolean isCompressTags(); boolean isCompressTags();
/** /** Returns true if we should evict cached blocks from the blockcache on close */
* @return true if we should evict cached blocks from the blockcache on close
*/
boolean isEvictBlocksOnClose(); boolean isEvictBlocksOnClose();
/** /**
@ -266,14 +222,10 @@ public interface ColumnFamilyDescriptor {
*/ */
boolean isMobEnabled(); boolean isMobEnabled();
/** /** Returns true if we should prefetch blocks into the blockcache on open */
* @return true if we should prefetch blocks into the blockcache on open
*/
boolean isPrefetchBlocksOnOpen(); boolean isPrefetchBlocksOnOpen();
/** /** Returns Column family descriptor with only the customized attributes. */
* @return Column family descriptor with only the customized attributes.
*/
String toStringCustomizedValues(); String toStringCustomizedValues();
/** /**

View File

@ -58,9 +58,7 @@ public interface Connection extends Abortable, Closeable {
* general methods. * general methods.
*/ */
/** /** Returns Configuration instance being used by this Connection instance. */
* @return Configuration instance being used by this Connection instance.
*/
Configuration getConfiguration(); Configuration getConfiguration();
/** /**
@ -173,9 +171,7 @@ public interface Connection extends Abortable, Closeable {
*/ */
TableBuilder getTableBuilder(TableName tableName, ExecutorService pool); TableBuilder getTableBuilder(TableName tableName, ExecutorService pool);
/** /** Returns the cluster ID unique to this HBase cluster. */
* @return the cluster ID unique to this HBase cluster.
*/
String getClusterId(); String getClusterId();
/** /**

View File

@ -32,9 +32,7 @@ final class ConnectionRegistryFactory {
private ConnectionRegistryFactory() { private ConnectionRegistryFactory() {
} }
/** /** Returns The connection registry implementation to use. */
* @return The connection registry implementation to use.
*/
static ConnectionRegistry getRegistry(Configuration conf) { static ConnectionRegistry getRegistry(Configuration conf) {
Class<? extends ConnectionRegistry> clazz = Class<? extends ConnectionRegistry> clazz =
conf.getClass(CLIENT_CONNECTION_REGISTRY_IMPL_CONF_KEY, ZKConnectionRegistry.class, conf.getClass(CLIENT_CONNECTION_REGISTRY_IMPL_CONF_KEY, ZKConnectionRegistry.class,

View File

@ -28,23 +28,17 @@ import org.apache.yetus.audience.InterfaceAudience;
*/ */
@InterfaceAudience.Public @InterfaceAudience.Public
public interface CoprocessorDescriptor { public interface CoprocessorDescriptor {
/** /** Returns the name of the class or interface represented by this object. */
* @return the name of the class or interface represented by this object.
*/
String getClassName(); String getClassName();
/** /**
* @return Path of the jar file. If it's null, the class will be loaded from default classloader. * Returns Path of the jar file. If it's null, the class will be loaded from default classloader.
*/ */
Optional<String> getJarPath(); Optional<String> getJarPath();
/** /** Returns The order to execute this coprocessor */
* @return The order to execute this coprocessor
*/
int getPriority(); int getPriority();
/** /** Returns Arbitrary key-value parameter pairs passed into the coprocessor. */
* @return Arbitrary key-value parameter pairs passed into the coprocessor.
*/
Map<String, String> getProperties(); Map<String, String> getProperties();
} }

View File

@ -483,7 +483,7 @@ public class HBaseAdmin implements Admin {
} }
} }
/** @return Connection used by this object. */ /** Returns Connection used by this object. */
@Override @Override
public Connection getConnection() { public Connection getConnection() {
return connection; return connection;
@ -3531,28 +3531,20 @@ public class HBaseAdmin implements Admin {
return getDescription(); return getDescription();
} }
/** /** Returns the table name */
* @return the table name
*/
protected TableName getTableName() { protected TableName getTableName() {
return tableName; return tableName;
} }
/** /** Returns the table descriptor */
* @return the table descriptor
*/
protected TableDescriptor getTableDescriptor() throws IOException { protected TableDescriptor getTableDescriptor() throws IOException {
return getAdmin().getDescriptor(getTableName()); return getAdmin().getDescriptor(getTableName());
} }
/** /** Returns the operation type like CREATE, DELETE, DISABLE etc. */
* @return the operation type like CREATE, DELETE, DISABLE etc.
*/
public abstract String getOperationType(); public abstract String getOperationType();
/** /** Returns a description of the operation */
* @return a description of the operation
*/
protected String getDescription() { protected String getDescription() {
return "Operation: " + getOperationType() + ", " + "Table Name: " return "Operation: " + getOperationType() + ", " + "Table Name: "
+ tableName.getNameWithNamespaceInclAsString() + ", procId: " + procId; + tableName.getNameWithNamespaceInclAsString() + ", procId: " + procId;
@ -3696,16 +3688,12 @@ public class HBaseAdmin implements Admin {
this.namespaceName = namespaceName; this.namespaceName = namespaceName;
} }
/** /** Returns the namespace name */
* @return the namespace name
*/
protected String getNamespaceName() { protected String getNamespaceName() {
return namespaceName; return namespaceName;
} }
/** /** Returns the operation type like CREATE_NAMESPACE, DELETE_NAMESPACE, etc. */
* @return the operation type like CREATE_NAMESPACE, DELETE_NAMESPACE, etc.
*/
public abstract String getOperationType(); public abstract String getOperationType();
@Override @Override

View File

@ -204,9 +204,7 @@ public class HTable implements Table {
this.locator = new HRegionLocator(tableName, connection); this.locator = new HRegionLocator(tableName, connection);
} }
/** /** Returns maxKeyValueSize from configuration. */
* @return maxKeyValueSize from configuration.
*/
public static int getMaxKeyValueSize(Configuration conf) { public static int getMaxKeyValueSize(Configuration conf) {
return conf.getInt(ConnectionConfiguration.MAX_KEYVALUE_SIZE_KEY, -1); return conf.getInt(ConnectionConfiguration.MAX_KEYVALUE_SIZE_KEY, -1);
} }

View File

@ -216,9 +216,7 @@ public class HTableMultiplexer {
return put(TableName.valueOf(tableName), put); return put(TableName.valueOf(tableName), put);
} }
/** /** Returns the current HTableMultiplexerStatus */
* @return the current HTableMultiplexerStatus
*/
public HTableMultiplexerStatus getHTableMultiplexerStatus() { public HTableMultiplexerStatus getHTableMultiplexerStatus() {
return new HTableMultiplexerStatus(serverToFlushWorkerMap); return new HTableMultiplexerStatus(serverToFlushWorkerMap);
} }

View File

@ -162,9 +162,7 @@ public class Increment extends Mutation {
return this; return this;
} }
/** /** Returns current setting for returnResults */
* @return current setting for returnResults
*/
// This method makes public the superclasses's protected method. // This method makes public the superclasses's protected method.
@Override @Override
public boolean isReturnResults() { public boolean isReturnResults() {

View File

@ -44,9 +44,7 @@ public class MultiResponse extends AbstractResponse {
super(); super();
} }
/** /** Returns Number of pairs in this container */
* @return Number of pairs in this container
*/
public int size() { public int size() {
int size = 0; int size = 0;
for (RegionResult result : results.values()) { for (RegionResult result : results.values()) {
@ -68,9 +66,7 @@ public class MultiResponse extends AbstractResponse {
exceptions.put(regionName, ie); exceptions.put(regionName, ie);
} }
/** /** Returns the exception for the region, if any. Null otherwise. */
* @return the exception for the region, if any. Null otherwise.
*/
public Throwable getException(byte[] regionName) { public Throwable getException(byte[] regionName) {
return exceptions.get(regionName); return exceptions.get(regionName);
} }

View File

@ -127,14 +127,14 @@ class MutableRegionInfo implements RegionInfo {
} }
/** /**
* @return Return a short, printable name for this region (usually encoded name) for us logging. * Returns Return a short, printable name for this region (usually encoded name) for us logging.
*/ */
@Override @Override
public String getShortNameToLog() { public String getShortNameToLog() {
return RegionInfo.prettyPrint(this.getEncodedName()); return RegionInfo.prettyPrint(this.getEncodedName());
} }
/** @return the regionId */ /** Returns the regionId */
@Override @Override
public long getRegionId() { public long getRegionId() {
return regionId; return regionId;
@ -149,15 +149,13 @@ class MutableRegionInfo implements RegionInfo {
return regionName; return regionName;
} }
/** /** Returns Region name as a String for use in logging, etc. */
* @return Region name as a String for use in logging, etc.
*/
@Override @Override
public String getRegionNameAsString() { public String getRegionNameAsString() {
return RegionInfo.getRegionNameAsString(this, this.regionName); return RegionInfo.getRegionNameAsString(this, this.regionName);
} }
/** @return the encoded region name */ /** Returns the encoded region name */
@Override @Override
public String getEncodedName() { public String getEncodedName() {
return this.encodedName; return this.encodedName;
@ -168,13 +166,13 @@ class MutableRegionInfo implements RegionInfo {
return this.encodedNameAsBytes; return this.encodedNameAsBytes;
} }
/** @return the startKey */ /** Returns the startKey */
@Override @Override
public byte[] getStartKey() { public byte[] getStartKey() {
return startKey; return startKey;
} }
/** @return the endKey */ /** Returns the endKey */
@Override @Override
public byte[] getEndKey() { public byte[] getEndKey() {
return endKey; return endKey;
@ -219,15 +217,13 @@ class MutableRegionInfo implements RegionInfo {
|| Bytes.equals(endKey, HConstants.EMPTY_BYTE_ARRAY)); || Bytes.equals(endKey, HConstants.EMPTY_BYTE_ARRAY));
} }
/** @return true if this region is a meta region */ /** Returns true if this region is a meta region */
@Override @Override
public boolean isMetaRegion() { public boolean isMetaRegion() {
return tableName.equals(TableName.META_TABLE_NAME); return tableName.equals(TableName.META_TABLE_NAME);
} }
/** /** Returns True if has been split and has daughters. */
* @return True if has been split and has daughters.
*/
@Override @Override
public boolean isSplit() { public boolean isSplit() {
return this.split; return this.split;

View File

@ -354,9 +354,7 @@ public abstract class Mutation extends OperationWithAttributes
return this; return this;
} }
/** /** Returns the set of clusterIds that have consumed the mutation */
* @return the set of clusterIds that have consumed the mutation
*/
public List<UUID> getClusterIds() { public List<UUID> getClusterIds() {
List<UUID> clusterIds = new ArrayList<>(); List<UUID> clusterIds = new ArrayList<>();
byte[] bytes = getAttribute(CONSUMED_CLUSTER_IDS); byte[] bytes = getAttribute(CONSUMED_CLUSTER_IDS);
@ -379,9 +377,7 @@ public abstract class Mutation extends OperationWithAttributes
return this; return this;
} }
/** /** Returns CellVisibility associated with cells in this Mutation. n */
* @return CellVisibility associated with cells in this Mutation. n
*/
public CellVisibility getCellVisibility() throws DeserializationException { public CellVisibility getCellVisibility() throws DeserializationException {
byte[] cellVisibilityBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY); byte[] cellVisibilityBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);
if (cellVisibilityBytes == null) return null; if (cellVisibilityBytes == null) return null;
@ -437,16 +433,12 @@ public abstract class Mutation extends OperationWithAttributes
return size; return size;
} }
/** /** Returns the number of different families */
* @return the number of different families
*/
public int numFamilies() { public int numFamilies() {
return getFamilyCellMap().size(); return getFamilyCellMap().size();
} }
/** /** Returns Calculate what Mutation adds to class heap size. */
* @return Calculate what Mutation adds to class heap size.
*/
@Override @Override
public long heapSize() { public long heapSize() {
long heapsize = MUTATION_OVERHEAD; long heapsize = MUTATION_OVERHEAD;
@ -475,9 +467,7 @@ public abstract class Mutation extends OperationWithAttributes
return ClassSize.align(heapsize); return ClassSize.align(heapsize);
} }
/** /** Returns The serialized ACL for this operation, or null if none */
* @return The serialized ACL for this operation, or null if none
*/
public byte[] getACL() { public byte[] getACL() {
return getAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL); return getAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL);
} }
@ -527,9 +517,7 @@ public abstract class Mutation extends OperationWithAttributes
return this; return this;
} }
/** /** Returns current value for returnResults */
* @return current value for returnResults
*/
// Used by Increment and Append only. // Used by Increment and Append only.
@InterfaceAudience.Private @InterfaceAudience.Private
protected boolean isReturnResults() { protected boolean isReturnResults() {

View File

@ -29,9 +29,9 @@ public interface NonceGenerator {
static final String CLIENT_NONCES_ENABLED_KEY = "hbase.client.nonces.enabled"; static final String CLIENT_NONCES_ENABLED_KEY = "hbase.client.nonces.enabled";
/** @return the nonce group (client ID) of this client manager. */ /** Returns the nonce group (client ID) of this client manager. */
long getNonceGroup(); long getNonceGroup();
/** @return New nonce. */ /** Returns New nonce. */
long newNonce(); long newNonce();
} }

View File

@ -75,18 +75,14 @@ public abstract class Query extends OperationWithAttributes {
return this; return this;
} }
/** /** Returns The authorizations this Query is associated with. n */
* @return The authorizations this Query is associated with. n
*/
public Authorizations getAuthorizations() throws DeserializationException { public Authorizations getAuthorizations() throws DeserializationException {
byte[] authorizationsBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY); byte[] authorizationsBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);
if (authorizationsBytes == null) return null; if (authorizationsBytes == null) return null;
return ProtobufUtil.toAuthorizations(authorizationsBytes); return ProtobufUtil.toAuthorizations(authorizationsBytes);
} }
/** /** Returns The serialized ACL for this operation, or null if none */
* @return The serialized ACL for this operation, or null if none
*/
public byte[] getACL() { public byte[] getACL() {
return getAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL); return getAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL);
} }
@ -220,9 +216,7 @@ public abstract class Query extends OperationWithAttributes {
return this; return this;
} }
/** /** Returns A map of column families to time ranges */
* @return A map of column families to time ranges
*/
public Map<byte[], TimeRange> getColumnFamilyTimeRange() { public Map<byte[], TimeRange> getColumnFamilyTimeRange() {
return this.colFamTimeRangeMap; return this.colFamTimeRangeMap;
} }

View File

@ -114,9 +114,7 @@ public abstract class RegionAdminServiceCallable<T> implements RetryingCallable<
} }
} }
/** /** Returns {@link Connection} instance used by this Callable. */
* @return {@link Connection} instance used by this Callable.
*/
Connection getConnection() { Connection getConnection() {
return this.connection; return this.connection;
} }

View File

@ -152,13 +152,11 @@ public interface RegionInfo extends Comparable<RegionInfo> {
}; };
/** /**
* @return Return a short, printable name for this region (usually encoded name) for us logging. * Returns Return a short, printable name for this region (usually encoded name) for us logging.
*/ */
String getShortNameToLog(); String getShortNameToLog();
/** /** Returns the regionId. */
* @return the regionId.
*/
long getRegionId(); long getRegionId();
/** /**
@ -167,44 +165,28 @@ public interface RegionInfo extends Comparable<RegionInfo> {
*/ */
byte[] getRegionName(); byte[] getRegionName();
/** /** Returns Region name as a String for use in logging, etc. */
* @return Region name as a String for use in logging, etc.
*/
String getRegionNameAsString(); String getRegionNameAsString();
/** /** Returns the encoded region name. */
* @return the encoded region name.
*/
String getEncodedName(); String getEncodedName();
/** /** Returns the encoded region name as an array of bytes. */
* @return the encoded region name as an array of bytes.
*/
byte[] getEncodedNameAsBytes(); byte[] getEncodedNameAsBytes();
/** /** Returns the startKey. */
* @return the startKey.
*/
byte[] getStartKey(); byte[] getStartKey();
/** /** Returns the endKey. */
* @return the endKey.
*/
byte[] getEndKey(); byte[] getEndKey();
/** /** Returns current table name of the region */
* @return current table name of the region
*/
TableName getTable(); TableName getTable();
/** /** Returns returns region replica id */
* @return returns region replica id
*/
int getReplicaId(); int getReplicaId();
/** /** Returns True if has been split and has daughters. */
* @return True if has been split and has daughters.
*/
boolean isSplit(); boolean isSplit();
/** /**
@ -223,9 +205,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
@Deprecated @Deprecated
boolean isSplitParent(); boolean isSplitParent();
/** /** Returns true if this region is a meta region. */
* @return true if this region is a meta region.
*/
boolean isMetaRegion(); boolean isMetaRegion();
/** /**
@ -236,9 +216,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
*/ */
boolean containsRange(byte[] rangeStartKey, byte[] rangeEndKey); boolean containsRange(byte[] rangeStartKey, byte[] rangeEndKey);
/** /** Returns true if the given row falls in this region. */
* @return true if the given row falls in this region.
*/
boolean containsRow(byte[] row); boolean containsRow(byte[] row);
/** /**
@ -253,9 +231,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
&& (regionName[regionName.length - 1] == RegionInfo.ENC_SEPARATOR); && (regionName[regionName.length - 1] == RegionInfo.ENC_SEPARATOR);
} }
/** /** Returns the encodedName */
* @return the encodedName
*/
@InterfaceAudience.Private @InterfaceAudience.Private
static String encodeRegionName(final byte[] regionName) { static String encodeRegionName(final byte[] regionName) {
String encodedName; String encodedName;
@ -371,7 +347,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
} }
/** /**
* @return A deserialized {@link RegionInfo} or null if we failed deserialize or passed bytes null * Returns A deserialized {@link RegionInfo} or null if we failed deserialize or passed bytes null
*/ */
@InterfaceAudience.Private @InterfaceAudience.Private
static RegionInfo parseFromOrNull(final byte[] bytes) { static RegionInfo parseFromOrNull(final byte[] bytes) {
@ -380,7 +356,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
} }
/** /**
* @return A deserialized {@link RegionInfo} or null if we failed deserialize or passed bytes null * Returns A deserialized {@link RegionInfo} or null if we failed deserialize or passed bytes null
*/ */
@InterfaceAudience.Private @InterfaceAudience.Private
static RegionInfo parseFromOrNull(final byte[] bytes, int offset, int len) { static RegionInfo parseFromOrNull(final byte[] bytes, int offset, int len) {
@ -778,16 +754,12 @@ public interface RegionInfo extends Comparable<RegionInfo> {
return ris; return ris;
} }
/** /** Returns True if this is first Region in Table */
* @return True if this is first Region in Table
*/
default boolean isFirst() { default boolean isFirst() {
return Bytes.equals(getStartKey(), HConstants.EMPTY_START_ROW); return Bytes.equals(getStartKey(), HConstants.EMPTY_START_ROW);
} }
/** /** Returns True if this is last Region in Table */
* @return True if this is last Region in Table
*/
default boolean isLast() { default boolean isLast() {
return Bytes.equals(getEndKey(), HConstants.EMPTY_END_ROW); return Bytes.equals(getEndKey(), HConstants.EMPTY_END_ROW);
} }
@ -809,9 +781,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
return getTable().equals(other.getTable()) && areAdjacent(this, other); return getTable().equals(other.getTable()) && areAdjacent(this, other);
} }
/** /** Returns True if RegionInfo is degenerate... if startKey > endKey. */
* @return True if RegionInfo is degenerate... if startKey > endKey.
*/
default boolean isDegenerate() { default boolean isDegenerate() {
return !isLast() && Bytes.compareTo(getStartKey(), getEndKey()) > 0; return !isLast() && Bytes.compareTo(getStartKey(), getEndKey()) > 0;
} }

View File

@ -73,12 +73,12 @@ public class RegionReplicaUtil {
return getRegionInfoForReplica(regionInfo, DEFAULT_REPLICA_ID); return getRegionInfoForReplica(regionInfo, DEFAULT_REPLICA_ID);
} }
/** @return true if this replicaId corresponds to default replica for the region */ /** Returns true if this replicaId corresponds to default replica for the region */
public static boolean isDefaultReplica(int replicaId) { public static boolean isDefaultReplica(int replicaId) {
return DEFAULT_REPLICA_ID == replicaId; return DEFAULT_REPLICA_ID == replicaId;
} }
/** @return true if this region is a default replica for the region */ /** Returns true if this region is a default replica for the region */
public static boolean isDefaultReplica(RegionInfo hri) { public static boolean isDefaultReplica(RegionInfo hri) {
return hri.getReplicaId() == DEFAULT_REPLICA_ID; return hri.getReplicaId() == DEFAULT_REPLICA_ID;
} }

View File

@ -155,9 +155,7 @@ public abstract class RegionServerCallable<T, S> implements RetryingCallable<T>
} }
} }
/** /** Returns {@link ClusterConnection} instance used by this Callable. */
* @return {@link ClusterConnection} instance used by this Callable.
*/
protected ClusterConnection getConnection() { protected ClusterConnection getConnection() {
return (ClusterConnection) this.connection; return (ClusterConnection) this.connection;
} }
@ -200,9 +198,7 @@ public abstract class RegionServerCallable<T, S> implements RetryingCallable<T>
return ConnectionUtils.getPauseTime(pause, tries); return ConnectionUtils.getPauseTime(pause, tries);
} }
/** /** Returns the HRegionInfo for the current region */
* @return the HRegionInfo for the current region
*/
public HRegionInfo getHRegionInfo() { public HRegionInfo getHRegionInfo() {
if (this.location == null) { if (this.location == null) {
return null; return null;

View File

@ -67,9 +67,7 @@ public interface RequestController {
void reset() throws InterruptedIOException; void reset() throws InterruptedIOException;
} }
/** /** Returns A new checker for evaluating a batch rows. */
* @return A new checker for evaluating a batch rows.
*/
Checker newChecker(); Checker newChecker();
/** /**
@ -86,9 +84,7 @@ public interface RequestController {
*/ */
void decTaskCounters(Collection<byte[]> regions, ServerName sn); void decTaskCounters(Collection<byte[]> regions, ServerName sn);
/** /** Returns The number of running task. */
* @return The number of running task.
*/
long getNumberOfTasksInProgress(); long getNumberOfTasksInProgress();
/** /**

View File

@ -671,9 +671,7 @@ public class Result implements CellScannable, CellScanner {
return this.cells == null || this.cells.length == 0; return this.cells == null || this.cells.length == 0;
} }
/** /** Returns the size of the underlying Cell [] */
* @return the size of the underlying Cell []
*/
public int size() { public int size() {
return this.cells == null ? 0 : this.cells.length; return this.cells == null ? 0 : this.cells.length;
} }

View File

@ -114,8 +114,6 @@ public interface ResultScanner extends Closeable, Iterable<Result> {
*/ */
boolean renewLease(); boolean renewLease();
/** /** Returns the scan metrics, or {@code null} if we do not enable metrics. */
* @return the scan metrics, or {@code null} if we do not enable metrics.
*/
ScanMetrics getScanMetrics(); ScanMetrics getScanMetrics();
} }

View File

@ -28,9 +28,7 @@ import org.apache.yetus.audience.InterfaceAudience;
public interface Row extends Comparable<Row> { public interface Row extends Comparable<Row> {
Comparator<Row> COMPARATOR = (v1, v2) -> Bytes.compareTo(v1.getRow(), v2.getRow()); Comparator<Row> COMPARATOR = (v1, v2) -> Bytes.compareTo(v1.getRow(), v2.getRow());
/** /** Returns The row. */
* @return The row.
*/
byte[] getRow(); byte[] getRow();
/** /**

View File

@ -26,13 +26,9 @@ import org.apache.yetus.audience.InterfaceAudience;
*/ */
@InterfaceAudience.Private @InterfaceAudience.Private
public interface RowAccess<T> extends Iterable<T> { public interface RowAccess<T> extends Iterable<T> {
/** /** Returns true if there are no elements. */
* @return true if there are no elements.
*/
boolean isEmpty(); boolean isEmpty();
/** /** Returns the number of elements in this list. */
* @return the number of elements in this list.
*/
int size(); int size();
} }

View File

@ -155,9 +155,7 @@ public class RowMutations implements Row {
return row; return row;
} }
/** /** Returns An unmodifiable list of the current mutations. */
* @return An unmodifiable list of the current mutations.
*/
public List<Mutation> getMutations() { public List<Mutation> getMutations() {
return Collections.unmodifiableList(mutations); return Collections.unmodifiableList(mutations);
} }

View File

@ -176,9 +176,7 @@ public class RpcRetryingCallerImpl<T> implements RpcRetryingCaller<T> {
} }
} }
/** /** Returns Calculate how long a single call took */
* @return Calculate how long a single call took
*/
private long singleCallDuration(final long expectedSleep) { private long singleCallDuration(final long expectedSleep) {
return (EnvironmentEdgeManager.currentTime() - tracker.getStartTime()) + expectedSleep; return (EnvironmentEdgeManager.currentTime() - tracker.getStartTime()) + expectedSleep;
} }

View File

@ -687,9 +687,7 @@ public class Scan extends Query {
return this; return this;
} }
/** /** Returns the maximum result size in bytes. See {@link #setMaxResultSize(long)} */
* @return the maximum result size in bytes. See {@link #setMaxResultSize(long)}
*/
public long getMaxResultSize() { public long getMaxResultSize() {
return maxResultSize; return maxResultSize;
} }
@ -727,9 +725,7 @@ public class Scan extends Query {
return this.familyMap; return this.familyMap;
} }
/** /** Returns the number of families in familyMap */
* @return the number of families in familyMap
*/
public int numFamilies() { public int numFamilies() {
if (hasFamilies()) { if (hasFamilies()) {
return this.familyMap.size(); return this.familyMap.size();
@ -737,16 +733,12 @@ public class Scan extends Query {
return 0; return 0;
} }
/** /** Returns true if familyMap is non empty, false otherwise */
* @return true if familyMap is non empty, false otherwise
*/
public boolean hasFamilies() { public boolean hasFamilies() {
return !this.familyMap.isEmpty(); return !this.familyMap.isEmpty();
} }
/** /** Returns the keys of the familyMap */
* @return the keys of the familyMap
*/
public byte[][] getFamilies() { public byte[][] getFamilies() {
if (hasFamilies()) { if (hasFamilies()) {
return this.familyMap.keySet().toArray(new byte[0][0]); return this.familyMap.keySet().toArray(new byte[0][0]);
@ -754,51 +746,37 @@ public class Scan extends Query {
return null; return null;
} }
/** /** Returns the startrow */
* @return the startrow
*/
public byte[] getStartRow() { public byte[] getStartRow() {
return this.startRow; return this.startRow;
} }
/** /** Returns if we should include start row when scan */
* @return if we should include start row when scan
*/
public boolean includeStartRow() { public boolean includeStartRow() {
return includeStartRow; return includeStartRow;
} }
/** /** Returns the stoprow */
* @return the stoprow
*/
public byte[] getStopRow() { public byte[] getStopRow() {
return this.stopRow; return this.stopRow;
} }
/** /** Returns if we should include stop row when scan */
* @return if we should include stop row when scan
*/
public boolean includeStopRow() { public boolean includeStopRow() {
return includeStopRow; return includeStopRow;
} }
/** /** Returns the max number of versions to fetch */
* @return the max number of versions to fetch
*/
public int getMaxVersions() { public int getMaxVersions() {
return this.maxVersions; return this.maxVersions;
} }
/** /** Returns maximum number of values to return for a single call to next() */
* @return maximum number of values to return for a single call to next()
*/
public int getBatch() { public int getBatch() {
return this.batch; return this.batch;
} }
/** /** Returns maximum number of values to return per row per CF */
* @return maximum number of values to return per row per CF
*/
public int getMaxResultsPerColumnFamily() { public int getMaxResultsPerColumnFamily() {
return this.storeLimit; return this.storeLimit;
} }
@ -811,9 +789,7 @@ public class Scan extends Query {
return this.storeOffset; return this.storeOffset;
} }
/** /** Returns caching the number of rows fetched when calling next on a scanner */
* @return caching the number of rows fetched when calling next on a scanner
*/
public int getCaching() { public int getCaching() {
return this.caching; return this.caching;
} }
@ -833,9 +809,7 @@ public class Scan extends Query {
return filter; return filter;
} }
/** /** Returns true is a filter has been specified, false if not */
* @return true is a filter has been specified, false if not
*/
public boolean hasFilter() { public boolean hasFilter() {
return filter != null; return filter != null;
} }
@ -996,9 +970,7 @@ public class Scan extends Query {
return this; return this;
} }
/** /** Returns True if this Scan is in "raw" mode. */
* @return True if this Scan is in "raw" mode.
*/
public boolean isRaw() { public boolean isRaw() {
byte[] attr = getAttribute(RAW_ATTR); byte[] attr = getAttribute(RAW_ATTR);
return attr == null ? false : Bytes.toBoolean(attr); return attr == null ? false : Bytes.toBoolean(attr);
@ -1098,9 +1070,7 @@ public class Scan extends Query {
return this; return this;
} }
/** /** Returns True if collection of scan metrics is enabled. For advanced users. */
* @return True if collection of scan metrics is enabled. For advanced users.
*/
public boolean isScanMetricsEnabled() { public boolean isScanMetricsEnabled() {
byte[] attr = getAttribute(Scan.SCAN_ATTRIBUTES_METRICS_ENABLE); byte[] attr = getAttribute(Scan.SCAN_ATTRIBUTES_METRICS_ENABLE);
return attr == null ? false : Bytes.toBoolean(attr); return attr == null ? false : Bytes.toBoolean(attr);
@ -1129,9 +1099,7 @@ public class Scan extends Query {
return this; return this;
} }
/** /** Returns the limit of rows for this scan */
* @return the limit of rows for this scan
*/
public int getLimit() { public int getLimit() {
return limit; return limit;
} }
@ -1163,9 +1131,7 @@ public class Scan extends Query {
PREAD PREAD
} }
/** /** Returns the read type for this scan */
* @return the read type for this scan
*/
public ReadType getReadType() { public ReadType getReadType() {
return readType; return readType;
} }

View File

@ -396,9 +396,7 @@ public class ScannerCallable extends ClientServiceCallable<Result[]> {
this.renew = val; this.renew = val;
} }
/** /** Returns the HRegionInfo for the current region */
* @return the HRegionInfo for the current region
*/
@Override @Override
public HRegionInfo getHRegionInfo() { public HRegionInfo getHRegionInfo() {
if (!instantiated) { if (!instantiated) {

View File

@ -153,9 +153,7 @@ public interface TableDescriptor {
// those tables with the highest priority (From Yi Liang over on HBASE-18109). // those tables with the highest priority (From Yi Liang over on HBASE-18109).
int getPriority(); int getPriority();
/** /** Returns Returns the configured replicas per region */
* @return Returns the configured replicas per region
*/
int getRegionReplication(); int getRegionReplication();
/** /**
@ -200,9 +198,7 @@ public interface TableDescriptor {
*/ */
String getValue(String key); String getValue(String key);
/** /** Returns Getter for fetching an unmodifiable map. */
* @return Getter for fetching an unmodifiable map.
*/
Map<Bytes, Bytes> getValues(); Map<Bytes, Bytes> getValues();
/** /**
@ -219,9 +215,7 @@ public interface TableDescriptor {
*/ */
boolean hasColumnFamily(final byte[] name); boolean hasColumnFamily(final byte[] name);
/** /** Returns true if the read-replicas memstore replication is enabled. */
* @return true if the read-replicas memstore replication is enabled.
*/
boolean hasRegionMemStoreReplication(); boolean hasRegionMemStoreReplication();
/** /**

View File

@ -1110,9 +1110,7 @@ public class TableDescriptorBuilder {
return families.containsKey(familyName); return families.containsKey(familyName);
} }
/** /** Returns Name of this table and then a map of all of the column family descriptors. */
* @return Name of this table and then a map of all of the column family descriptors.
*/
@Override @Override
public String toString() { public String toString() {
StringBuilder s = new StringBuilder(); StringBuilder s = new StringBuilder();
@ -1135,9 +1133,7 @@ public class TableDescriptorBuilder {
return s.toString(); return s.toString();
} }
/** /** Returns map of all table attributes formatted into string. */
* @return map of all table attributes formatted into string.
*/
public String toStringTableAttributes() { public String toStringTableAttributes() {
return getValues(true).toString(); return getValues(true).toString();
} }
@ -1247,9 +1243,7 @@ public class TableDescriptorBuilder {
return false; return false;
} }
/** /** Returns hash code */
* @return hash code
*/
@Override @Override
public int hashCode() { public int hashCode() {
int result = this.name.hashCode(); int result = this.name.hashCode();
@ -1297,9 +1291,7 @@ public class TableDescriptorBuilder {
return setValue(REGION_REPLICATION_KEY, Integer.toString(regionReplication)); return setValue(REGION_REPLICATION_KEY, Integer.toString(regionReplication));
} }
/** /** Returns true if the read-replicas memstore replication is enabled. */
* @return true if the read-replicas memstore replication is enabled.
*/
@Override @Override
public boolean hasRegionMemStoreReplication() { public boolean hasRegionMemStoreReplication() {
return getOrDefault(REGION_MEMSTORE_REPLICATION_KEY, Boolean::valueOf, return getOrDefault(REGION_MEMSTORE_REPLICATION_KEY, Boolean::valueOf,
@ -1550,9 +1542,7 @@ public class TableDescriptorBuilder {
return getOrDefault(OWNER_KEY, Function.identity(), null); return getOrDefault(OWNER_KEY, Function.identity(), null);
} }
/** /** Returns the bytes in pb format */
* @return the bytes in pb format
*/
private byte[] toByteArray() { private byte[] toByteArray() {
return ProtobufUtil.prependPBMagic(ProtobufUtil.toTableSchema(this).toByteArray()); return ProtobufUtil.prependPBMagic(ProtobufUtil.toTableSchema(this).toByteArray());
} }

View File

@ -94,44 +94,32 @@ public class TableState {
private final TableName tableName; private final TableName tableName;
private final State state; private final State state;
/** /** Returns True if table is {@link State#ENABLED}. */
* @return True if table is {@link State#ENABLED}.
*/
public boolean isEnabled() { public boolean isEnabled() {
return isInStates(State.ENABLED); return isInStates(State.ENABLED);
} }
/** /** Returns True if table is {@link State#ENABLING}. */
* @return True if table is {@link State#ENABLING}.
*/
public boolean isEnabling() { public boolean isEnabling() {
return isInStates(State.ENABLING); return isInStates(State.ENABLING);
} }
/** /** Returns True if {@link State#ENABLED} or {@link State#ENABLING} */
* @return True if {@link State#ENABLED} or {@link State#ENABLING}
*/
public boolean isEnabledOrEnabling() { public boolean isEnabledOrEnabling() {
return isInStates(State.ENABLED, State.ENABLING); return isInStates(State.ENABLED, State.ENABLING);
} }
/** /** Returns True if table is disabled. */
* @return True if table is disabled.
*/
public boolean isDisabled() { public boolean isDisabled() {
return isInStates(State.DISABLED); return isInStates(State.DISABLED);
} }
/** /** Returns True if table is disabling. */
* @return True if table is disabling.
*/
public boolean isDisabling() { public boolean isDisabling() {
return isInStates(State.DISABLING); return isInStates(State.DISABLING);
} }
/** /** Returns True if {@link State#DISABLED} or {@link State#DISABLED} */
* @return True if {@link State#DISABLED} or {@link State#DISABLED}
*/
public boolean isDisabledOrDisabling() { public boolean isDisabledOrDisabling() {
return isInStates(State.DISABLED, State.DISABLING); return isInStates(State.DISABLED, State.DISABLING);
} }
@ -146,9 +134,7 @@ public class TableState {
this.state = state; this.state = state;
} }
/** /** Returns table state */
* @return table state
*/
public State getState() { public State getState() {
return state; return state;
} }

View File

@ -32,8 +32,6 @@ public interface ClientBackoffPolicy {
public static final String BACKOFF_POLICY_CLASS = "hbase.client.statistics.backoff-policy"; public static final String BACKOFF_POLICY_CLASS = "hbase.client.statistics.backoff-policy";
/** /** Returns the number of ms to wait on the client based on the */
* @return the number of ms to wait on the client based on the
*/
public long getBackoffTime(ServerName serverName, byte[] region, ServerStatistics stats); public long getBackoffTime(ServerName serverName, byte[] region, ServerStatistics stats);
} }

View File

@ -67,37 +67,27 @@ public class PreemptiveFastFailException extends ConnectException {
this.guaranteedClientSideOnly = guaranteedClientSideOnly; this.guaranteedClientSideOnly = guaranteedClientSideOnly;
} }
/** /** Returns time of the fist failure */
* @return time of the fist failure
*/
public long getFirstFailureAt() { public long getFirstFailureAt() {
return timeOfFirstFailureMilliSec; return timeOfFirstFailureMilliSec;
} }
/** /** Returns time of the latest attempt */
* @return time of the latest attempt
*/
public long getLastAttemptAt() { public long getLastAttemptAt() {
return timeOfLatestAttemptMilliSec; return timeOfLatestAttemptMilliSec;
} }
/** /** Returns failure count */
* @return failure count
*/
public long getFailureCount() { public long getFailureCount() {
return failureCount; return failureCount;
} }
/** /** Returns true if operation was attempted by server, false otherwise. */
* @return true if operation was attempted by server, false otherwise.
*/
public boolean wasOperationAttemptedByServer() { public boolean wasOperationAttemptedByServer() {
return false; return false;
} }
/** /** Returns true if we know no mutation made it to the server, false otherwise. */
* @return true if we know no mutation made it to the server, false otherwise.
*/
public boolean isGuaranteedClientSideOnly() { public boolean isGuaranteedClientSideOnly() {
return guaranteedClientSideOnly; return guaranteedClientSideOnly;
} }

View File

@ -72,9 +72,7 @@ public class BigDecimalComparator extends ByteArrayComparable {
return this.bigDecimal.compareTo(that); return this.bigDecimal.compareTo(that);
} }
/** /** Returns The comparator serialized using pb */
* @return The comparator serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
ComparatorProtos.BigDecimalComparator.Builder builder = ComparatorProtos.BigDecimalComparator.Builder builder =

View File

@ -54,9 +54,7 @@ public class BinaryComparator extends org.apache.hadoop.hbase.filter.ByteArrayCo
return ByteBufferUtils.compareTo(this.value, 0, this.value.length, value, offset, length); return ByteBufferUtils.compareTo(this.value, 0, this.value.length, value, offset, length);
} }
/** /** Returns The comparator serialized using pb */
* @return The comparator serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
ComparatorProtos.BinaryComparator.Builder builder = ComparatorProtos.BinaryComparator.Builder builder =

View File

@ -73,9 +73,7 @@ public class BinaryComponentComparator extends ByteArrayComparable {
return result; return result;
} }
/** /** Returns The comparator serialized using pb */
* @return The comparator serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
ComparatorProtos.BinaryComponentComparator.Builder builder = ComparatorProtos.BinaryComponentComparator.Builder builder =

View File

@ -58,9 +58,7 @@ public class BinaryPrefixComparator extends ByteArrayComparable {
return ByteBufferUtils.compareTo(this.value, 0, this.value.length, value, offset, length); return ByteBufferUtils.compareTo(this.value, 0, this.value.length, value, offset, length);
} }
/** /** Returns The comparator serialized using pb */
* @return The comparator serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
ComparatorProtos.BinaryPrefixComparator.Builder builder = ComparatorProtos.BinaryPrefixComparator.Builder builder =

View File

@ -57,16 +57,12 @@ public class BitComparator extends ByteArrayComparable {
this.bitOperator = bitOperator; this.bitOperator = bitOperator;
} }
/** /** Returns the bitwise operator */
* @return the bitwise operator
*/
public BitwiseOp getOperator() { public BitwiseOp getOperator() {
return bitOperator; return bitOperator;
} }
/** /** Returns The comparator serialized using pb */
* @return The comparator serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
ComparatorProtos.BitComparator.Builder builder = ComparatorProtos.BitComparator.newBuilder(); ComparatorProtos.BitComparator.Builder builder = ComparatorProtos.BitComparator.newBuilder();

View File

@ -84,9 +84,7 @@ public class ColumnCountGetFilter extends FilterBase {
return new ColumnCountGetFilter(limit); return new ColumnCountGetFilter(limit);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.ColumnCountGetFilter.Builder builder = FilterProtos.ColumnCountGetFilter.Builder builder =

View File

@ -157,9 +157,7 @@ public class ColumnPaginationFilter extends FilterBase {
return new ColumnPaginationFilter(limit, offset); return new ColumnPaginationFilter(limit, offset);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.ColumnPaginationFilter.Builder builder = FilterProtos.ColumnPaginationFilter.Builder builder =

View File

@ -108,9 +108,7 @@ public class ColumnPrefixFilter extends FilterBase {
return new ColumnPrefixFilter(columnPrefix); return new ColumnPrefixFilter(columnPrefix);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.ColumnPrefixFilter.Builder builder = FilterProtos.ColumnPrefixFilter.newBuilder(); FilterProtos.ColumnPrefixFilter.Builder builder = FilterProtos.ColumnPrefixFilter.newBuilder();

View File

@ -65,44 +65,32 @@ public class ColumnRangeFilter extends FilterBase {
this.maxColumnInclusive = maxColumnInclusive; this.maxColumnInclusive = maxColumnInclusive;
} }
/** /** Returns if min column range is inclusive. */
* @return if min column range is inclusive.
*/
public boolean isMinColumnInclusive() { public boolean isMinColumnInclusive() {
return minColumnInclusive; return minColumnInclusive;
} }
/** /** Returns if max column range is inclusive. */
* @return if max column range is inclusive.
*/
public boolean isMaxColumnInclusive() { public boolean isMaxColumnInclusive() {
return maxColumnInclusive; return maxColumnInclusive;
} }
/** /** Returns the min column range for the filter */
* @return the min column range for the filter
*/
public byte[] getMinColumn() { public byte[] getMinColumn() {
return this.minColumn; return this.minColumn;
} }
/** /** Returns true if min column is inclusive, false otherwise */
* @return true if min column is inclusive, false otherwise
*/
public boolean getMinColumnInclusive() { public boolean getMinColumnInclusive() {
return this.minColumnInclusive; return this.minColumnInclusive;
} }
/** /** Returns the max column range for the filter */
* @return the max column range for the filter
*/
public byte[] getMaxColumn() { public byte[] getMaxColumn() {
return this.maxColumn; return this.maxColumn;
} }
/** /** Returns true if max column is inclusive, false otherwise */
* @return true if max column is inclusive, false otherwise
*/
public boolean getMaxColumnInclusive() { public boolean getMaxColumnInclusive() {
return this.maxColumnInclusive; return this.maxColumnInclusive;
} }
@ -161,9 +149,7 @@ public class ColumnRangeFilter extends FilterBase {
return new ColumnRangeFilter(minColumn, minColumnInclusive, maxColumn, maxColumnInclusive); return new ColumnRangeFilter(minColumn, minColumnInclusive, maxColumn, maxColumnInclusive);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.ColumnRangeFilter.Builder builder = FilterProtos.ColumnRangeFilter.newBuilder(); FilterProtos.ColumnRangeFilter.Builder builder = FilterProtos.ColumnRangeFilter.newBuilder();

View File

@ -75,23 +75,17 @@ public class ColumnValueFilter extends FilterBase {
return op; return op;
} }
/** /** Returns the comparator */
* @return the comparator
*/
public ByteArrayComparable getComparator() { public ByteArrayComparable getComparator() {
return comparator; return comparator;
} }
/** /** Returns the column family */
* @return the column family
*/
public byte[] getFamily() { public byte[] getFamily() {
return family; return family;
} }
/** /** Returns the qualifier */
* @return the qualifier
*/
public byte[] getQualifier() { public byte[] getQualifier() {
return qualifier; return qualifier;
} }
@ -161,9 +155,7 @@ public class ColumnValueFilter extends FilterBase {
return new ColumnValueFilter(family, qualifier, operator, comparator); return new ColumnValueFilter(family, qualifier, operator, comparator);
} }
/** /** Returns A pb instance to represent this instance. */
* @return A pb instance to represent this instance.
*/
FilterProtos.ColumnValueFilter convert() { FilterProtos.ColumnValueFilter convert() {
FilterProtos.ColumnValueFilter.Builder builder = FilterProtos.ColumnValueFilter.newBuilder(); FilterProtos.ColumnValueFilter.Builder builder = FilterProtos.ColumnValueFilter.newBuilder();

View File

@ -113,9 +113,7 @@ public abstract class CompareFilter extends FilterBase {
return op; return op;
} }
/** /** Returns the comparator */
* @return the comparator
*/
public ByteArrayComparable getComparator() { public ByteArrayComparable getComparator() {
return comparator; return comparator;
} }
@ -279,9 +277,7 @@ public abstract class CompareFilter extends FilterBase {
return arguments; return arguments;
} }
/** /** Returns A pb instance to represent this instance. */
* @return A pb instance to represent this instance.
*/
FilterProtos.CompareFilter convert() { FilterProtos.CompareFilter convert() {
FilterProtos.CompareFilter.Builder builder = FilterProtos.CompareFilter.newBuilder(); FilterProtos.CompareFilter.Builder builder = FilterProtos.CompareFilter.newBuilder();
HBaseProtos.CompareType compareOp = CompareType.valueOf(this.op.name()); HBaseProtos.CompareType compareOp = CompareType.valueOf(this.op.name());

View File

@ -112,23 +112,17 @@ public class DependentColumnFilter extends CompareFilter {
this(family, qualifier, dropDependentColumn, CompareOp.NO_OP, null); this(family, qualifier, dropDependentColumn, CompareOp.NO_OP, null);
} }
/** /** Returns the column family */
* @return the column family
*/
public byte[] getFamily() { public byte[] getFamily() {
return this.columnFamily; return this.columnFamily;
} }
/** /** Returns the column qualifier */
* @return the column qualifier
*/
public byte[] getQualifier() { public byte[] getQualifier() {
return this.columnQualifier; return this.columnQualifier;
} }
/** /** Returns true if we should drop the dependent column, false otherwise */
* @return true if we should drop the dependent column, false otherwise
*/
public boolean dropDependentColumn() { public boolean dropDependentColumn() {
return this.dropDependentColumn; return this.dropDependentColumn;
} }
@ -219,9 +213,7 @@ public class DependentColumnFilter extends CompareFilter {
} }
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.DependentColumnFilter.Builder builder = FilterProtos.DependentColumnFilter.Builder builder =

View File

@ -92,9 +92,7 @@ public class FamilyFilter extends CompareFilter {
return new FamilyFilter(compareOp, comparator); return new FamilyFilter(compareOp, comparator);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.FamilyFilter.Builder builder = FilterProtos.FamilyFilter.newBuilder(); FilterProtos.FamilyFilter.Builder builder = FilterProtos.FamilyFilter.newBuilder();

View File

@ -192,9 +192,7 @@ final public class FilterList extends FilterBase {
return filterListBase.filterRow(); return filterListBase.filterRow();
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() throws IOException { public byte[] toByteArray() throws IOException {
FilterProtos.FilterList.Builder builder = FilterProtos.FilterList.newBuilder(); FilterProtos.FilterList.Builder builder = FilterProtos.FilterList.newBuilder();

View File

@ -71,9 +71,7 @@ public class FirstKeyOnlyFilter extends FilterBase {
return new FirstKeyOnlyFilter(); return new FirstKeyOnlyFilter();
} }
/** /** Returns true if first KV has been found. */
* @return true if first KV has been found.
*/
protected boolean hasFoundKV() { protected boolean hasFoundKV() {
return this.foundKV; return this.foundKV;
} }
@ -85,9 +83,7 @@ public class FirstKeyOnlyFilter extends FilterBase {
this.foundKV = value; this.foundKV = value;
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.FirstKeyOnlyFilter.Builder builder = FilterProtos.FirstKeyOnlyFilter.newBuilder(); FilterProtos.FirstKeyOnlyFilter.Builder builder = FilterProtos.FirstKeyOnlyFilter.newBuilder();

View File

@ -83,9 +83,7 @@ public class FirstKeyValueMatchingQualifiersFilter extends FirstKeyOnlyFilter {
return false; return false;
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.FirstKeyValueMatchingQualifiersFilter.Builder builder = FilterProtos.FirstKeyValueMatchingQualifiersFilter.Builder builder =

View File

@ -284,9 +284,7 @@ public class FuzzyRowFilter extends FilterBase {
return done; return done;
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.FuzzyRowFilter.Builder builder = FilterProtos.FuzzyRowFilter.newBuilder() FilterProtos.FuzzyRowFilter.Builder builder = FilterProtos.FuzzyRowFilter.newBuilder()

View File

@ -81,9 +81,7 @@ public class InclusiveStopFilter extends FilterBase {
return new InclusiveStopFilter(stopRowKey); return new InclusiveStopFilter(stopRowKey);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.InclusiveStopFilter.Builder builder = FilterProtos.InclusiveStopFilter.Builder builder =

View File

@ -99,9 +99,7 @@ public class KeyOnlyFilter extends FilterBase {
return filter; return filter;
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.KeyOnlyFilter.Builder builder = FilterProtos.KeyOnlyFilter.newBuilder(); FilterProtos.KeyOnlyFilter.Builder builder = FilterProtos.KeyOnlyFilter.newBuilder();

View File

@ -53,9 +53,7 @@ public class LongComparator extends ByteArrayComparable {
return Long.compare(longValue, that); return Long.compare(longValue, that);
} }
/** /** Returns The comparator serialized using pb */
* @return The comparator serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
ComparatorProtos.LongComparator.Builder builder = ComparatorProtos.LongComparator.newBuilder(); ComparatorProtos.LongComparator.Builder builder = ComparatorProtos.LongComparator.newBuilder();

View File

@ -182,9 +182,7 @@ public class MultiRowRangeFilter extends FilterBase {
return PrivateCellUtil.createFirstOnRow(comparisonData, 0, (short) comparisonData.length); return PrivateCellUtil.createFirstOnRow(comparisonData, 0, (short) comparisonData.length);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.MultiRowRangeFilter.Builder builder = FilterProtos.MultiRowRangeFilter.Builder builder =
@ -475,16 +473,12 @@ public class MultiRowRangeFilter extends FilterBase {
return stopRow; return stopRow;
} }
/** /** Returns if start row is inclusive. */
* @return if start row is inclusive.
*/
public boolean isStartRowInclusive() { public boolean isStartRowInclusive() {
return startRowInclusive; return startRowInclusive;
} }
/** /** Returns if stop row is inclusive. */
* @return if stop row is inclusive.
*/
public boolean isStopRowInclusive() { public boolean isStopRowInclusive() {
return stopRowInclusive; return stopRowInclusive;
} }

View File

@ -122,9 +122,7 @@ public class MultipleColumnPrefixFilter extends FilterBase {
return new MultipleColumnPrefixFilter(prefixes); return new MultipleColumnPrefixFilter(prefixes);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.MultipleColumnPrefixFilter.Builder builder = FilterProtos.MultipleColumnPrefixFilter.Builder builder =

View File

@ -63,9 +63,7 @@ public class NullComparator extends ByteArrayComparable {
return value != null ? 1 : 0; return value != null ? 1 : 0;
} }
/** /** Returns The comparator serialized using pb */
* @return The comparator serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
ComparatorProtos.NullComparator.Builder builder = ComparatorProtos.NullComparator.newBuilder(); ComparatorProtos.NullComparator.Builder builder = ComparatorProtos.NullComparator.newBuilder();

View File

@ -97,9 +97,7 @@ public class PageFilter extends FilterBase {
return new PageFilter(pageSize); return new PageFilter(pageSize);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.PageFilter.Builder builder = FilterProtos.PageFilter.newBuilder(); FilterProtos.PageFilter.Builder builder = FilterProtos.PageFilter.newBuilder();

View File

@ -107,9 +107,7 @@ public class PrefixFilter extends FilterBase {
return new PrefixFilter(prefix); return new PrefixFilter(prefix);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.PrefixFilter.Builder builder = FilterProtos.PrefixFilter.newBuilder(); FilterProtos.PrefixFilter.Builder builder = FilterProtos.PrefixFilter.newBuilder();

View File

@ -86,9 +86,7 @@ public class QualifierFilter extends CompareFilter {
return new QualifierFilter(compareOp, comparator); return new QualifierFilter(compareOp, comparator);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.QualifierFilter.Builder builder = FilterProtos.QualifierFilter.newBuilder(); FilterProtos.QualifierFilter.Builder builder = FilterProtos.QualifierFilter.newBuilder();

View File

@ -44,9 +44,7 @@ public class RandomRowFilter extends FilterBase {
this.chance = chance; this.chance = chance;
} }
/** /** Returns The chance that a row gets included. */
* @return The chance that a row gets included.
*/
public float getChance() { public float getChance() {
return chance; return chance;
} }
@ -107,9 +105,7 @@ public class RandomRowFilter extends FilterBase {
filterOutRow = false; filterOutRow = false;
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.RandomRowFilter.Builder builder = FilterProtos.RandomRowFilter.newBuilder(); FilterProtos.RandomRowFilter.Builder builder = FilterProtos.RandomRowFilter.newBuilder();

View File

@ -145,9 +145,7 @@ public class RegexStringComparator extends ByteArrayComparable {
return engine.compareTo(value, offset, length); return engine.compareTo(value, offset, length);
} }
/** /** Returns The comparator serialized using pb */
* @return The comparator serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
return engine.toByteArray(); return engine.toByteArray();

View File

@ -106,9 +106,7 @@ public class RowFilter extends CompareFilter {
return new RowFilter(compareOp, comparator); return new RowFilter(compareOp, comparator);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.RowFilter.Builder builder = FilterProtos.RowFilter.newBuilder(); FilterProtos.RowFilter.Builder builder = FilterProtos.RowFilter.newBuilder();

View File

@ -163,9 +163,7 @@ public class SingleColumnValueExcludeFilter extends SingleColumnValueFilter {
return filter; return filter;
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.SingleColumnValueExcludeFilter.Builder builder = FilterProtos.SingleColumnValueExcludeFilter.Builder builder =

View File

@ -192,23 +192,17 @@ public class SingleColumnValueFilter extends FilterBase {
return op; return op;
} }
/** /** Returns the comparator */
* @return the comparator
*/
public org.apache.hadoop.hbase.filter.ByteArrayComparable getComparator() { public org.apache.hadoop.hbase.filter.ByteArrayComparable getComparator() {
return comparator; return comparator;
} }
/** /** Returns the family */
* @return the family
*/
public byte[] getFamily() { public byte[] getFamily() {
return columnFamily; return columnFamily;
} }
/** /** Returns the qualifier */
* @return the qualifier
*/
public byte[] getQualifier() { public byte[] getQualifier() {
return columnQualifier; return columnQualifier;
} }
@ -356,9 +350,7 @@ public class SingleColumnValueFilter extends FilterBase {
return builder.build(); return builder.build();
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
return convert().toByteArray(); return convert().toByteArray();

View File

@ -102,9 +102,7 @@ public class SkipFilter extends FilterBase {
return true; return true;
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() throws IOException { public byte[] toByteArray() throws IOException {
FilterProtos.SkipFilter.Builder builder = FilterProtos.SkipFilter.newBuilder(); FilterProtos.SkipFilter.Builder builder = FilterProtos.SkipFilter.newBuilder();

View File

@ -66,9 +66,7 @@ public class SubstringComparator extends ByteArrayComparable {
return Bytes.toString(value, offset, length).toLowerCase(Locale.ROOT).contains(substr) ? 0 : 1; return Bytes.toString(value, offset, length).toLowerCase(Locale.ROOT).contains(substr) ? 0 : 1;
} }
/** /** Returns The comparator serialized using pb */
* @return The comparator serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
ComparatorProtos.SubstringComparator.Builder builder = ComparatorProtos.SubstringComparator.Builder builder =

View File

@ -77,9 +77,7 @@ public class TimestampsFilter extends FilterBase {
init(); init();
} }
/** /** Returns the list of timestamps */
* @return the list of timestamps
*/
public List<Long> getTimestamps() { public List<Long> getTimestamps() {
List<Long> list = new ArrayList<>(timestamps.size()); List<Long> list = new ArrayList<>(timestamps.size());
list.addAll(timestamps); list.addAll(timestamps);
@ -165,9 +163,7 @@ public class TimestampsFilter extends FilterBase {
return new TimestampsFilter(timestamps); return new TimestampsFilter(timestamps);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.TimestampsFilter.Builder builder = FilterProtos.TimestampsFilter.newBuilder(); FilterProtos.TimestampsFilter.Builder builder = FilterProtos.TimestampsFilter.newBuilder();

View File

@ -87,9 +87,7 @@ public class ValueFilter extends CompareFilter {
return new ValueFilter(compareOp, comparator); return new ValueFilter(compareOp, comparator);
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() { public byte[] toByteArray() {
FilterProtos.ValueFilter.Builder builder = FilterProtos.ValueFilter.newBuilder(); FilterProtos.ValueFilter.Builder builder = FilterProtos.ValueFilter.newBuilder();

View File

@ -107,9 +107,7 @@ public class WhileMatchFilter extends FilterBase {
return true; return true;
} }
/** /** Returns The filter serialized using pb */
* @return The filter serialized using pb
*/
@Override @Override
public byte[] toByteArray() throws IOException { public byte[] toByteArray() throws IOException {
FilterProtos.WhileMatchFilter.Builder builder = FilterProtos.WhileMatchFilter.newBuilder(); FilterProtos.WhileMatchFilter.Builder builder = FilterProtos.WhileMatchFilter.newBuilder();

View File

@ -60,9 +60,7 @@ public interface HBaseRpcController extends RpcController, CellScannable {
*/ */
void setPriority(final TableName tn); void setPriority(final TableName tn);
/** /** Returns The priority of this request */
* @return The priority of this request
*/
int getPriority(); int getPriority();
int getCallTimeout(); int getCallTimeout();
@ -110,16 +108,12 @@ public interface HBaseRpcController extends RpcController, CellScannable {
*/ */
void notifyOnCancel(RpcCallback<Object> callback, CancellationCallback action) throws IOException; void notifyOnCancel(RpcCallback<Object> callback, CancellationCallback action) throws IOException;
/** /** Returns True if this Controller is carrying the RPC target Region's RegionInfo. */
* @return True if this Controller is carrying the RPC target Region's RegionInfo.
*/
default boolean hasRegionInfo() { default boolean hasRegionInfo() {
return false; return false;
} }
/** /** Returns Target Region's RegionInfo or null if not available or pertinent. */
* @return Target Region's RegionInfo or null if not available or pertinent.
*/
default RegionInfo getRegionInfo() { default RegionInfo getRegionInfo() {
return null; return null;
} }

View File

@ -101,9 +101,7 @@ public class HBaseRpcControllerImpl implements HBaseRpcController {
return this.regionInfo; return this.regionInfo;
} }
/** /** Returns One-shot cell scanner (you cannot back it up and restart) */
* @return One-shot cell scanner (you cannot back it up and restart)
*/
@Override @Override
public CellScanner cellScanner() { public CellScanner cellScanner() {
return cellScanner; return cellScanner;

View File

@ -96,9 +96,7 @@ class IPCUtil {
return totalSize; return totalSize;
} }
/** /** Returns Size on the wire when the two messages are written with writeDelimitedTo */
* @return Size on the wire when the two messages are written with writeDelimitedTo
*/
public static int getTotalSizeWhenWrittenDelimited(Message... messages) { public static int getTotalSizeWhenWrittenDelimited(Message... messages) {
int totalSize = 0; int totalSize = 0;
for (Message m : messages) { for (Message m : messages) {
@ -149,9 +147,7 @@ class IPCUtil {
serverOverloaded); serverOverloaded);
} }
/** /** Returns True if the exception is a fatal connection exception. */
* @return True if the exception is a fatal connection exception.
*/
static boolean isFatalConnectionException(final ExceptionResponse e) { static boolean isFatalConnectionException(final ExceptionResponse e) {
return e.getExceptionClassName().equals(FatalConnectionException.class.getName()); return e.getExceptionClassName().equals(FatalConnectionException.class.getName());
} }

View File

@ -123,30 +123,22 @@ public class RemoteWithExtrasException extends RemoteException {
return ex; return ex;
} }
/** /** Returns null if not set */
* @return null if not set
*/
public String getHostname() { public String getHostname() {
return this.hostname; return this.hostname;
} }
/** /** Returns -1 if not set */
* @return -1 if not set
*/
public int getPort() { public int getPort() {
return this.port; return this.port;
} }
/** /** Returns True if origin exception was a do not retry type. */
* @return True if origin exception was a do not retry type.
*/
public boolean isDoNotRetry() { public boolean isDoNotRetry() {
return this.doNotRetry; return this.doNotRetry;
} }
/** /** Returns True if the server was considered overloaded when the exception was thrown. */
* @return True if the server was considered overloaded when the exception was thrown.
*/
public boolean isServerOverloaded() { public boolean isServerOverloaded() {
return serverOverloaded; return serverOverloaded;
} }

View File

@ -77,9 +77,7 @@ public class ProtobufMagic {
return compareTo(PB_MAGIC, 0, PB_MAGIC.length, bytes, offset, PB_MAGIC.length) == 0; return compareTo(PB_MAGIC, 0, PB_MAGIC.length, bytes, offset, PB_MAGIC.length) == 0;
} }
/** /** Returns Length of {@link #PB_MAGIC} */
* @return Length of {@link #PB_MAGIC}
*/
public static int lengthOfPBMagic() { public static int lengthOfPBMagic() {
return PB_MAGIC.length; return PB_MAGIC.length;
} }

View File

@ -223,9 +223,7 @@ public final class ProtobufUtil {
} }
} }
/** /** Returns Length of {@link ProtobufMagic#lengthOfPBMagic()} */
* @return Length of {@link ProtobufMagic#lengthOfPBMagic()}
*/
public static int lengthOfPBMagic() { public static int lengthOfPBMagic() {
return ProtobufMagic.lengthOfPBMagic(); return ProtobufMagic.lengthOfPBMagic();
} }

View File

@ -92,32 +92,32 @@ public class QuotaFilter {
return this; return this;
} }
/** @return true if the filter is empty */ /** Returns true if the filter is empty */
public boolean isNull() { public boolean isNull() {
return !hasFilters; return !hasFilters;
} }
/** @return the QuotaType types that we want to filter one */ /** Returns the QuotaType types that we want to filter one */
public Set<QuotaType> getTypeFilters() { public Set<QuotaType> getTypeFilters() {
return types; return types;
} }
/** @return the Namespace filter regex */ /** Returns the Namespace filter regex */
public String getNamespaceFilter() { public String getNamespaceFilter() {
return namespaceRegex; return namespaceRegex;
} }
/** @return the Table filter regex */ /** Returns the Table filter regex */
public String getTableFilter() { public String getTableFilter() {
return tableRegex; return tableRegex;
} }
/** @return the User filter regex */ /** Returns the User filter regex */
public String getUserFilter() { public String getUserFilter() {
return userRegex; return userRegex;
} }
/** @return the RegionServer filter regex */ /** Returns the RegionServer filter regex */
public String getRegionServerFilter() { public String getRegionServerFilter() {
return regionServerRegex; return regionServerRegex;
} }

View File

@ -74,9 +74,7 @@ public class SpaceQuotaSnapshot implements SpaceQuotaSnapshotView {
return policy; return policy;
} }
/** /** Returns {@code true} if the quota is being violated, {@code false} otherwise. */
* @return {@code true} if the quota is being violated, {@code false} otherwise.
*/
@Override @Override
public boolean isInViolation() { public boolean isInViolation() {
return inViolation; return inViolation;

View File

@ -39,9 +39,7 @@ public interface SpaceQuotaSnapshotView {
*/ */
Optional<SpaceViolationPolicy> getPolicy(); Optional<SpaceViolationPolicy> getPolicy();
/** /** Returns {@code true} if the quota is being violated, {@code false} otherwise. */
* @return {@code true} if the quota is being violated, {@code false} otherwise.
*/
boolean isInViolation(); boolean isInViolation();
} }

View File

@ -203,7 +203,7 @@ public class Permission extends VersionedWritable {
return raw.toString(); return raw.toString();
} }
/** @return the object version number */ /** Returns the object version number */
@Override @Override
public byte getVersion() { public byte getVersion() {
return VERSION; return VERSION;

Some files were not shown because too many files have changed in this diff Show More