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:
parent
7484a9163a
commit
acf144717b
|
@ -89,8 +89,6 @@ public interface AsyncFSOutput extends Closeable {
|
|||
@Override
|
||||
void close() throws IOException;
|
||||
|
||||
/**
|
||||
* @return byteSize success synced to underlying filesystem.
|
||||
*/
|
||||
/** Returns byteSize success synced to underlying filesystem. */
|
||||
long getSyncedLength();
|
||||
}
|
||||
|
|
|
@ -186,9 +186,7 @@ public final class RecoverLeaseFSUtils {
|
|||
return recovered;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Detail to append to any log message around lease recovering.
|
||||
*/
|
||||
/** Returns Detail to append to any log message around lease recovering. */
|
||||
private static String getLogMessageDetail(final int nbAttempt, final Path p,
|
||||
final long startWaiting) {
|
||||
return "attempt=" + nbAttempt + " on file=" + p + " after "
|
||||
|
|
|
@ -87,9 +87,7 @@ public class FavoredStochasticBalancer extends StochasticLoadBalancer
|
|||
return fnPickers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return any candidate generator in random
|
||||
*/
|
||||
/** Returns any candidate generator in random */
|
||||
@Override
|
||||
protected CandidateGenerator getRandomGenerator() {
|
||||
return candidateGenerators.get(ThreadLocalRandom.current().nextInt(candidateGenerators.size()));
|
||||
|
|
|
@ -398,9 +398,7 @@ public class CatalogFamilyFormat {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the column in <code>cell</code> matches the regex 'info:merge.*'.
|
||||
*/
|
||||
/** Returns True if the column in <code>cell</code> matches the regex 'info:merge.*'. */
|
||||
public static boolean isMergeQualifierPrefix(Cell cell) {
|
||||
// Check to see if has family and that qualifier starts with the merge qualifier 'merge'
|
||||
return CellUtil.matchingFamily(cell, HConstants.CATALOG_FAMILY)
|
||||
|
|
|
@ -382,9 +382,7 @@ public final class ClientMetaTableAccessor {
|
|||
|
||||
abstract void add(Result r);
|
||||
|
||||
/**
|
||||
* @return Collected results; wait till visits complete to collect all possible results
|
||||
*/
|
||||
/** Returns Collected results; wait till visits complete to collect all possible results */
|
||||
List<T> getResults() {
|
||||
return this.results;
|
||||
}
|
||||
|
|
|
@ -45,9 +45,7 @@ public class ClusterId {
|
|||
this.id = uuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The clusterid serialized using pb w/ pb magic prefix
|
||||
*/
|
||||
/** Returns The clusterid serialized using pb w/ pb magic prefix */
|
||||
public byte[] toByteArray() {
|
||||
return ProtobufUtil.prependPBMagic(convert().toByteArray());
|
||||
}
|
||||
|
@ -74,9 +72,7 @@ public class ClusterId {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A pb instance to represent this instance.
|
||||
*/
|
||||
/** Returns A pb instance to represent this instance. */
|
||||
public ClusterIdProtos.ClusterId convert() {
|
||||
ClusterIdProtos.ClusterId.Builder builder = ClusterIdProtos.ClusterId.newBuilder();
|
||||
return builder.setClusterId(this.id).build();
|
||||
|
|
|
@ -69,38 +69,26 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
@InterfaceAudience.Public
|
||||
public interface ClusterMetrics {
|
||||
|
||||
/**
|
||||
* @return the HBase version string as reported by the HMaster
|
||||
*/
|
||||
/** Returns the HBase version string as reported by the HMaster */
|
||||
@Nullable
|
||||
String getHBaseVersion();
|
||||
|
||||
/**
|
||||
* @return the names of region servers on the dead list
|
||||
*/
|
||||
/** Returns the names of region servers on the dead list */
|
||||
List<ServerName> getDeadServerNames();
|
||||
|
||||
/**
|
||||
* @return the names of region servers on the decommissioned list
|
||||
*/
|
||||
/** Returns the names of region servers on the decommissioned list */
|
||||
List<ServerName> getDecommissionedServerNames();
|
||||
|
||||
/**
|
||||
* @return the names of region servers on the live list
|
||||
*/
|
||||
/** Returns the names of region servers on the live list */
|
||||
Map<ServerName, ServerMetrics> getLiveServerMetrics();
|
||||
|
||||
/**
|
||||
* @return the number of regions deployed on the cluster
|
||||
*/
|
||||
/** Returns the number of regions deployed on the cluster */
|
||||
default int getRegionCount() {
|
||||
return getLiveServerMetrics().entrySet().stream()
|
||||
.mapToInt(v -> v.getValue().getRegionMetrics().size()).sum();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the number of requests since last report
|
||||
*/
|
||||
/** Returns the number of requests since last report */
|
||||
default long getRequestCount() {
|
||||
return getLiveServerMetrics().entrySet().stream()
|
||||
.flatMap(v -> v.getValue().getRegionMetrics().values().stream())
|
||||
|
@ -114,9 +102,7 @@ public interface ClusterMetrics {
|
|||
@Nullable
|
||||
ServerName getMasterName();
|
||||
|
||||
/**
|
||||
* @return the names of backup masters
|
||||
*/
|
||||
/** Returns the names of backup masters */
|
||||
List<ServerName> getBackupMasterNames();
|
||||
|
||||
@InterfaceAudience.Private
|
||||
|
@ -147,9 +133,7 @@ public interface ClusterMetrics {
|
|||
|
||||
List<ServerName> getServersName();
|
||||
|
||||
/**
|
||||
* @return the average cluster load
|
||||
*/
|
||||
/** Returns the average cluster load */
|
||||
default double getAverageLoad() {
|
||||
int serverSize = getLiveServerMetrics().size();
|
||||
if (serverSize == 0) {
|
||||
|
|
|
@ -28,19 +28,19 @@ import org.apache.yetus.audience.InterfaceStability;
|
|||
@InterfaceStability.Evolving
|
||||
public interface CoprocessorEnvironment<C extends Coprocessor> {
|
||||
|
||||
/** @return the Coprocessor interface version */
|
||||
/** Returns the Coprocessor interface version */
|
||||
int getVersion();
|
||||
|
||||
/** @return the HBase version as a string (e.g. "0.21.0") */
|
||||
/** Returns the HBase version as a string (e.g. "0.21.0") */
|
||||
String getHBaseVersion();
|
||||
|
||||
/** @return the loaded coprocessor instance */
|
||||
/** Returns the loaded coprocessor instance */
|
||||
C getInstance();
|
||||
|
||||
/** @return the priority assigned to the loaded coprocessor */
|
||||
/** Returns the priority assigned to the loaded coprocessor */
|
||||
int getPriority();
|
||||
|
||||
/** @return the load sequence number */
|
||||
/** Returns the load sequence number */
|
||||
int getLoadSequence();
|
||||
|
||||
/**
|
||||
|
@ -49,8 +49,6 @@ public interface CoprocessorEnvironment<C extends Coprocessor> {
|
|||
*/
|
||||
Configuration getConfiguration();
|
||||
|
||||
/**
|
||||
* @return the classloader for the loaded coprocessor instance
|
||||
*/
|
||||
/** Returns the classloader for the loaded coprocessor instance */
|
||||
ClassLoader getClassLoader();
|
||||
}
|
||||
|
|
|
@ -63,9 +63,7 @@ public class HBaseServerException extends HBaseIOException {
|
|||
this.serverOverloaded = serverOverloaded;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if server was considered overloaded when exception was thrown
|
||||
*/
|
||||
/** Returns True if server was considered overloaded when exception was thrown */
|
||||
public boolean isServerOverloaded() {
|
||||
return serverOverloaded;
|
||||
}
|
||||
|
|
|
@ -28,44 +28,28 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
@InterfaceAudience.Public
|
||||
public interface RegionMetrics {
|
||||
|
||||
/**
|
||||
* @return the region name
|
||||
*/
|
||||
/** Returns the region name */
|
||||
byte[] getRegionName();
|
||||
|
||||
/**
|
||||
* @return the number of stores
|
||||
*/
|
||||
/** Returns the number of stores */
|
||||
int getStoreCount();
|
||||
|
||||
/**
|
||||
* @return the number of storefiles
|
||||
*/
|
||||
/** Returns the number of storefiles */
|
||||
int getStoreFileCount();
|
||||
|
||||
/**
|
||||
* @return the total size of the storefiles
|
||||
*/
|
||||
/** Returns the total size of the storefiles */
|
||||
Size getStoreFileSize();
|
||||
|
||||
/**
|
||||
* @return the memstore size
|
||||
*/
|
||||
/** Returns the memstore size */
|
||||
Size getMemStoreSize();
|
||||
|
||||
/**
|
||||
* @return the number of read requests made to region
|
||||
*/
|
||||
/** Returns the number of read requests made to region */
|
||||
long getReadRequestCount();
|
||||
|
||||
/**
|
||||
* @return the number of write requests made to region
|
||||
*/
|
||||
/** Returns the number of write requests made to region */
|
||||
long getWriteRequestCount();
|
||||
|
||||
/**
|
||||
* @return the number of coprocessor service requests made to region
|
||||
*/
|
||||
/** Returns the number of coprocessor service requests made to region */
|
||||
public long getCpRequestCount();
|
||||
|
||||
/**
|
||||
|
@ -76,16 +60,12 @@ public interface RegionMetrics {
|
|||
return getReadRequestCount() + getWriteRequestCount() + getCpRequestCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the region name as a string
|
||||
*/
|
||||
/** Returns the region name as a string */
|
||||
default String getNameAsString() {
|
||||
return Bytes.toStringBinary(getRegionName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the number of filtered read requests made to region
|
||||
*/
|
||||
/** Returns the number of filtered read requests made to region */
|
||||
long getFilteredReadRequestCount();
|
||||
|
||||
/**
|
||||
|
@ -96,29 +76,19 @@ public interface RegionMetrics {
|
|||
*/
|
||||
Size getStoreFileIndexSize();
|
||||
|
||||
/**
|
||||
* @return The current total size of root-level indexes for the region
|
||||
*/
|
||||
/** Returns The current total size of root-level indexes for the region */
|
||||
Size getStoreFileRootLevelIndexSize();
|
||||
|
||||
/**
|
||||
* @return The total size of all index blocks, not just the root level
|
||||
*/
|
||||
/** Returns The total size of all index blocks, not just the root level */
|
||||
Size getStoreFileUncompressedDataIndexSize();
|
||||
|
||||
/**
|
||||
* @return The total size of all Bloom filter blocks, not just loaded into the block cache
|
||||
*/
|
||||
/** Returns The total size of all Bloom filter blocks, not just loaded into the block cache */
|
||||
Size getBloomFilterSize();
|
||||
|
||||
/**
|
||||
* @return the total number of cells in current compaction
|
||||
*/
|
||||
/** Returns the total number of cells in current compaction */
|
||||
long getCompactingCellCount();
|
||||
|
||||
/**
|
||||
* @return the number of already compacted kvs in current compaction
|
||||
*/
|
||||
/** Returns the number of already compacted kvs in current compaction */
|
||||
long getCompactedCellCount();
|
||||
|
||||
/**
|
||||
|
@ -127,29 +97,19 @@ public interface RegionMetrics {
|
|||
*/
|
||||
long getCompletedSequenceId();
|
||||
|
||||
/**
|
||||
* @return completed sequence id per store.
|
||||
*/
|
||||
/** Returns completed sequence id per store. */
|
||||
Map<byte[], Long> getStoreSequenceId();
|
||||
|
||||
/**
|
||||
* @return the uncompressed size of the storefiles
|
||||
*/
|
||||
/** Returns the uncompressed size of the storefiles */
|
||||
Size getUncompressedStoreFileSize();
|
||||
|
||||
/**
|
||||
* @return the data locality of region in the regionserver.
|
||||
*/
|
||||
/** Returns the data locality of region in the regionserver. */
|
||||
float getDataLocality();
|
||||
|
||||
/**
|
||||
* @return the timestamp of the oldest hfile for any store of this region.
|
||||
*/
|
||||
/** Returns the timestamp of the oldest hfile for any store of this region. */
|
||||
long getLastMajorCompactionTimestamp();
|
||||
|
||||
/**
|
||||
* @return the reference count for the stores of this region
|
||||
*/
|
||||
/** Returns the reference count for the stores of this region */
|
||||
int getStoreRefCount();
|
||||
|
||||
/**
|
||||
|
@ -164,9 +124,7 @@ public interface RegionMetrics {
|
|||
*/
|
||||
float getDataLocalityForSsd();
|
||||
|
||||
/**
|
||||
* @return the data at local weight of this region in the regionserver
|
||||
*/
|
||||
/** Returns the data at local weight of this region in the regionserver */
|
||||
long getBlocksLocalWeight();
|
||||
|
||||
/**
|
||||
|
@ -175,13 +133,9 @@ public interface RegionMetrics {
|
|||
*/
|
||||
long getBlocksLocalWithSsdWeight();
|
||||
|
||||
/**
|
||||
* @return the block total weight of this region
|
||||
*/
|
||||
/** Returns the block total weight of this region */
|
||||
long getBlocksTotalWeight();
|
||||
|
||||
/**
|
||||
* @return the compaction state of this region
|
||||
*/
|
||||
/** Returns the compaction state of this region */
|
||||
CompactionState getCompactionState();
|
||||
}
|
||||
|
|
|
@ -33,48 +33,32 @@ public interface ServerMetrics {
|
|||
|
||||
ServerName getServerName();
|
||||
|
||||
/**
|
||||
* @return the version number of a regionserver.
|
||||
*/
|
||||
/** Returns the version number of a regionserver. */
|
||||
default int getVersionNumber() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the string type version of a regionserver.
|
||||
*/
|
||||
/** Returns the string type version of a regionserver. */
|
||||
default String getVersion() {
|
||||
return "0.0.0";
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the number of requests per second.
|
||||
*/
|
||||
/** Returns the number of requests per second. */
|
||||
long getRequestCountPerSecond();
|
||||
|
||||
/**
|
||||
* @return total Number of requests from the start of the region server.
|
||||
*/
|
||||
/** Returns total Number of requests from the start of the region server. */
|
||||
long getRequestCount();
|
||||
|
||||
/**
|
||||
* @return total Number of read requests from the start of the region server.
|
||||
*/
|
||||
/** Returns total Number of read requests from the start of the region server. */
|
||||
long getReadRequestsCount();
|
||||
|
||||
/**
|
||||
* @return total Number of write requests from the start of the region server.
|
||||
*/
|
||||
/** Returns total Number of write requests from the start of the region server. */
|
||||
long getWriteRequestsCount();
|
||||
|
||||
/**
|
||||
* @return the amount of used heap
|
||||
*/
|
||||
/** Returns the amount of used heap */
|
||||
Size getUsedHeapSize();
|
||||
|
||||
/**
|
||||
* @return the maximum allowable size of the heap
|
||||
*/
|
||||
/** Returns the maximum allowable size of the heap */
|
||||
Size getMaxHeapSize();
|
||||
|
||||
int getInfoServerPort();
|
||||
|
@ -97,14 +81,10 @@ public interface ServerMetrics {
|
|||
@Nullable
|
||||
ReplicationLoadSink getReplicationLoadSink();
|
||||
|
||||
/**
|
||||
* @return region load metrics
|
||||
*/
|
||||
/** Returns region load metrics */
|
||||
Map<byte[], RegionMetrics> getRegionMetrics();
|
||||
|
||||
/**
|
||||
* @return metrics per user
|
||||
*/
|
||||
/** Returns metrics per user */
|
||||
Map<byte[], UserMetrics> getUserMetrics();
|
||||
|
||||
/**
|
||||
|
@ -113,14 +93,10 @@ public interface ServerMetrics {
|
|||
*/
|
||||
Set<String> getCoprocessorNames();
|
||||
|
||||
/**
|
||||
* @return the timestamp (server side) of generating this metrics
|
||||
*/
|
||||
/** Returns the timestamp (server side) of generating this metrics */
|
||||
long getReportTimestamp();
|
||||
|
||||
/**
|
||||
* @return the last timestamp (server side) of generating this metrics
|
||||
*/
|
||||
/** Returns the last timestamp (server side) of generating this metrics */
|
||||
long getLastReportTimestamp();
|
||||
|
||||
/**
|
||||
|
|
|
@ -69,9 +69,7 @@ public final class Size implements Comparable<Size> {
|
|||
this.unit = Preconditions.checkNotNull(unit);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return size unit
|
||||
*/
|
||||
/** Returns size unit */
|
||||
public Unit getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
|
|
@ -40,19 +40,13 @@ public interface UserMetrics {
|
|||
long getFilteredReadRequestsCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the user name
|
||||
*/
|
||||
/** Returns the user name */
|
||||
byte[] getUserName();
|
||||
|
||||
/**
|
||||
* @return the number of read requests made by user
|
||||
*/
|
||||
/** Returns the number of read requests made by user */
|
||||
long getReadRequestCount();
|
||||
|
||||
/**
|
||||
* @return the number of write requests made by user
|
||||
*/
|
||||
/** Returns the number of write requests made by user */
|
||||
long getWriteRequestCount();
|
||||
|
||||
/**
|
||||
|
@ -63,20 +57,14 @@ public interface UserMetrics {
|
|||
return getReadRequestCount() + getWriteRequestCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the user name as a string
|
||||
*/
|
||||
/** Returns the user name as a string */
|
||||
default String getNameAsString() {
|
||||
return Bytes.toStringBinary(getUserName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return metrics per client(hostname)
|
||||
*/
|
||||
/** Returns metrics per client(hostname) */
|
||||
Map<String, ClientMetrics> getClientMetrics();
|
||||
|
||||
/**
|
||||
* @return count of filtered read requests for a user
|
||||
*/
|
||||
/** Returns count of filtered read requests for a user */
|
||||
long getFilteredReadRequests();
|
||||
}
|
||||
|
|
|
@ -111,9 +111,7 @@ public interface Admin extends Abortable, Closeable {
|
|||
@Override
|
||||
boolean isAborted();
|
||||
|
||||
/**
|
||||
* @return Connection used by this object.
|
||||
*/
|
||||
/** Returns Connection used by this object. */
|
||||
Connection getConnection();
|
||||
|
||||
/**
|
||||
|
@ -1162,9 +1160,7 @@ public interface Admin extends Abortable, Closeable {
|
|||
List<RegionMetrics> getRegionMetrics(ServerName serverName, TableName tableName)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* @return Configuration used by the instance.
|
||||
*/
|
||||
/** Returns Configuration used by the instance. */
|
||||
Configuration getConfiguration();
|
||||
|
||||
/**
|
||||
|
|
|
@ -92,9 +92,7 @@ public class Append extends Mutation {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return current setting for returnResults
|
||||
*/
|
||||
/** Returns current setting for returnResults */
|
||||
// This method makes public the superclasses's protected method.
|
||||
@Override
|
||||
public boolean isReturnResults() {
|
||||
|
|
|
@ -1073,34 +1073,24 @@ public interface AsyncAdmin {
|
|||
CompletableFuture<Void> recommissionRegionServer(ServerName server,
|
||||
List<byte[]> encodedRegionNames);
|
||||
|
||||
/**
|
||||
* @return cluster status wrapped by {@link CompletableFuture}
|
||||
*/
|
||||
/** Returns cluster status wrapped by {@link CompletableFuture} */
|
||||
CompletableFuture<ClusterMetrics> getClusterMetrics();
|
||||
|
||||
/**
|
||||
* @return cluster status wrapped by {@link CompletableFuture}
|
||||
*/
|
||||
/** Returns cluster status wrapped by {@link CompletableFuture} */
|
||||
CompletableFuture<ClusterMetrics> getClusterMetrics(EnumSet<Option> options);
|
||||
|
||||
/**
|
||||
* @return current master server name wrapped by {@link CompletableFuture}
|
||||
*/
|
||||
/** Returns current master server name wrapped by {@link CompletableFuture} */
|
||||
default CompletableFuture<ServerName> getMaster() {
|
||||
return getClusterMetrics(EnumSet.of(Option.MASTER)).thenApply(ClusterMetrics::getMasterName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return current backup master list wrapped by {@link CompletableFuture}
|
||||
*/
|
||||
/** Returns current backup master list wrapped by {@link CompletableFuture} */
|
||||
default CompletableFuture<Collection<ServerName>> getBackupMasters() {
|
||||
return getClusterMetrics(EnumSet.of(Option.BACKUP_MASTERS))
|
||||
.thenApply(ClusterMetrics::getBackupMasterNames);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return current live region servers list wrapped by {@link CompletableFuture}
|
||||
*/
|
||||
/** Returns current live region servers list wrapped by {@link CompletableFuture} */
|
||||
default CompletableFuture<Collection<ServerName>> getRegionServers() {
|
||||
return getClusterMetrics(EnumSet.of(Option.SERVERS_NAME))
|
||||
.thenApply(ClusterMetrics::getServersName);
|
||||
|
@ -1132,9 +1122,7 @@ public interface AsyncAdmin {
|
|||
return future;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a list of master coprocessors wrapped by {@link CompletableFuture}
|
||||
*/
|
||||
/** Returns a list of master coprocessors wrapped by {@link CompletableFuture} */
|
||||
default CompletableFuture<List<String>> getMasterCoprocessorNames() {
|
||||
return getClusterMetrics(EnumSet.of(Option.MASTER_COPROCESSORS))
|
||||
.thenApply(ClusterMetrics::getMasterCoprocessorNames);
|
||||
|
|
|
@ -250,66 +250,48 @@ public final class CheckAndMutate implements Row {
|
|||
this.action = action;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the row
|
||||
*/
|
||||
/** Returns the row */
|
||||
@Override
|
||||
public byte[] getRow() {
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the family to check
|
||||
*/
|
||||
/** Returns the family to check */
|
||||
public byte[] getFamily() {
|
||||
return family;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the qualifier to check
|
||||
*/
|
||||
/** Returns the qualifier to check */
|
||||
public byte[] getQualifier() {
|
||||
return qualifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the comparison operator
|
||||
*/
|
||||
/** Returns the comparison operator */
|
||||
public CompareOperator getCompareOp() {
|
||||
return op;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the expected value
|
||||
*/
|
||||
/** Returns the expected value */
|
||||
public byte[] getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the filter to check
|
||||
*/
|
||||
/** Returns the filter to check */
|
||||
public Filter getFilter() {
|
||||
return filter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return whether this has a filter or not
|
||||
*/
|
||||
/** Returns whether this has a filter or not */
|
||||
public boolean hasFilter() {
|
||||
return filter != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the time range to check
|
||||
*/
|
||||
/** Returns the time range to check */
|
||||
public TimeRange getTimeRange() {
|
||||
return timeRange;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the action done if check succeeds
|
||||
*/
|
||||
/** Returns the action done if check succeeds */
|
||||
public Row getAction() {
|
||||
return action;
|
||||
}
|
||||
|
|
|
@ -32,16 +32,12 @@ public class CheckAndMutateResult {
|
|||
this.result = result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Whether the CheckAndMutate operation is successful or not
|
||||
*/
|
||||
/** Returns Whether the CheckAndMutate operation is successful or not */
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return It is used only for CheckAndMutate operations with Increment/Append. Otherwise null
|
||||
*/
|
||||
/** Returns It is used only for CheckAndMutate operations with Increment/Append. Otherwise null */
|
||||
public Result getResult() {
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -58,9 +58,7 @@ final class ClientIdGenerator {
|
|||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PID of the current process, if it can be extracted from JVM name, or null.
|
||||
*/
|
||||
/** Returns PID of the current process, if it can be extracted from JVM name, or null. */
|
||||
public static Long getPid() {
|
||||
String name = ManagementFactory.getRuntimeMXBean().getName();
|
||||
String[] nameParts = name.split("@");
|
||||
|
|
|
@ -77,39 +77,25 @@ public interface ColumnFamilyDescriptor {
|
|||
return lcf.getConfiguration().hashCode() - rcf.getConfiguration().hashCode();
|
||||
};
|
||||
|
||||
/**
|
||||
* @return The storefile/hfile blocksize for this column family.
|
||||
*/
|
||||
/** Returns The storefile/hfile blocksize for this column family. */
|
||||
int getBlocksize();
|
||||
|
||||
/**
|
||||
* @return bloom filter type used for new StoreFiles in ColumnFamily
|
||||
*/
|
||||
/** Returns bloom filter type used for new StoreFiles in ColumnFamily */
|
||||
BloomType getBloomFilterType();
|
||||
|
||||
/**
|
||||
* @return Compression type setting.
|
||||
*/
|
||||
/** Returns Compression type setting. */
|
||||
Compression.Algorithm getCompactionCompressionType();
|
||||
|
||||
/**
|
||||
* @return Compression type setting for major compactions.
|
||||
*/
|
||||
/** Returns Compression type setting for major compactions. */
|
||||
Compression.Algorithm getMajorCompactionCompressionType();
|
||||
|
||||
/**
|
||||
* @return Compression type setting for minor compactions.
|
||||
*/
|
||||
/** Returns Compression type setting for minor compactions. */
|
||||
Compression.Algorithm getMinorCompactionCompressionType();
|
||||
|
||||
/**
|
||||
* @return Compression type setting.
|
||||
*/
|
||||
/** Returns Compression type setting. */
|
||||
Compression.Algorithm getCompressionType();
|
||||
|
||||
/**
|
||||
* @return an unmodifiable map.
|
||||
*/
|
||||
/** Returns an unmodifiable map. */
|
||||
Map<String, String> getConfiguration();
|
||||
|
||||
/**
|
||||
|
@ -118,24 +104,16 @@ public interface ColumnFamilyDescriptor {
|
|||
*/
|
||||
String getConfigurationValue(String key);
|
||||
|
||||
/**
|
||||
* @return replication factor set for this CF
|
||||
*/
|
||||
/** Returns replication factor set for this CF */
|
||||
short getDFSReplication();
|
||||
|
||||
/**
|
||||
* @return the data block encoding algorithm used in block cache and optionally on disk
|
||||
*/
|
||||
/** Returns the data block encoding algorithm used in block cache and optionally on disk */
|
||||
DataBlockEncoding getDataBlockEncoding();
|
||||
|
||||
/**
|
||||
* @return Return the raw crypto key attribute for the family, or null if not set
|
||||
*/
|
||||
/** Returns Return the raw crypto key attribute for the family, or null if not set */
|
||||
byte[] getEncryptionKey();
|
||||
|
||||
/**
|
||||
* @return Return the encryption algorithm in use by this family
|
||||
*/
|
||||
/** Returns Return the encryption algorithm in use by this family */
|
||||
String getEncryptionType();
|
||||
|
||||
/**
|
||||
|
@ -144,19 +122,13 @@ public interface ColumnFamilyDescriptor {
|
|||
*/
|
||||
MemoryCompactionPolicy getInMemoryCompaction();
|
||||
|
||||
/**
|
||||
* @return return the KeepDeletedCells
|
||||
*/
|
||||
/** Returns return the KeepDeletedCells */
|
||||
KeepDeletedCells getKeepDeletedCells();
|
||||
|
||||
/**
|
||||
* @return maximum number of versions
|
||||
*/
|
||||
/** Returns maximum number of versions */
|
||||
int getMaxVersions();
|
||||
|
||||
/**
|
||||
* @return The minimum number of versions to keep.
|
||||
*/
|
||||
/** Returns The minimum number of versions to keep. */
|
||||
int getMinVersions();
|
||||
|
||||
/**
|
||||
|
@ -171,19 +143,13 @@ public interface ColumnFamilyDescriptor {
|
|||
*/
|
||||
long getMobThreshold();
|
||||
|
||||
/**
|
||||
* @return a copy of Name of this column family
|
||||
*/
|
||||
/** Returns a copy of Name of this column family */
|
||||
byte[] getName();
|
||||
|
||||
/**
|
||||
* @return Name of this column family
|
||||
*/
|
||||
/** Returns Name of this column family */
|
||||
String getNameAsString();
|
||||
|
||||
/**
|
||||
* @return the scope tag
|
||||
*/
|
||||
/** Returns the scope tag */
|
||||
int getScope();
|
||||
|
||||
/**
|
||||
|
@ -193,9 +159,7 @@ public interface ColumnFamilyDescriptor {
|
|||
*/
|
||||
String getStoragePolicy();
|
||||
|
||||
/**
|
||||
* @return Time-to-live of cell contents, in seconds.
|
||||
*/
|
||||
/** Returns Time-to-live of cell contents, in seconds. */
|
||||
int getTimeToLive();
|
||||
|
||||
/**
|
||||
|
@ -228,19 +192,13 @@ public interface ColumnFamilyDescriptor {
|
|||
*/
|
||||
boolean isBlockCacheEnabled();
|
||||
|
||||
/**
|
||||
* @return true if we should cache bloomfilter blocks on write
|
||||
*/
|
||||
/** Returns true if we should cache bloomfilter blocks on write */
|
||||
boolean isCacheBloomsOnWrite();
|
||||
|
||||
/**
|
||||
* @return true if we should cache data blocks on write
|
||||
*/
|
||||
/** Returns true if we should cache data blocks on write */
|
||||
boolean isCacheDataOnWrite();
|
||||
|
||||
/**
|
||||
* @return true if we should cache index blocks on write
|
||||
*/
|
||||
/** Returns true if we should cache index blocks on write */
|
||||
boolean isCacheIndexesOnWrite();
|
||||
|
||||
/**
|
||||
|
@ -249,9 +207,7 @@ public interface ColumnFamilyDescriptor {
|
|||
*/
|
||||
boolean isCompressTags();
|
||||
|
||||
/**
|
||||
* @return true if we should evict cached blocks from the blockcache on close
|
||||
*/
|
||||
/** Returns true if we should evict cached blocks from the blockcache on close */
|
||||
boolean isEvictBlocksOnClose();
|
||||
|
||||
/**
|
||||
|
@ -266,14 +222,10 @@ public interface ColumnFamilyDescriptor {
|
|||
*/
|
||||
boolean isMobEnabled();
|
||||
|
||||
/**
|
||||
* @return true if we should prefetch blocks into the blockcache on open
|
||||
*/
|
||||
/** Returns true if we should prefetch blocks into the blockcache on open */
|
||||
boolean isPrefetchBlocksOnOpen();
|
||||
|
||||
/**
|
||||
* @return Column family descriptor with only the customized attributes.
|
||||
*/
|
||||
/** Returns Column family descriptor with only the customized attributes. */
|
||||
String toStringCustomizedValues();
|
||||
|
||||
/**
|
||||
|
|
|
@ -59,9 +59,7 @@ public interface Connection extends Abortable, Closeable {
|
|||
* general methods.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @return Configuration instance being used by this Connection instance.
|
||||
*/
|
||||
/** Returns Configuration instance being used by this Connection instance. */
|
||||
Configuration getConfiguration();
|
||||
|
||||
/**
|
||||
|
@ -182,9 +180,7 @@ public interface Connection extends Abortable, Closeable {
|
|||
*/
|
||||
AsyncConnection toAsyncConnection();
|
||||
|
||||
/**
|
||||
* @return the cluster ID unique to this HBase cluster.
|
||||
*/
|
||||
/** Returns the cluster ID unique to this HBase cluster. */
|
||||
String getClusterId();
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,9 +32,7 @@ final class ConnectionRegistryFactory {
|
|||
private ConnectionRegistryFactory() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The connection registry implementation to use.
|
||||
*/
|
||||
/** Returns The connection registry implementation to use. */
|
||||
static ConnectionRegistry getRegistry(Configuration conf) {
|
||||
Class<? extends ConnectionRegistry> clazz =
|
||||
conf.getClass(CLIENT_CONNECTION_REGISTRY_IMPL_CONF_KEY, RpcConnectionRegistry.class,
|
||||
|
|
|
@ -28,23 +28,17 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
*/
|
||||
@InterfaceAudience.Public
|
||||
public interface CoprocessorDescriptor {
|
||||
/**
|
||||
* @return the name of the class or interface represented by this object.
|
||||
*/
|
||||
/** Returns the name of the class or interface represented by this object. */
|
||||
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();
|
||||
|
||||
/**
|
||||
* @return The order to execute this coprocessor
|
||||
*/
|
||||
/** Returns The order to execute this coprocessor */
|
||||
int getPriority();
|
||||
|
||||
/**
|
||||
* @return Arbitrary key-value parameter pairs passed into the coprocessor.
|
||||
*/
|
||||
/** Returns Arbitrary key-value parameter pairs passed into the coprocessor. */
|
||||
Map<String, String> getProperties();
|
||||
}
|
||||
|
|
|
@ -164,9 +164,7 @@ public class Increment extends Mutation {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return current setting for returnResults
|
||||
*/
|
||||
/** Returns current setting for returnResults */
|
||||
// This method makes public the superclasses's protected method.
|
||||
@Override
|
||||
public boolean isReturnResults() {
|
||||
|
|
|
@ -44,9 +44,7 @@ public class MultiResponse extends AbstractResponse {
|
|||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Number of pairs in this container
|
||||
*/
|
||||
/** Returns Number of pairs in this container */
|
||||
public int size() {
|
||||
int size = 0;
|
||||
for (RegionResult result : results.values()) {
|
||||
|
@ -68,9 +66,7 @@ public class MultiResponse extends AbstractResponse {
|
|||
exceptions.put(regionName, ie);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the exception for the region, if any. Null otherwise.
|
||||
*/
|
||||
/** Returns the exception for the region, if any. Null otherwise. */
|
||||
public Throwable getException(byte[] regionName) {
|
||||
return exceptions.get(regionName);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
public String getShortNameToLog() {
|
||||
return RegionInfo.prettyPrint(this.getEncodedName());
|
||||
}
|
||||
|
||||
/** @return the regionId */
|
||||
/** Returns the regionId */
|
||||
@Override
|
||||
public long getRegionId() {
|
||||
return regionId;
|
||||
|
@ -149,15 +149,13 @@ class MutableRegionInfo implements RegionInfo {
|
|||
return regionName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Region name as a String for use in logging, etc.
|
||||
*/
|
||||
/** Returns Region name as a String for use in logging, etc. */
|
||||
@Override
|
||||
public String getRegionNameAsString() {
|
||||
return RegionInfo.getRegionNameAsString(this, this.regionName);
|
||||
}
|
||||
|
||||
/** @return the encoded region name */
|
||||
/** Returns the encoded region name */
|
||||
@Override
|
||||
public String getEncodedName() {
|
||||
return this.encodedName;
|
||||
|
@ -168,13 +166,13 @@ class MutableRegionInfo implements RegionInfo {
|
|||
return this.encodedNameAsBytes;
|
||||
}
|
||||
|
||||
/** @return the startKey */
|
||||
/** Returns the startKey */
|
||||
@Override
|
||||
public byte[] getStartKey() {
|
||||
return startKey;
|
||||
}
|
||||
|
||||
/** @return the endKey */
|
||||
/** Returns the endKey */
|
||||
@Override
|
||||
public byte[] getEndKey() {
|
||||
return endKey;
|
||||
|
@ -219,15 +217,13 @@ class MutableRegionInfo implements RegionInfo {
|
|||
|| 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
|
||||
public boolean isMetaRegion() {
|
||||
return tableName.equals(TableName.META_TABLE_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if has been split and has daughters.
|
||||
*/
|
||||
/** Returns True if has been split and has daughters. */
|
||||
@Override
|
||||
public boolean isSplit() {
|
||||
return this.split;
|
||||
|
|
|
@ -326,9 +326,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the set of clusterIds that have consumed the mutation
|
||||
*/
|
||||
/** Returns the set of clusterIds that have consumed the mutation */
|
||||
public List<UUID> getClusterIds() {
|
||||
List<UUID> clusterIds = new ArrayList<>();
|
||||
byte[] bytes = getAttribute(CONSUMED_CLUSTER_IDS);
|
||||
|
@ -351,9 +349,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return CellVisibility associated with cells in this Mutation. n
|
||||
*/
|
||||
/** Returns CellVisibility associated with cells in this Mutation. n */
|
||||
public CellVisibility getCellVisibility() throws DeserializationException {
|
||||
byte[] cellVisibilityBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);
|
||||
if (cellVisibilityBytes == null) return null;
|
||||
|
@ -409,16 +405,12 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
return size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the number of different families
|
||||
*/
|
||||
/** Returns the number of different families */
|
||||
public int numFamilies() {
|
||||
return getFamilyCellMap().size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Calculate what Mutation adds to class heap size.
|
||||
*/
|
||||
/** Returns Calculate what Mutation adds to class heap size. */
|
||||
@Override
|
||||
public long heapSize() {
|
||||
long heapsize = MUTATION_OVERHEAD;
|
||||
|
@ -447,9 +439,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
return ClassSize.align(heapsize);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The serialized ACL for this operation, or null if none
|
||||
*/
|
||||
/** Returns The serialized ACL for this operation, or null if none */
|
||||
public byte[] getACL() {
|
||||
return getAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL);
|
||||
}
|
||||
|
@ -499,9 +489,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return current value for returnResults
|
||||
*/
|
||||
/** Returns current value for returnResults */
|
||||
// Used by Increment and Append only.
|
||||
@InterfaceAudience.Private
|
||||
protected boolean isReturnResults() {
|
||||
|
|
|
@ -29,9 +29,9 @@ public interface NonceGenerator {
|
|||
|
||||
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();
|
||||
|
||||
/** @return New nonce. */
|
||||
/** Returns New nonce. */
|
||||
long newNonce();
|
||||
}
|
||||
|
|
|
@ -75,18 +75,14 @@ public abstract class Query extends OperationWithAttributes {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The authorizations this Query is associated with. n
|
||||
*/
|
||||
/** Returns The authorizations this Query is associated with. n */
|
||||
public Authorizations getAuthorizations() throws DeserializationException {
|
||||
byte[] authorizationsBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);
|
||||
if (authorizationsBytes == null) return null;
|
||||
return ProtobufUtil.toAuthorizations(authorizationsBytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The serialized ACL for this operation, or null if none
|
||||
*/
|
||||
/** Returns The serialized ACL for this operation, or null if none */
|
||||
public byte[] getACL() {
|
||||
return getAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL);
|
||||
}
|
||||
|
@ -220,9 +216,7 @@ public abstract class Query extends OperationWithAttributes {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A map of column families to time ranges
|
||||
*/
|
||||
/** Returns A map of column families to time ranges */
|
||||
public Map<byte[], TimeRange> getColumnFamilyTimeRange() {
|
||||
return this.colFamTimeRangeMap;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
/**
|
||||
* @return the regionId.
|
||||
*/
|
||||
/** Returns the regionId. */
|
||||
long getRegionId();
|
||||
|
||||
/**
|
||||
|
@ -167,44 +165,28 @@ public interface RegionInfo extends Comparable<RegionInfo> {
|
|||
*/
|
||||
byte[] getRegionName();
|
||||
|
||||
/**
|
||||
* @return Region name as a String for use in logging, etc.
|
||||
*/
|
||||
/** Returns Region name as a String for use in logging, etc. */
|
||||
String getRegionNameAsString();
|
||||
|
||||
/**
|
||||
* @return the encoded region name.
|
||||
*/
|
||||
/** Returns the encoded region name. */
|
||||
String getEncodedName();
|
||||
|
||||
/**
|
||||
* @return the encoded region name as an array of bytes.
|
||||
*/
|
||||
/** Returns the encoded region name as an array of bytes. */
|
||||
byte[] getEncodedNameAsBytes();
|
||||
|
||||
/**
|
||||
* @return the startKey.
|
||||
*/
|
||||
/** Returns the startKey. */
|
||||
byte[] getStartKey();
|
||||
|
||||
/**
|
||||
* @return the endKey.
|
||||
*/
|
||||
/** Returns the endKey. */
|
||||
byte[] getEndKey();
|
||||
|
||||
/**
|
||||
* @return current table name of the region
|
||||
*/
|
||||
/** Returns current table name of the region */
|
||||
TableName getTable();
|
||||
|
||||
/**
|
||||
* @return returns region replica id
|
||||
*/
|
||||
/** Returns returns region replica id */
|
||||
int getReplicaId();
|
||||
|
||||
/**
|
||||
* @return True if has been split and has daughters.
|
||||
*/
|
||||
/** Returns True if has been split and has daughters. */
|
||||
boolean isSplit();
|
||||
|
||||
/**
|
||||
|
@ -223,9 +205,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
|
|||
@Deprecated
|
||||
boolean isSplitParent();
|
||||
|
||||
/**
|
||||
* @return true if this region is a meta region.
|
||||
*/
|
||||
/** Returns true if this region is a meta region. */
|
||||
boolean isMetaRegion();
|
||||
|
||||
/**
|
||||
|
@ -236,9 +216,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
|
|||
*/
|
||||
boolean containsRange(byte[] rangeStartKey, byte[] rangeEndKey);
|
||||
|
||||
/**
|
||||
* @return true if the given row falls in this region.
|
||||
*/
|
||||
/** Returns true if the given row falls in this region. */
|
||||
boolean containsRow(byte[] row);
|
||||
|
||||
/**
|
||||
|
@ -253,9 +231,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
|
|||
&& (regionName[regionName.length - 1] == RegionInfo.ENC_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the encodedName
|
||||
*/
|
||||
/** Returns the encodedName */
|
||||
@InterfaceAudience.Private
|
||||
static String encodeRegionName(final byte[] regionName) {
|
||||
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
|
||||
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
|
||||
static RegionInfo parseFromOrNull(final byte[] bytes, int offset, int len) {
|
||||
|
@ -764,16 +740,12 @@ public interface RegionInfo extends Comparable<RegionInfo> {
|
|||
return ris;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if this is first Region in Table
|
||||
*/
|
||||
/** Returns True if this is first Region in Table */
|
||||
default boolean isFirst() {
|
||||
return Bytes.equals(getStartKey(), HConstants.EMPTY_START_ROW);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if this is last Region in Table
|
||||
*/
|
||||
/** Returns True if this is last Region in Table */
|
||||
default boolean isLast() {
|
||||
return Bytes.equals(getEndKey(), HConstants.EMPTY_END_ROW);
|
||||
}
|
||||
|
@ -795,9 +767,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
|
|||
return getTable().equals(other.getTable()) && areAdjacent(this, other);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if RegionInfo is degenerate... if startKey > endKey.
|
||||
*/
|
||||
/** Returns True if RegionInfo is degenerate... if startKey > endKey. */
|
||||
default boolean isDegenerate() {
|
||||
return !isLast() && Bytes.compareTo(getStartKey(), getEndKey()) > 0;
|
||||
}
|
||||
|
|
|
@ -73,12 +73,12 @@ public class RegionReplicaUtil {
|
|||
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) {
|
||||
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) {
|
||||
return hri.getReplicaId() == DEFAULT_REPLICA_ID;
|
||||
}
|
||||
|
|
|
@ -67,9 +67,7 @@ public interface RequestController {
|
|||
void reset() throws InterruptedIOException;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A new checker for evaluating a batch rows.
|
||||
*/
|
||||
/** Returns A new checker for evaluating a batch rows. */
|
||||
Checker newChecker();
|
||||
|
||||
/**
|
||||
|
@ -86,9 +84,7 @@ public interface RequestController {
|
|||
*/
|
||||
void decTaskCounters(Collection<byte[]> regions, ServerName sn);
|
||||
|
||||
/**
|
||||
* @return The number of running task.
|
||||
*/
|
||||
/** Returns The number of running task. */
|
||||
long getNumberOfTasksInProgress();
|
||||
|
||||
/**
|
||||
|
|
|
@ -671,9 +671,7 @@ public class Result implements CellScannable, CellScanner {
|
|||
return this.cells == null || this.cells.length == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the size of the underlying Cell []
|
||||
*/
|
||||
/** Returns the size of the underlying Cell [] */
|
||||
public int size() {
|
||||
return this.cells == null ? 0 : this.cells.length;
|
||||
}
|
||||
|
|
|
@ -113,8 +113,6 @@ public interface ResultScanner extends Closeable, Iterable<Result> {
|
|||
*/
|
||||
boolean renewLease();
|
||||
|
||||
/**
|
||||
* @return the scan metrics, or {@code null} if we do not enable metrics.
|
||||
*/
|
||||
/** Returns the scan metrics, or {@code null} if we do not enable metrics. */
|
||||
ScanMetrics getScanMetrics();
|
||||
}
|
||||
|
|
|
@ -28,8 +28,6 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
public interface Row {
|
||||
Comparator<Row> COMPARATOR = (v1, v2) -> Bytes.compareTo(v1.getRow(), v2.getRow());
|
||||
|
||||
/**
|
||||
* @return The row.
|
||||
*/
|
||||
/** Returns The row. */
|
||||
byte[] getRow();
|
||||
}
|
||||
|
|
|
@ -26,13 +26,9 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
*/
|
||||
@InterfaceAudience.Private
|
||||
public interface RowAccess<T> extends Iterable<T> {
|
||||
/**
|
||||
* @return true if there are no elements.
|
||||
*/
|
||||
/** Returns true if there are no elements. */
|
||||
boolean isEmpty();
|
||||
|
||||
/**
|
||||
* @return the number of elements in this list.
|
||||
*/
|
||||
/** Returns the number of elements in this list. */
|
||||
int size();
|
||||
}
|
||||
|
|
|
@ -98,9 +98,7 @@ public class RowMutations implements Row {
|
|||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return An unmodifiable list of the current mutations.
|
||||
*/
|
||||
/** Returns An unmodifiable list of the current mutations. */
|
||||
public List<Mutation> getMutations() {
|
||||
return Collections.unmodifiableList(mutations);
|
||||
}
|
||||
|
|
|
@ -531,9 +531,7 @@ public class Scan extends Query {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the maximum result size in bytes. See {@link #setMaxResultSize(long)}
|
||||
*/
|
||||
/** Returns the maximum result size in bytes. See {@link #setMaxResultSize(long)} */
|
||||
public long getMaxResultSize() {
|
||||
return maxResultSize;
|
||||
}
|
||||
|
@ -571,9 +569,7 @@ public class Scan extends Query {
|
|||
return this.familyMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the number of families in familyMap
|
||||
*/
|
||||
/** Returns the number of families in familyMap */
|
||||
public int numFamilies() {
|
||||
if (hasFamilies()) {
|
||||
return this.familyMap.size();
|
||||
|
@ -581,16 +577,12 @@ public class Scan extends Query {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if familyMap is non empty, false otherwise
|
||||
*/
|
||||
/** Returns true if familyMap is non empty, false otherwise */
|
||||
public boolean hasFamilies() {
|
||||
return !this.familyMap.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the keys of the familyMap
|
||||
*/
|
||||
/** Returns the keys of the familyMap */
|
||||
public byte[][] getFamilies() {
|
||||
if (hasFamilies()) {
|
||||
return this.familyMap.keySet().toArray(new byte[0][0]);
|
||||
|
@ -598,51 +590,37 @@ public class Scan extends Query {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the startrow
|
||||
*/
|
||||
/** Returns the startrow */
|
||||
public byte[] getStartRow() {
|
||||
return this.startRow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if we should include start row when scan
|
||||
*/
|
||||
/** Returns if we should include start row when scan */
|
||||
public boolean includeStartRow() {
|
||||
return includeStartRow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the stoprow
|
||||
*/
|
||||
/** Returns the stoprow */
|
||||
public byte[] getStopRow() {
|
||||
return this.stopRow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if we should include stop row when scan
|
||||
*/
|
||||
/** Returns if we should include stop row when scan */
|
||||
public boolean includeStopRow() {
|
||||
return includeStopRow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the max number of versions to fetch
|
||||
*/
|
||||
/** Returns the max number of versions to fetch */
|
||||
public int getMaxVersions() {
|
||||
return this.maxVersions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return maximum number of values to return for a single call to next()
|
||||
*/
|
||||
/** Returns maximum number of values to return for a single call to next() */
|
||||
public int getBatch() {
|
||||
return this.batch;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return maximum number of values to return per row per CF
|
||||
*/
|
||||
/** Returns maximum number of values to return per row per CF */
|
||||
public int getMaxResultsPerColumnFamily() {
|
||||
return this.storeLimit;
|
||||
}
|
||||
|
@ -655,9 +633,7 @@ public class Scan extends Query {
|
|||
return this.storeOffset;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return caching the number of rows fetched when calling next on a scanner
|
||||
*/
|
||||
/** Returns caching the number of rows fetched when calling next on a scanner */
|
||||
public int getCaching() {
|
||||
return this.caching;
|
||||
}
|
||||
|
@ -677,9 +653,7 @@ public class Scan extends Query {
|
|||
return filter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true is a filter has been specified, false if not
|
||||
*/
|
||||
/** Returns true is a filter has been specified, false if not */
|
||||
public boolean hasFilter() {
|
||||
return filter != null;
|
||||
}
|
||||
|
@ -840,9 +814,7 @@ public class Scan extends Query {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if this Scan is in "raw" mode.
|
||||
*/
|
||||
/** Returns True if this Scan is in "raw" mode. */
|
||||
public boolean isRaw() {
|
||||
byte[] attr = getAttribute(RAW_ATTR);
|
||||
return attr == null ? false : Bytes.toBoolean(attr);
|
||||
|
@ -902,9 +874,7 @@ public class Scan extends Query {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if collection of scan metrics is enabled. For advanced users.
|
||||
*/
|
||||
/** Returns True if collection of scan metrics is enabled. For advanced users. */
|
||||
public boolean isScanMetricsEnabled() {
|
||||
byte[] attr = getAttribute(Scan.SCAN_ATTRIBUTES_METRICS_ENABLE);
|
||||
return attr == null ? false : Bytes.toBoolean(attr);
|
||||
|
@ -924,9 +894,7 @@ public class Scan extends Query {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the limit of rows for this scan
|
||||
*/
|
||||
/** Returns the limit of rows for this scan */
|
||||
public int getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
@ -958,9 +926,7 @@ public class Scan extends Query {
|
|||
PREAD
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the read type for this scan
|
||||
*/
|
||||
/** Returns the read type for this scan */
|
||||
public ReadType getReadType() {
|
||||
return readType;
|
||||
}
|
||||
|
|
|
@ -140,9 +140,7 @@ public interface TableDescriptor {
|
|||
// those tables with the highest priority (From Yi Liang over on HBASE-18109).
|
||||
int getPriority();
|
||||
|
||||
/**
|
||||
* @return Returns the configured replicas per region
|
||||
*/
|
||||
/** Returns Returns the configured replicas per region */
|
||||
int getRegionReplication();
|
||||
|
||||
/**
|
||||
|
@ -187,9 +185,7 @@ public interface TableDescriptor {
|
|||
*/
|
||||
String getValue(String key);
|
||||
|
||||
/**
|
||||
* @return Getter for fetching an unmodifiable map.
|
||||
*/
|
||||
/** Returns Getter for fetching an unmodifiable map. */
|
||||
Map<Bytes, Bytes> getValues();
|
||||
|
||||
/**
|
||||
|
@ -206,9 +202,7 @@ public interface TableDescriptor {
|
|||
*/
|
||||
boolean hasColumnFamily(final byte[] name);
|
||||
|
||||
/**
|
||||
* @return true if the read-replicas memstore replication is enabled.
|
||||
*/
|
||||
/** Returns true if the read-replicas memstore replication is enabled. */
|
||||
boolean hasRegionMemStoreReplication();
|
||||
|
||||
/**
|
||||
|
|
|
@ -1058,9 +1058,7 @@ public class TableDescriptorBuilder {
|
|||
return families.containsKey(familyName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Name of this table and then a map of all of the column family descriptors.
|
||||
*/
|
||||
/** Returns Name of this table and then a map of all of the column family descriptors. */
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder s = new StringBuilder();
|
||||
|
@ -1083,9 +1081,7 @@ public class TableDescriptorBuilder {
|
|||
return s.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return map of all table attributes formatted into string.
|
||||
*/
|
||||
/** Returns map of all table attributes formatted into string. */
|
||||
public String toStringTableAttributes() {
|
||||
return getValues(true).toString();
|
||||
}
|
||||
|
@ -1195,9 +1191,7 @@ public class TableDescriptorBuilder {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return hash code
|
||||
*/
|
||||
/** Returns hash code */
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = this.name.hashCode();
|
||||
|
@ -1245,9 +1239,7 @@ public class TableDescriptorBuilder {
|
|||
return setValue(REGION_REPLICATION_KEY, Integer.toString(regionReplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the read-replicas memstore replication is enabled.
|
||||
*/
|
||||
/** Returns true if the read-replicas memstore replication is enabled. */
|
||||
@Override
|
||||
public boolean hasRegionMemStoreReplication() {
|
||||
return getOrDefault(REGION_MEMSTORE_REPLICATION_KEY, Boolean::valueOf,
|
||||
|
@ -1467,9 +1459,7 @@ public class TableDescriptorBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the bytes in pb format
|
||||
*/
|
||||
/** Returns the bytes in pb format */
|
||||
private byte[] toByteArray() {
|
||||
return ProtobufUtil.prependPBMagic(ProtobufUtil.toTableSchema(this).toByteArray());
|
||||
}
|
||||
|
|
|
@ -94,44 +94,32 @@ public class TableState {
|
|||
private final TableName tableName;
|
||||
private final State state;
|
||||
|
||||
/**
|
||||
* @return True if table is {@link State#ENABLED}.
|
||||
*/
|
||||
/** Returns True if table is {@link State#ENABLED}. */
|
||||
public boolean isEnabled() {
|
||||
return isInStates(State.ENABLED);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if table is {@link State#ENABLING}.
|
||||
*/
|
||||
/** Returns True if table is {@link State#ENABLING}. */
|
||||
public boolean isEnabling() {
|
||||
return isInStates(State.ENABLING);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if {@link State#ENABLED} or {@link State#ENABLING}
|
||||
*/
|
||||
/** Returns True if {@link State#ENABLED} or {@link State#ENABLING} */
|
||||
public boolean isEnabledOrEnabling() {
|
||||
return isInStates(State.ENABLED, State.ENABLING);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if table is disabled.
|
||||
*/
|
||||
/** Returns True if table is disabled. */
|
||||
public boolean isDisabled() {
|
||||
return isInStates(State.DISABLED);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if table is disabling.
|
||||
*/
|
||||
/** Returns True if table is disabling. */
|
||||
public boolean isDisabling() {
|
||||
return isInStates(State.DISABLING);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if {@link State#DISABLED} or {@link State#DISABLED}
|
||||
*/
|
||||
/** Returns True if {@link State#DISABLED} or {@link State#DISABLED} */
|
||||
public boolean isDisabledOrDisabling() {
|
||||
return isInStates(State.DISABLED, State.DISABLING);
|
||||
}
|
||||
|
@ -146,9 +134,7 @@ public class TableState {
|
|||
this.state = state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return table state
|
||||
*/
|
||||
/** Returns table state */
|
||||
public State getState() {
|
||||
return state;
|
||||
}
|
||||
|
|
|
@ -32,8 +32,6 @@ public interface ClientBackoffPolicy {
|
|||
|
||||
public static final String BACKOFF_POLICY_CLASS = "hbase.client.statistics.backoff-policy";
|
||||
|
||||
/**
|
||||
* @return the number of ms to wait on the client based on the
|
||||
*/
|
||||
/** Returns the number of ms to wait on the client based on the */
|
||||
public long getBackoffTime(ServerName serverName, byte[] region, ServerStatistics stats);
|
||||
}
|
||||
|
|
|
@ -67,37 +67,27 @@ public class PreemptiveFastFailException extends ConnectException {
|
|||
this.guaranteedClientSideOnly = guaranteedClientSideOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return time of the fist failure
|
||||
*/
|
||||
/** Returns time of the fist failure */
|
||||
public long getFirstFailureAt() {
|
||||
return timeOfFirstFailureMilliSec;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return time of the latest attempt
|
||||
*/
|
||||
/** Returns time of the latest attempt */
|
||||
public long getLastAttemptAt() {
|
||||
return timeOfLatestAttemptMilliSec;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return failure count
|
||||
*/
|
||||
/** Returns failure count */
|
||||
public long getFailureCount() {
|
||||
return failureCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if operation was attempted by server, false otherwise.
|
||||
*/
|
||||
/** Returns true if operation was attempted by server, false otherwise. */
|
||||
public boolean wasOperationAttemptedByServer() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if we know no mutation made it to the server, false otherwise.
|
||||
*/
|
||||
/** Returns true if we know no mutation made it to the server, false otherwise. */
|
||||
public boolean isGuaranteedClientSideOnly() {
|
||||
return guaranteedClientSideOnly;
|
||||
}
|
||||
|
|
|
@ -72,9 +72,7 @@ public class BigDecimalComparator extends ByteArrayComparable {
|
|||
return this.bigDecimal.compareTo(that);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The comparator serialized using pb
|
||||
*/
|
||||
/** Returns The comparator serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
ComparatorProtos.BigDecimalComparator.Builder builder =
|
||||
|
|
|
@ -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 The comparator serialized using pb
|
||||
*/
|
||||
/** Returns The comparator serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
ComparatorProtos.BinaryComparator.Builder builder =
|
||||
|
|
|
@ -75,9 +75,7 @@ public class BinaryComponentComparator extends ByteArrayComparable {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The comparator serialized using pb
|
||||
*/
|
||||
/** Returns The comparator serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
ComparatorProtos.BinaryComponentComparator.Builder builder =
|
||||
|
|
|
@ -58,9 +58,7 @@ public class BinaryPrefixComparator extends ByteArrayComparable {
|
|||
return ByteBufferUtils.compareTo(this.value, 0, this.value.length, value, offset, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The comparator serialized using pb
|
||||
*/
|
||||
/** Returns The comparator serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
ComparatorProtos.BinaryPrefixComparator.Builder builder =
|
||||
|
|
|
@ -57,16 +57,12 @@ public class BitComparator extends ByteArrayComparable {
|
|||
this.bitOperator = bitOperator;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the bitwise operator
|
||||
*/
|
||||
/** Returns the bitwise operator */
|
||||
public BitwiseOp getOperator() {
|
||||
return bitOperator;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The comparator serialized using pb
|
||||
*/
|
||||
/** Returns The comparator serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
ComparatorProtos.BitComparator.Builder builder = ComparatorProtos.BitComparator.newBuilder();
|
||||
|
|
|
@ -78,9 +78,7 @@ public class ColumnCountGetFilter extends FilterBase {
|
|||
return new ColumnCountGetFilter(limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.ColumnCountGetFilter.Builder builder =
|
||||
|
|
|
@ -151,9 +151,7 @@ public class ColumnPaginationFilter extends FilterBase {
|
|||
return new ColumnPaginationFilter(limit, offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.ColumnPaginationFilter.Builder builder =
|
||||
|
|
|
@ -102,9 +102,7 @@ public class ColumnPrefixFilter extends FilterBase {
|
|||
return new ColumnPrefixFilter(columnPrefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.ColumnPrefixFilter.Builder builder = FilterProtos.ColumnPrefixFilter.newBuilder();
|
||||
|
|
|
@ -65,44 +65,32 @@ public class ColumnRangeFilter extends FilterBase {
|
|||
this.maxColumnInclusive = maxColumnInclusive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if min column range is inclusive.
|
||||
*/
|
||||
/** Returns if min column range is inclusive. */
|
||||
public boolean isMinColumnInclusive() {
|
||||
return minColumnInclusive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if max column range is inclusive.
|
||||
*/
|
||||
/** Returns if max column range is inclusive. */
|
||||
public boolean isMaxColumnInclusive() {
|
||||
return maxColumnInclusive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the min column range for the filter
|
||||
*/
|
||||
/** Returns the min column range for the filter */
|
||||
public byte[] getMinColumn() {
|
||||
return this.minColumn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if min column is inclusive, false otherwise
|
||||
*/
|
||||
/** Returns true if min column is inclusive, false otherwise */
|
||||
public boolean getMinColumnInclusive() {
|
||||
return this.minColumnInclusive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the max column range for the filter
|
||||
*/
|
||||
/** Returns the max column range for the filter */
|
||||
public byte[] getMaxColumn() {
|
||||
return this.maxColumn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if max column is inclusive, false otherwise
|
||||
*/
|
||||
/** Returns true if max column is inclusive, false otherwise */
|
||||
public boolean getMaxColumnInclusive() {
|
||||
return this.maxColumnInclusive;
|
||||
}
|
||||
|
@ -155,9 +143,7 @@ public class ColumnRangeFilter extends FilterBase {
|
|||
return new ColumnRangeFilter(minColumn, minColumnInclusive, maxColumn, maxColumnInclusive);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.ColumnRangeFilter.Builder builder = FilterProtos.ColumnRangeFilter.newBuilder();
|
||||
|
|
|
@ -75,23 +75,17 @@ public class ColumnValueFilter extends FilterBase {
|
|||
return op;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the comparator
|
||||
*/
|
||||
/** Returns the comparator */
|
||||
public ByteArrayComparable getComparator() {
|
||||
return comparator;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the column family
|
||||
*/
|
||||
/** Returns the column family */
|
||||
public byte[] getFamily() {
|
||||
return family;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the qualifier
|
||||
*/
|
||||
/** Returns the qualifier */
|
||||
public byte[] getQualifier() {
|
||||
return qualifier;
|
||||
}
|
||||
|
@ -161,9 +155,7 @@ public class ColumnValueFilter extends FilterBase {
|
|||
return new ColumnValueFilter(family, qualifier, operator, comparator);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A pb instance to represent this instance.
|
||||
*/
|
||||
/** Returns A pb instance to represent this instance. */
|
||||
FilterProtos.ColumnValueFilter convert() {
|
||||
FilterProtos.ColumnValueFilter.Builder builder = FilterProtos.ColumnValueFilter.newBuilder();
|
||||
|
||||
|
|
|
@ -69,9 +69,7 @@ public abstract class CompareFilter extends FilterBase {
|
|||
return op;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the comparator
|
||||
*/
|
||||
/** Returns the comparator */
|
||||
public ByteArrayComparable getComparator() {
|
||||
return comparator;
|
||||
}
|
||||
|
@ -158,9 +156,7 @@ public abstract class CompareFilter extends FilterBase {
|
|||
return arguments;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A pb instance to represent this instance.
|
||||
*/
|
||||
/** Returns A pb instance to represent this instance. */
|
||||
FilterProtos.CompareFilter convert() {
|
||||
FilterProtos.CompareFilter.Builder builder = FilterProtos.CompareFilter.newBuilder();
|
||||
HBaseProtos.CompareType compareOp = CompareType.valueOf(this.op.name());
|
||||
|
|
|
@ -92,23 +92,17 @@ public class DependentColumnFilter extends CompareFilter {
|
|||
this(family, qualifier, dropDependentColumn, CompareOperator.NO_OP, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the column family
|
||||
*/
|
||||
/** Returns the column family */
|
||||
public byte[] getFamily() {
|
||||
return this.columnFamily;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the column qualifier
|
||||
*/
|
||||
/** Returns the column qualifier */
|
||||
public byte[] getQualifier() {
|
||||
return this.columnQualifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if we should drop the dependent column, false otherwise
|
||||
*/
|
||||
/** Returns true if we should drop the dependent column, false otherwise */
|
||||
public boolean dropDependentColumn() {
|
||||
return this.dropDependentColumn;
|
||||
}
|
||||
|
@ -188,9 +182,7 @@ public class DependentColumnFilter extends CompareFilter {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.DependentColumnFilter.Builder builder =
|
||||
|
|
|
@ -73,9 +73,7 @@ public class FamilyFilter extends CompareFilter {
|
|||
return new FamilyFilter(compareOp, comparator);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.FamilyFilter.Builder builder = FilterProtos.FamilyFilter.newBuilder();
|
||||
|
|
|
@ -181,9 +181,7 @@ final public class FilterList extends FilterBase {
|
|||
return filterListBase.filterRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() throws IOException {
|
||||
FilterProtos.FilterList.Builder builder = FilterProtos.FilterList.newBuilder();
|
||||
|
|
|
@ -65,9 +65,7 @@ public class FirstKeyOnlyFilter extends FilterBase {
|
|||
return new FirstKeyOnlyFilter();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if first KV has been found.
|
||||
*/
|
||||
/** Returns true if first KV has been found. */
|
||||
protected boolean hasFoundKV() {
|
||||
return this.foundKV;
|
||||
}
|
||||
|
@ -79,9 +77,7 @@ public class FirstKeyOnlyFilter extends FilterBase {
|
|||
this.foundKV = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.FirstKeyOnlyFilter.Builder builder = FilterProtos.FirstKeyOnlyFilter.newBuilder();
|
||||
|
|
|
@ -251,9 +251,7 @@ public class FuzzyRowFilter extends FilterBase {
|
|||
return done;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.FuzzyRowFilter.Builder builder = FilterProtos.FuzzyRowFilter.newBuilder();
|
||||
|
|
|
@ -75,9 +75,7 @@ public class InclusiveStopFilter extends FilterBase {
|
|||
return new InclusiveStopFilter(stopRowKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.InclusiveStopFilter.Builder builder =
|
||||
|
|
|
@ -93,9 +93,7 @@ public class KeyOnlyFilter extends FilterBase {
|
|||
return filter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.KeyOnlyFilter.Builder builder = FilterProtos.KeyOnlyFilter.newBuilder();
|
||||
|
|
|
@ -53,9 +53,7 @@ public class LongComparator extends ByteArrayComparable {
|
|||
return Long.compare(longValue, that);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The comparator serialized using pb
|
||||
*/
|
||||
/** Returns The comparator serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
ComparatorProtos.LongComparator.Builder builder = ComparatorProtos.LongComparator.newBuilder();
|
||||
|
|
|
@ -176,9 +176,7 @@ public class MultiRowRangeFilter extends FilterBase {
|
|||
return PrivateCellUtil.createFirstOnRow(comparisonData, 0, (short) comparisonData.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.MultiRowRangeFilter.Builder builder =
|
||||
|
@ -469,16 +467,12 @@ public class MultiRowRangeFilter extends FilterBase {
|
|||
return stopRow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if start row is inclusive.
|
||||
*/
|
||||
/** Returns if start row is inclusive. */
|
||||
public boolean isStartRowInclusive() {
|
||||
return startRowInclusive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if stop row is inclusive.
|
||||
*/
|
||||
/** Returns if stop row is inclusive. */
|
||||
public boolean isStopRowInclusive() {
|
||||
return stopRowInclusive;
|
||||
}
|
||||
|
|
|
@ -116,9 +116,7 @@ public class MultipleColumnPrefixFilter extends FilterBase {
|
|||
return new MultipleColumnPrefixFilter(prefixes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.MultipleColumnPrefixFilter.Builder builder =
|
||||
|
|
|
@ -63,9 +63,7 @@ public class NullComparator extends ByteArrayComparable {
|
|||
return value != null ? 1 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The comparator serialized using pb
|
||||
*/
|
||||
/** Returns The comparator serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
ComparatorProtos.NullComparator.Builder builder = ComparatorProtos.NullComparator.newBuilder();
|
||||
|
|
|
@ -91,9 +91,7 @@ public class PageFilter extends FilterBase {
|
|||
return new PageFilter(pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.PageFilter.Builder builder = FilterProtos.PageFilter.newBuilder();
|
||||
|
|
|
@ -101,9 +101,7 @@ public class PrefixFilter extends FilterBase {
|
|||
return new PrefixFilter(prefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.PrefixFilter.Builder builder = FilterProtos.PrefixFilter.newBuilder();
|
||||
|
|
|
@ -67,9 +67,7 @@ public class QualifierFilter extends CompareFilter {
|
|||
return new QualifierFilter(compareOp, comparator);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.QualifierFilter.Builder builder = FilterProtos.QualifierFilter.newBuilder();
|
||||
|
|
|
@ -43,9 +43,7 @@ public class RandomRowFilter extends FilterBase {
|
|||
this.chance = chance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The chance that a row gets included.
|
||||
*/
|
||||
/** Returns The chance that a row gets included. */
|
||||
public float getChance() {
|
||||
return chance;
|
||||
}
|
||||
|
@ -100,9 +98,7 @@ public class RandomRowFilter extends FilterBase {
|
|||
filterOutRow = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.RandomRowFilter.Builder builder = FilterProtos.RandomRowFilter.newBuilder();
|
||||
|
|
|
@ -145,9 +145,7 @@ public class RegexStringComparator extends ByteArrayComparable {
|
|||
return engine.compareTo(value, offset, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The comparator serialized using pb
|
||||
*/
|
||||
/** Returns The comparator serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
return engine.toByteArray();
|
||||
|
|
|
@ -87,9 +87,7 @@ public class RowFilter extends CompareFilter {
|
|||
return new RowFilter(compareOp, comparator);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.RowFilter.Builder builder = FilterProtos.RowFilter.newBuilder();
|
||||
|
|
|
@ -112,9 +112,7 @@ public class SingleColumnValueExcludeFilter extends SingleColumnValueFilter {
|
|||
return filter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.SingleColumnValueExcludeFilter.Builder builder =
|
||||
|
|
|
@ -125,23 +125,17 @@ public class SingleColumnValueFilter extends FilterBase {
|
|||
return op;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the comparator
|
||||
*/
|
||||
/** Returns the comparator */
|
||||
public org.apache.hadoop.hbase.filter.ByteArrayComparable getComparator() {
|
||||
return comparator;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the family
|
||||
*/
|
||||
/** Returns the family */
|
||||
public byte[] getFamily() {
|
||||
return columnFamily;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the qualifier
|
||||
*/
|
||||
/** Returns the qualifier */
|
||||
public byte[] getQualifier() {
|
||||
return columnQualifier;
|
||||
}
|
||||
|
@ -283,9 +277,7 @@ public class SingleColumnValueFilter extends FilterBase {
|
|||
return builder.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
return convert().toByteArray();
|
||||
|
|
|
@ -96,9 +96,7 @@ public class SkipFilter extends FilterBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() throws IOException {
|
||||
FilterProtos.SkipFilter.Builder builder = FilterProtos.SkipFilter.newBuilder();
|
||||
|
|
|
@ -66,9 +66,7 @@ public class SubstringComparator extends ByteArrayComparable {
|
|||
return Bytes.toString(value, offset, length).toLowerCase(Locale.ROOT).contains(substr) ? 0 : 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The comparator serialized using pb
|
||||
*/
|
||||
/** Returns The comparator serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
ComparatorProtos.SubstringComparator.Builder builder =
|
||||
|
|
|
@ -77,9 +77,7 @@ public class TimestampsFilter extends FilterBase {
|
|||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the list of timestamps
|
||||
*/
|
||||
/** Returns the list of timestamps */
|
||||
public List<Long> getTimestamps() {
|
||||
List<Long> list = new ArrayList<>(timestamps.size());
|
||||
list.addAll(timestamps);
|
||||
|
@ -159,9 +157,7 @@ public class TimestampsFilter extends FilterBase {
|
|||
return new TimestampsFilter(timestamps);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.TimestampsFilter.Builder builder = FilterProtos.TimestampsFilter.newBuilder();
|
||||
|
|
|
@ -69,9 +69,7 @@ public class ValueFilter extends CompareFilter {
|
|||
return new ValueFilter(compareOp, comparator);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() {
|
||||
FilterProtos.ValueFilter.Builder builder = FilterProtos.ValueFilter.newBuilder();
|
||||
|
|
|
@ -94,9 +94,7 @@ public class WhileMatchFilter extends FilterBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The filter serialized using pb
|
||||
*/
|
||||
/** Returns The filter serialized using pb */
|
||||
@Override
|
||||
public byte[] toByteArray() throws IOException {
|
||||
FilterProtos.WhileMatchFilter.Builder builder = FilterProtos.WhileMatchFilter.newBuilder();
|
||||
|
|
|
@ -60,9 +60,7 @@ public interface HBaseRpcController extends RpcController, CellScannable {
|
|||
*/
|
||||
void setPriority(final TableName tn);
|
||||
|
||||
/**
|
||||
* @return The priority of this request
|
||||
*/
|
||||
/** Returns The priority of this request */
|
||||
int getPriority();
|
||||
|
||||
int getCallTimeout();
|
||||
|
@ -110,16 +108,12 @@ public interface HBaseRpcController extends RpcController, CellScannable {
|
|||
*/
|
||||
void notifyOnCancel(RpcCallback<Object> callback, CancellationCallback action) throws IOException;
|
||||
|
||||
/**
|
||||
* @return True if this Controller is carrying the RPC target Region's RegionInfo.
|
||||
*/
|
||||
/** Returns True if this Controller is carrying the RPC target Region's RegionInfo. */
|
||||
default boolean hasRegionInfo() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Target Region's RegionInfo or null if not available or pertinent.
|
||||
*/
|
||||
/** Returns Target Region's RegionInfo or null if not available or pertinent. */
|
||||
default RegionInfo getRegionInfo() {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -101,9 +101,7 @@ public class HBaseRpcControllerImpl implements HBaseRpcController {
|
|||
return this.regionInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return One-shot cell scanner (you cannot back it up and restart)
|
||||
*/
|
||||
/** Returns One-shot cell scanner (you cannot back it up and restart) */
|
||||
@Override
|
||||
public CellScanner cellScanner() {
|
||||
return cellScanner;
|
||||
|
|
|
@ -96,9 +96,7 @@ class IPCUtil {
|
|||
return totalSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Size on the wire when the two messages are written with writeDelimitedTo
|
||||
*/
|
||||
/** Returns Size on the wire when the two messages are written with writeDelimitedTo */
|
||||
public static int getTotalSizeWhenWrittenDelimited(Message... messages) {
|
||||
int totalSize = 0;
|
||||
for (Message m : messages) {
|
||||
|
@ -149,9 +147,7 @@ class IPCUtil {
|
|||
serverOverloaded);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the exception is a fatal connection exception.
|
||||
*/
|
||||
/** Returns True if the exception is a fatal connection exception. */
|
||||
static boolean isFatalConnectionException(final ExceptionResponse e) {
|
||||
return e.getExceptionClassName().equals(FatalConnectionException.class.getName());
|
||||
}
|
||||
|
|
|
@ -123,30 +123,22 @@ public class RemoteWithExtrasException extends RemoteException {
|
|||
return ex;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null if not set
|
||||
*/
|
||||
/** Returns null if not set */
|
||||
public String getHostname() {
|
||||
return this.hostname;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return -1 if not set
|
||||
*/
|
||||
/** Returns -1 if not set */
|
||||
public int getPort() {
|
||||
return this.port;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if origin exception was a do not retry type.
|
||||
*/
|
||||
/** Returns True if origin exception was a do not retry type. */
|
||||
public boolean isDoNotRetry() {
|
||||
return this.doNotRetry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the server was considered overloaded when the exception was thrown.
|
||||
*/
|
||||
/** Returns True if the server was considered overloaded when the exception was thrown. */
|
||||
public boolean isServerOverloaded() {
|
||||
return serverOverloaded;
|
||||
}
|
||||
|
|
|
@ -77,9 +77,7 @@ public class ProtobufMagic {
|
|||
return compareTo(PB_MAGIC, 0, PB_MAGIC.length, bytes, offset, PB_MAGIC.length) == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Length of {@link #PB_MAGIC}
|
||||
*/
|
||||
/** Returns Length of {@link #PB_MAGIC} */
|
||||
public static int lengthOfPBMagic() {
|
||||
return PB_MAGIC.length;
|
||||
}
|
||||
|
|
|
@ -92,32 +92,32 @@ public class QuotaFilter {
|
|||
return this;
|
||||
}
|
||||
|
||||
/** @return true if the filter is empty */
|
||||
/** Returns true if the filter is empty */
|
||||
public boolean isNull() {
|
||||
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() {
|
||||
return types;
|
||||
}
|
||||
|
||||
/** @return the Namespace filter regex */
|
||||
/** Returns the Namespace filter regex */
|
||||
public String getNamespaceFilter() {
|
||||
return namespaceRegex;
|
||||
}
|
||||
|
||||
/** @return the Table filter regex */
|
||||
/** Returns the Table filter regex */
|
||||
public String getTableFilter() {
|
||||
return tableRegex;
|
||||
}
|
||||
|
||||
/** @return the User filter regex */
|
||||
/** Returns the User filter regex */
|
||||
public String getUserFilter() {
|
||||
return userRegex;
|
||||
}
|
||||
|
||||
/** @return the RegionServer filter regex */
|
||||
/** Returns the RegionServer filter regex */
|
||||
public String getRegionServerFilter() {
|
||||
return regionServerRegex;
|
||||
}
|
||||
|
|
|
@ -74,9 +74,7 @@ public class SpaceQuotaSnapshot implements SpaceQuotaSnapshotView {
|
|||
return policy;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if the quota is being violated, {@code false} otherwise.
|
||||
*/
|
||||
/** Returns {@code true} if the quota is being violated, {@code false} otherwise. */
|
||||
@Override
|
||||
public boolean isInViolation() {
|
||||
return inViolation;
|
||||
|
|
|
@ -39,9 +39,7 @@ public interface SpaceQuotaSnapshotView {
|
|||
*/
|
||||
Optional<SpaceViolationPolicy> getPolicy();
|
||||
|
||||
/**
|
||||
* @return {@code true} if the quota is being violated, {@code false} otherwise.
|
||||
*/
|
||||
/** Returns {@code true} if the quota is being violated, {@code false} otherwise. */
|
||||
boolean isInViolation();
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ public class Permission extends VersionedWritable {
|
|||
return raw.toString();
|
||||
}
|
||||
|
||||
/** @return the object version number */
|
||||
/** Returns the object version number */
|
||||
@Override
|
||||
public byte getVersion() {
|
||||
return VERSION;
|
||||
|
|
|
@ -35,9 +35,7 @@ public class CellVisibility {
|
|||
this.expression = expression;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The visibility expression
|
||||
*/
|
||||
/** Returns The visibility expression */
|
||||
public String getExpression() {
|
||||
return this.expression;
|
||||
}
|
||||
|
|
|
@ -339,9 +339,7 @@ public final class ProtobufUtil {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Length of {@link ProtobufMagic#lengthOfPBMagic()}
|
||||
*/
|
||||
/** Returns Length of {@link ProtobufMagic#lengthOfPBMagic()} */
|
||||
public static int lengthOfPBMagic() {
|
||||
return ProtobufMagic.lengthOfPBMagic();
|
||||
}
|
||||
|
@ -1689,9 +1687,7 @@ public final class ProtobufUtil {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A GetRegionInfoRequest for the passed in regionName.
|
||||
*/
|
||||
/** Returns A GetRegionInfoRequest for the passed in regionName. */
|
||||
public static GetRegionInfoRequest getGetRegionInfoRequest(final byte[] regionName)
|
||||
throws IOException {
|
||||
return org.apache.hadoop.hbase.client.RegionInfo.isEncodedRegionName(regionName)
|
||||
|
|
|
@ -645,9 +645,7 @@ public final class RequestConverter {
|
|||
ProtobufUtil.toMutationNoData(MutationType.APPEND, append, mutationBuilder, nonce)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return whether or not the rowMutations has a Increment or Append
|
||||
*/
|
||||
/** Returns whether or not the rowMutations has a Increment or Append */
|
||||
private static boolean buildNoDataRegionAction(final RowMutations rowMutations,
|
||||
final List<CellScannable> cells, long nonce, final RegionAction.Builder regionActionBuilder,
|
||||
final ClientProtos.Action.Builder actionBuilder, final MutationProto.Builder mutationBuilder)
|
||||
|
|
|
@ -69,9 +69,7 @@ public class HBaseSnapshotException extends DoNotRetryIOException {
|
|||
super(message, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the description of the snapshot that is being failed
|
||||
*/
|
||||
/** Returns the description of the snapshot that is being failed */
|
||||
public SnapshotDescription getSnapshotDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
|
|
@ -133,9 +133,7 @@ public class ZNodePaths {
|
|||
.append(snapshotCleanupZNode).append("]").toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the znode string corresponding to a replicaId
|
||||
*/
|
||||
/** Returns the znode string corresponding to a replicaId */
|
||||
public String getZNodeForReplica(int replicaId) {
|
||||
if (RegionReplicaUtil.isDefaultReplica(replicaId)) {
|
||||
return joinZNode(baseZNode, metaZNodePrefix);
|
||||
|
@ -165,16 +163,12 @@ public class ZNodePaths {
|
|||
: Integer.parseInt(znode.substring(metaZNodePrefix.length() + 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if meta znode.
|
||||
*/
|
||||
/** Returns True if meta znode. */
|
||||
public boolean isMetaZNodePrefix(String znode) {
|
||||
return znode != null && znode.startsWith(this.metaZNodePrefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True is the fully qualified path is for meta location
|
||||
*/
|
||||
/** Returns True is the fully qualified path is for meta location */
|
||||
public boolean isMetaZNodePath(String path) {
|
||||
int prefixLen = baseZNode.length() + 1;
|
||||
return path.length() > prefixLen && isMetaZNodePrefix(path.substring(prefixLen));
|
||||
|
|
|
@ -91,33 +91,25 @@ public class ArrayBackedTag implements Tag {
|
|||
this.type = bytes[offset + TAG_LENGTH_SIZE];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The byte array backing this Tag.
|
||||
*/
|
||||
/** Returns The byte array backing this Tag. */
|
||||
@Override
|
||||
public byte[] getValueArray() {
|
||||
return this.bytes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the tag type
|
||||
*/
|
||||
/** Returns the tag type */
|
||||
@Override
|
||||
public byte getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Length of actual tag bytes within the backed buffer
|
||||
*/
|
||||
/** Returns Length of actual tag bytes within the backed buffer */
|
||||
@Override
|
||||
public int getValueLength() {
|
||||
return this.length - INFRASTRUCTURE_SIZE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Offset of actual tag bytes within the backed buffer
|
||||
*/
|
||||
/** Returns Offset of actual tag bytes within the backed buffer */
|
||||
@Override
|
||||
public int getValueOffset() {
|
||||
return this.offset + INFRASTRUCTURE_SIZE;
|
||||
|
|
|
@ -60,53 +60,33 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
*/
|
||||
@InterfaceAudience.Private
|
||||
public abstract class ByteBufferExtendedCell implements ExtendedCell {
|
||||
/**
|
||||
* @return The {@link ByteBuffer} containing the row bytes.
|
||||
*/
|
||||
/** Returns The {@link ByteBuffer} containing the row bytes. */
|
||||
public abstract ByteBuffer getRowByteBuffer();
|
||||
|
||||
/**
|
||||
* @return Position in the {@link ByteBuffer} where row bytes start
|
||||
*/
|
||||
/** Returns Position in the {@link ByteBuffer} where row bytes start */
|
||||
public abstract int getRowPosition();
|
||||
|
||||
/**
|
||||
* @return The {@link ByteBuffer} containing the column family bytes.
|
||||
*/
|
||||
/** Returns The {@link ByteBuffer} containing the column family bytes. */
|
||||
public abstract ByteBuffer getFamilyByteBuffer();
|
||||
|
||||
/**
|
||||
* @return Position in the {@link ByteBuffer} where column family bytes start
|
||||
*/
|
||||
/** Returns Position in the {@link ByteBuffer} where column family bytes start */
|
||||
public abstract int getFamilyPosition();
|
||||
|
||||
/**
|
||||
* @return The {@link ByteBuffer} containing the column qualifier bytes.
|
||||
*/
|
||||
/** Returns The {@link ByteBuffer} containing the column qualifier bytes. */
|
||||
public abstract ByteBuffer getQualifierByteBuffer();
|
||||
|
||||
/**
|
||||
* @return Position in the {@link ByteBuffer} where column qualifier bytes start
|
||||
*/
|
||||
/** Returns Position in the {@link ByteBuffer} where column qualifier bytes start */
|
||||
public abstract int getQualifierPosition();
|
||||
|
||||
/**
|
||||
* @return The {@link ByteBuffer} containing the value bytes.
|
||||
*/
|
||||
/** Returns The {@link ByteBuffer} containing the value bytes. */
|
||||
public abstract ByteBuffer getValueByteBuffer();
|
||||
|
||||
/**
|
||||
* @return Position in the {@link ByteBuffer} where value bytes start
|
||||
*/
|
||||
/** Returns Position in the {@link ByteBuffer} where value bytes start */
|
||||
public abstract int getValuePosition();
|
||||
|
||||
/**
|
||||
* @return The {@link ByteBuffer} containing the tag bytes.
|
||||
*/
|
||||
/** Returns The {@link ByteBuffer} containing the tag bytes. */
|
||||
public abstract ByteBuffer getTagsByteBuffer();
|
||||
|
||||
/**
|
||||
* @return Position in the {@link ByteBuffer} where tag bytes start
|
||||
*/
|
||||
/** Returns Position in the {@link ByteBuffer} where tag bytes start */
|
||||
public abstract int getTagsPosition();
|
||||
}
|
||||
|
|
|
@ -68,14 +68,10 @@ public interface Cell extends HeapSize {
|
|||
*/
|
||||
byte[] getRowArray();
|
||||
|
||||
/**
|
||||
* @return Array index of first row byte
|
||||
*/
|
||||
/** Returns Array index of first row byte */
|
||||
int getRowOffset();
|
||||
|
||||
/**
|
||||
* @return Number of row bytes. Must be < rowArray.length - offset.
|
||||
*/
|
||||
/** Returns Number of row bytes. Must be < rowArray.length - offset. */
|
||||
short getRowLength();
|
||||
|
||||
// 2) Family
|
||||
|
@ -87,14 +83,10 @@ public interface Cell extends HeapSize {
|
|||
*/
|
||||
byte[] getFamilyArray();
|
||||
|
||||
/**
|
||||
* @return Array index of first family byte
|
||||
*/
|
||||
/** Returns Array index of first family byte */
|
||||
int getFamilyOffset();
|
||||
|
||||
/**
|
||||
* @return Number of family bytes. Must be < familyArray.length - offset.
|
||||
*/
|
||||
/** Returns Number of family bytes. Must be < familyArray.length - offset. */
|
||||
byte getFamilyLength();
|
||||
|
||||
// 3) Qualifier
|
||||
|
@ -105,14 +97,10 @@ public interface Cell extends HeapSize {
|
|||
*/
|
||||
byte[] getQualifierArray();
|
||||
|
||||
/**
|
||||
* @return Array index of first qualifier byte
|
||||
*/
|
||||
/** Returns Array index of first qualifier byte */
|
||||
int getQualifierOffset();
|
||||
|
||||
/**
|
||||
* @return Number of qualifier bytes. Must be < qualifierArray.length - offset.
|
||||
*/
|
||||
/** Returns Number of qualifier bytes. Must be < qualifierArray.length - offset. */
|
||||
int getQualifierLength();
|
||||
|
||||
// 4) Timestamp
|
||||
|
@ -154,19 +142,13 @@ public interface Cell extends HeapSize {
|
|||
*/
|
||||
byte[] getValueArray();
|
||||
|
||||
/**
|
||||
* @return Array index of first value byte
|
||||
*/
|
||||
/** Returns Array index of first value byte */
|
||||
int getValueOffset();
|
||||
|
||||
/**
|
||||
* @return Number of value bytes. Must be < valueArray.length - offset.
|
||||
*/
|
||||
/** Returns Number of value bytes. Must be < valueArray.length - offset. */
|
||||
int getValueLength();
|
||||
|
||||
/**
|
||||
* @return Serialized size (defaults to include tag length if has some tags).
|
||||
*/
|
||||
/** Returns Serialized size (defaults to include tag length if has some tags). */
|
||||
int getSerializedSize();
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,8 +26,6 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
*/
|
||||
@InterfaceAudience.Public
|
||||
public interface CellScannable {
|
||||
/**
|
||||
* @return A CellScanner over the contained {@link Cell}s
|
||||
*/
|
||||
/** Returns A CellScanner over the contained {@link Cell}s */
|
||||
CellScanner cellScanner();
|
||||
}
|
||||
|
|
|
@ -47,9 +47,7 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
*/
|
||||
@InterfaceAudience.Public
|
||||
public interface CellScanner {
|
||||
/**
|
||||
* @return the current Cell which may be mutable
|
||||
*/
|
||||
/** Returns the current Cell which may be mutable */
|
||||
Cell current();
|
||||
|
||||
/**
|
||||
|
|
|
@ -501,9 +501,7 @@ public final class CellUtil {
|
|||
return matchingFamily(left, fam) && matchingQualifier(left, qual);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if matching column family and the qualifier starts with <code>qual</code>
|
||||
*/
|
||||
/** Returns True if matching column family and the qualifier starts with <code>qual</code> */
|
||||
public static boolean matchingColumnFamilyAndQualifierPrefix(final Cell left, final byte[] fam,
|
||||
final byte[] qual) {
|
||||
return matchingFamily(left, fam) && PrivateCellUtil.qualifierStartsWith(left, qual);
|
||||
|
@ -571,9 +569,7 @@ public final class CellUtil {
|
|||
return PrivateCellUtil.isDelete(cell.getTypeByte());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if this cell is a Put.
|
||||
*/
|
||||
/** Returns True if this cell is a Put. */
|
||||
@SuppressWarnings("deprecation")
|
||||
public static boolean isPut(Cell cell) {
|
||||
return cell.getTypeByte() == Type.Put.getCode();
|
||||
|
@ -600,9 +596,7 @@ public final class CellUtil {
|
|||
PrivateCellUtil.setTimestamp(cell, Bytes.toLong(ts, tsOffset));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The Key portion of the passed <code>cell</code> as a String.
|
||||
*/
|
||||
/** Returns The Key portion of the passed <code>cell</code> as a String. */
|
||||
public static String getCellKeyAsString(Cell cell) {
|
||||
return getCellKeyAsString(cell,
|
||||
c -> Bytes.toStringBinary(c.getRowArray(), c.getRowOffset(), c.getRowLength()));
|
||||
|
|
|
@ -228,9 +228,7 @@ public class ChoreService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true when the chore is scheduled with the implementer of this interface
|
||||
*/
|
||||
/** Returns true when the chore is scheduled with the implementer of this interface */
|
||||
@InterfaceAudience.Private
|
||||
public synchronized boolean isChoreScheduled(ScheduledChore chore) {
|
||||
return chore != null && scheduledChores.containsKey(chore)
|
||||
|
@ -248,9 +246,7 @@ public class ChoreService {
|
|||
rescheduleChore(chore);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return number of chores that this service currently has scheduled
|
||||
*/
|
||||
/** Returns number of chores that this service currently has scheduled */
|
||||
int getNumberOfScheduledChores() {
|
||||
return scheduledChores.size();
|
||||
}
|
||||
|
@ -263,9 +259,7 @@ public class ChoreService {
|
|||
return choresMissingStartTime.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return number of threads in the core pool of the underlying ScheduledThreadPoolExecutor
|
||||
*/
|
||||
/** Returns number of threads in the core pool of the underlying ScheduledThreadPoolExecutor */
|
||||
int getCorePoolSize() {
|
||||
return scheduler.getCorePoolSize();
|
||||
}
|
||||
|
@ -375,16 +369,12 @@ public class ChoreService {
|
|||
choresMissingStartTime.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true when the service is shutdown and thus cannot be used anymore
|
||||
*/
|
||||
/** Returns true when the service is shutdown and thus cannot be used anymore */
|
||||
public boolean isShutdown() {
|
||||
return scheduler.isShutdown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true when the service is shutdown and all threads have terminated
|
||||
*/
|
||||
/** Returns true when the service is shutdown and all threads have terminated */
|
||||
public boolean isTerminated() {
|
||||
return scheduler.isTerminated();
|
||||
}
|
||||
|
|
|
@ -86,9 +86,7 @@ public interface ExtendedCell extends RawCell, HeapSize {
|
|||
getValueLength(), getTagsLength(), withTags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Serialized size (defaults to include tag length).
|
||||
*/
|
||||
/** Returns Serialized size (defaults to include tag length). */
|
||||
@Override
|
||||
default int getSerializedSize() {
|
||||
return getSerializedSize(true);
|
||||
|
@ -155,9 +153,7 @@ public interface ExtendedCell extends RawCell, HeapSize {
|
|||
*/
|
||||
byte[] getTagsArray();
|
||||
|
||||
/**
|
||||
* @return the first offset where the tags start in the Cell
|
||||
*/
|
||||
/** Returns the first offset where the tags start in the Cell */
|
||||
int getTagsOffset();
|
||||
|
||||
/**
|
||||
|
@ -170,8 +166,6 @@ public interface ExtendedCell extends RawCell, HeapSize {
|
|||
*/
|
||||
int getTagsLength();
|
||||
|
||||
/**
|
||||
* @return The byte representation of the KeyValue.TYPE of this cell: one of Put, Delete, etc
|
||||
*/
|
||||
/** Returns The byte representation of the KeyValue.TYPE of this cell: one of Put, Delete, etc */
|
||||
byte getTypeByte();
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue