HBASE-27401 Clean up current broken 'n's in our javadoc (#4812)
Signed-off-by: Andrew Purtell <apurtell@apache.org>
(cherry picked from commit 63cdd026f0
)
Conflicts:
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupManager.java
hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionLocation.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/SingleColumnValueExcludeFilter.java
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/SingleColumnValueFilter.java
hbase-client/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityClient.java
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java
hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestReplication.java
hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java
hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManager.java
hbase-server/src/main/java/org/apache/hadoop/hbase/HBaseServerBase.java
hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobUtils.java
hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/HBaseReplicationEndpoint.java
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSource.java
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
hbase-server/src/test/java/org/apache/hadoop/hbase/tool/TestBulkLoadHFilesSplitRecovery.java
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java
This commit is contained in:
parent
d8749658db
commit
5cab4be075
|
@ -368,7 +368,7 @@ public final class FanOutOneBlockAsyncDFSOutputSaslHelper {
|
|||
* Create a ByteString from byte array without copying (wrap), and then set it as the payload
|
||||
* for the builder.
|
||||
* @param builder builder for HDFS DataTransferEncryptorMessage.
|
||||
* @param payload byte array of payload. n
|
||||
* @param payload byte array of payload.
|
||||
*/
|
||||
static void wrapAndSetPayload(DataTransferEncryptorMessageProto.Builder builder,
|
||||
byte[] payload) throws IOException {
|
||||
|
|
|
@ -53,7 +53,8 @@ public class ClusterId {
|
|||
/**
|
||||
* Parse the serialized representation of the {@link ClusterId}
|
||||
* @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix
|
||||
* @return An instance of {@link ClusterId} made from <code>bytes</code> n * @see #toByteArray()
|
||||
* @return An instance of {@link ClusterId} made from <code>bytes</code>
|
||||
* @see #toByteArray()
|
||||
*/
|
||||
public static ClusterId parseFrom(final byte[] bytes) throws DeserializationException {
|
||||
if (ProtobufUtil.isPBMagicPrefix(bytes)) {
|
||||
|
@ -79,9 +80,7 @@ public class ClusterId {
|
|||
return builder.setClusterId(this.id).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* n * @return A {@link ClusterId} made from the passed in <code>cid</code>
|
||||
*/
|
||||
/** Returns A {@link ClusterId} made from the passed in <code>cid</code> */
|
||||
public static ClusterId convert(final ClusterIdProtos.ClusterId cid) {
|
||||
return new ClusterId(cid.getClusterId());
|
||||
}
|
||||
|
|
|
@ -275,7 +275,7 @@ public class ClusterStatus implements ClusterMetrics {
|
|||
}
|
||||
|
||||
/**
|
||||
* n * @return Server's load or null if not found.
|
||||
* @return Server's load or null if not found.
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link #getLiveServerMetrics} instead.
|
||||
*/
|
||||
|
|
|
@ -356,8 +356,8 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
|
|||
|
||||
/**
|
||||
* Set whether the tags should be compressed along with DataBlockEncoding. When no
|
||||
* DataBlockEncoding is been used, this is having no effect. n * @return this (for chained
|
||||
* invocation)
|
||||
* DataBlockEncoding is been used, this is having no effect.
|
||||
* @return this (for chained invocation)
|
||||
*/
|
||||
public HColumnDescriptor setCompressTags(boolean value) {
|
||||
getDelegateeForModification().setCompressTags(value);
|
||||
|
@ -687,8 +687,8 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
|
|||
/**
|
||||
* Parse a serialized representation of a {@link HColumnDescriptor}
|
||||
* @param bytes A pb serialized {@link HColumnDescriptor} instance with pb magic prefix
|
||||
* @return An instance of {@link HColumnDescriptor} made from <code>bytes</code> n * @see
|
||||
* #toByteArray()
|
||||
* @return An instance of {@link HColumnDescriptor} made from <code>bytes</code>
|
||||
* @see #toByteArray()
|
||||
*/
|
||||
public static HColumnDescriptor parseFrom(final byte[] bytes) throws DeserializationException {
|
||||
ColumnFamilyDescriptor desc = ColumnFamilyDescriptorBuilder.parseFrom(bytes);
|
||||
|
@ -732,7 +732,7 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the encryption algorithm for use with this family n
|
||||
* Set the encryption algorithm for use with this family
|
||||
*/
|
||||
public HColumnDescriptor setEncryptionType(String value) {
|
||||
getDelegateeForModification().setEncryptionType(value);
|
||||
|
|
|
@ -94,7 +94,7 @@ public class HRegionInfo implements RegionInfo {
|
|||
private static final int MAX_REPLICA_ID = 0xFFFF;
|
||||
|
||||
/**
|
||||
* n * @return the encodedName
|
||||
* @return the encodedName
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link org.apache.hadoop.hbase.client.RegionInfo#encodeRegionName(byte[])}.
|
||||
*/
|
||||
|
@ -212,7 +212,7 @@ public class HRegionInfo implements RegionInfo {
|
|||
* Construct HRegionInfo with explicit parameters
|
||||
* @param tableName the table name
|
||||
* @param startKey first key in region
|
||||
* @param endKey end of key range n
|
||||
* @param endKey end of key range
|
||||
*/
|
||||
public HRegionInfo(final TableName tableName, final byte[] startKey, final byte[] endKey)
|
||||
throws IllegalArgumentException {
|
||||
|
@ -225,7 +225,7 @@ public class HRegionInfo implements RegionInfo {
|
|||
* @param startKey first key in region
|
||||
* @param endKey end of key range
|
||||
* @param split true if this region has split and we have daughter regions regions that may or
|
||||
* may not hold references to this region. n
|
||||
* may not hold references to this region.
|
||||
*/
|
||||
public HRegionInfo(final TableName tableName, final byte[] startKey, final byte[] endKey,
|
||||
final boolean split) throws IllegalArgumentException {
|
||||
|
@ -405,7 +405,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the start key from the specified region name. n * @return Start key.
|
||||
* Gets the start key from the specified region name.
|
||||
* @return Start key.
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link org.apache.hadoop.hbase.client.RegionInfo#getStartKey(byte[])}.
|
||||
*/
|
||||
|
@ -415,9 +416,10 @@ public class HRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Separate elements of a regionName. n * @return Array of byte[] containing tableName, startKey
|
||||
* and id n * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link RegionInfo#parseRegionName(byte[])}.
|
||||
* Separate elements of a regionName.
|
||||
* @return Array of byte[] containing tableName, startKey and id
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link RegionInfo#parseRegionName(byte[])}.
|
||||
*/
|
||||
@Deprecated
|
||||
@InterfaceAudience.Private
|
||||
|
@ -426,9 +428,9 @@ public class HRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* n * @return if region name is encoded. n * @deprecated As of release 2.0.0, this will be
|
||||
* removed in HBase 3.0.0 Use
|
||||
* {@link org.apache.hadoop.hbase.client.RegionInfo#isEncodedRegionName(byte[])}.
|
||||
* @return if region name is encoded.
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link org.apache.hadoop.hbase.client.RegionInfo#isEncodedRegionName(byte[])}.
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean isEncodedRegionName(byte[] regionName) throws IOException {
|
||||
|
@ -494,7 +496,7 @@ public class HRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get current table name of the region n
|
||||
* Get current table name of the region
|
||||
*/
|
||||
@Override
|
||||
public TableName getTable() {
|
||||
|
@ -741,7 +743,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
/**
|
||||
* Parse a serialized representation of a {@link HRegionInfo}.
|
||||
* @param bytes A pb RegionInfo serialized with a pb magic prefix.
|
||||
* @return A deserialized {@link HRegionInfo} n * @see #toByteArray()
|
||||
* @return A deserialized {@link HRegionInfo}
|
||||
* @see #toByteArray()
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link org.apache.hadoop.hbase.client.RegionInfo#parseFrom(byte[])}.
|
||||
*/
|
||||
|
@ -755,7 +758,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
* @param bytes A pb RegionInfo serialized with a pb magic prefix.
|
||||
* @param offset starting point in the byte array
|
||||
* @param len length to read on the byte array
|
||||
* @return A deserialized {@link HRegionInfo} n * @see #toByteArray()
|
||||
* @return A deserialized {@link HRegionInfo}
|
||||
* @see #toByteArray()
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link org.apache.hadoop.hbase.client.RegionInfo#parseFrom(byte[], int, int)}.
|
||||
*/
|
||||
|
@ -780,8 +784,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
/**
|
||||
* Use this instead of {@link #toByteArray()} when writing to a stream and you want to use the pb
|
||||
* mergeDelimitedFrom (w/o the delimiter, pb reads to EOF which may not be what you want).
|
||||
* @return This instance serialized as a delimited protobuf w/ a magic pb prefix. n * @see
|
||||
* #toByteArray()
|
||||
* @return This instance serialized as a delimited protobuf w/ a magic pb prefix.
|
||||
* @see #toByteArray()
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link RegionInfo#toDelimitedByteArray(RegionInfo)}.
|
||||
*/
|
||||
|
@ -791,8 +795,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the descriptive name as {@link RegionState} does it but with hidden startkey optionally nn
|
||||
* * @return descriptive string
|
||||
* Get the descriptive name as {@link RegionState} does it but with hidden startkey optionally
|
||||
* @return descriptive string
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* RegionInfoDisplay#getDescriptiveNameFromRegionStateForDisplay(RegionState,
|
||||
* Configuration) over in hbase-server module.
|
||||
|
@ -805,7 +809,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the end key for display. Optionally hide the real end key. nn * @return the endkey
|
||||
* Get the end key for display. Optionally hide the real end key.
|
||||
* @return the endkey
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* RegionInfoDisplay#getEndKeyForDisplay(RegionInfo, Configuration) over in
|
||||
* hbase-server module.
|
||||
|
@ -817,7 +822,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the start key for display. Optionally hide the real start key. nn * @return the startkey
|
||||
* Get the start key for display. Optionally hide the real start key.
|
||||
* @return the startkey
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* RegionInfoDisplay#getStartKeyForDisplay(RegionInfo, Configuration) over in
|
||||
* hbase-server module.
|
||||
|
@ -829,8 +835,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the region name for display. Optionally hide the start key. nn * @return region name as
|
||||
* String
|
||||
* Get the region name for display. Optionally hide the start key.
|
||||
* @return region name as String
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* RegionInfoDisplay#getRegionNameAsStringForDisplay(RegionInfo, Configuration) over
|
||||
* in hbase-server module.
|
||||
|
@ -842,7 +848,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the region name for display. Optionally hide the start key. nn * @return region name bytes
|
||||
* Get the region name for display. Optionally hide the start key.
|
||||
* @return region name bytes
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* RegionInfoDisplay#getRegionNameForDisplay(RegionInfo, Configuration) over in
|
||||
* hbase-server module.
|
||||
|
@ -855,9 +862,10 @@ public class HRegionInfo implements RegionInfo {
|
|||
|
||||
/**
|
||||
* Parses an HRegionInfo instance from the passed in stream. Presumes the HRegionInfo was
|
||||
* serialized to the stream with {@link #toDelimitedByteArray()} n * @return An instance of
|
||||
* HRegionInfo. n * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link RegionInfo#parseFrom(DataInputStream)}.
|
||||
* serialized to the stream with {@link #toDelimitedByteArray()}
|
||||
* @return An instance of HRegionInfo.
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link RegionInfo#parseFrom(DataInputStream)}.
|
||||
*/
|
||||
@Deprecated
|
||||
@InterfaceAudience.Private
|
||||
|
@ -885,8 +893,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
* to EOF which may not be what you want). {@link #parseDelimitedFrom(byte[], int, int)} can be
|
||||
* used to read back the instances.
|
||||
* @param infos HRegionInfo objects to serialize
|
||||
* @return This instance serialized as a delimited protobuf w/ a magic pb prefix. n * @see
|
||||
* #toByteArray()
|
||||
* @return This instance serialized as a delimited protobuf w/ a magic pb prefix.
|
||||
* @see #toByteArray()
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link RegionInfo#toDelimitedByteArray(RegionInfo...)}.
|
||||
*/
|
||||
|
@ -927,7 +935,8 @@ public class HRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check whether two regions are adjacent nn * @return true if two regions are adjacent
|
||||
* Check whether two regions are adjacent
|
||||
* @return true if two regions are adjacent
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link org.apache.hadoop.hbase.client.RegionInfo#areAdjacent(RegionInfo, RegionInfo)}.
|
||||
*/
|
||||
|
|
|
@ -82,7 +82,7 @@ public class HRegionLocation implements Comparable<HRegionLocation> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return Immutable HRegionInfo
|
||||
* Returns immutable HRegionInfo
|
||||
* @deprecated Since 2.0.0. Will remove in 3.0.0. Use {@link #getRegion()}} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -90,9 +90,7 @@ public class HRegionLocation implements Comparable<HRegionLocation> {
|
|||
return regionInfo == null ? null : new ImmutableHRegionInfo(regionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
/** Returns regionInfo */
|
||||
public RegionInfo getRegion() {
|
||||
return regionInfo;
|
||||
}
|
||||
|
|
|
@ -356,7 +356,7 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the name of the table n
|
||||
* Get the name of the table
|
||||
*/
|
||||
@Override
|
||||
public TableName getTableName() {
|
||||
|
@ -728,7 +728,7 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
|
|||
* org.apache.hadoop.hbase.coprocessor.RegionCoprocessor. It won't check if the class can be
|
||||
* loaded or not. Whether a coprocessor is loadable or not will be determined when a region is
|
||||
* opened.
|
||||
* @param className Full class name. n
|
||||
* @param className Full class name.
|
||||
*/
|
||||
public HTableDescriptor addCoprocessor(String className) throws IOException {
|
||||
getDelegateeForModification().setCoprocessor(className);
|
||||
|
@ -744,7 +744,7 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
|
|||
* classloader.
|
||||
* @param className Full class name.
|
||||
* @param priority Priority
|
||||
* @param kvs Arbitrary key-value parameter pairs passed into the coprocessor. n
|
||||
* @param kvs Arbitrary key-value parameter pairs passed into the coprocessor.
|
||||
*/
|
||||
public HTableDescriptor addCoprocessor(String className, Path jarFilePath, int priority,
|
||||
final Map<String, String> kvs) throws IOException {
|
||||
|
@ -760,7 +760,7 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
|
|||
* loaded or not. Whether a coprocessor is loadable or not will be determined when a region is
|
||||
* opened.
|
||||
* @param specStr The Coprocessor specification all in in one String formatted so matches
|
||||
* {@link HConstants#CP_HTD_ATTR_VALUE_PATTERN} n
|
||||
* {@link HConstants#CP_HTD_ATTR_VALUE_PATTERN}
|
||||
*/
|
||||
public HTableDescriptor addCoprocessorWithSpec(final String specStr) throws IOException {
|
||||
getDelegateeForModification().setCoprocessorWithSpec(specStr);
|
||||
|
@ -844,8 +844,8 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
|
|||
/**
|
||||
* Parse the serialized representation of a {@link HTableDescriptor}
|
||||
* @param bytes A pb serialized {@link HTableDescriptor} instance with pb magic prefix
|
||||
* @return An instance of {@link HTableDescriptor} made from <code>bytes</code> nn * @see
|
||||
* #toByteArray()
|
||||
* @return An instance of {@link HTableDescriptor} made from <code>bytes</code>
|
||||
* @see #toByteArray()
|
||||
*/
|
||||
public static HTableDescriptor parseFrom(final byte[] bytes)
|
||||
throws DeserializationException, IOException {
|
||||
|
|
|
@ -34,8 +34,7 @@ public class NotAllMetaRegionsOnlineException extends DoNotRetryIOException {
|
|||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
* */
|
||||
public NotAllMetaRegionsOnlineException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
|
|
@ -393,7 +393,7 @@ public class ServerLoad implements ServerMetrics {
|
|||
}
|
||||
|
||||
/**
|
||||
* Call directly from client such as hbase shell n
|
||||
* Call directly from client such as hbase shell
|
||||
*/
|
||||
@Override
|
||||
public ReplicationLoadSink getReplicationLoadSink() {
|
||||
|
|
|
@ -70,7 +70,7 @@ public interface ServerMetrics {
|
|||
Map<String, List<ReplicationLoadSource>> getReplicationLoadSourceMap();
|
||||
|
||||
/**
|
||||
* Call directly from client such as hbase shell n
|
||||
* Call directly from client such as hbase shell
|
||||
*/
|
||||
@Nullable
|
||||
ReplicationLoadSink getReplicationLoadSink();
|
||||
|
|
|
@ -533,9 +533,10 @@ public interface Admin extends Abortable, Closeable {
|
|||
* Disable table and wait on completion. May timeout eventually. Use
|
||||
* {@link #disableTableAsync(org.apache.hadoop.hbase.TableName)} and
|
||||
* {@link #isTableDisabled(org.apache.hadoop.hbase.TableName)} instead. The table has to be in
|
||||
* enabled state for it to be disabled. n * @throws IOException There could be couple types of
|
||||
* IOException TableNotFoundException means the table doesn't exist. TableNotEnabledException
|
||||
* means the table isn't in enabled state.
|
||||
* enabled state for it to be disabled.
|
||||
* @throws IOException There could be couple types of IOException TableNotFoundException means the
|
||||
* table doesn't exist. TableNotEnabledException means the table isn't in
|
||||
* enabled state.
|
||||
*/
|
||||
default void disableTable(TableName tableName) throws IOException {
|
||||
get(disableTableAsync(tableName), getSyncWaitTimeout(), TimeUnit.MILLISECONDS);
|
||||
|
@ -934,7 +935,7 @@ public interface Admin extends Abortable, Closeable {
|
|||
* then it returns. It does not wait on the completion of Compaction (it can take a while).
|
||||
* @param tableName table to compact
|
||||
* @param compactType {@link org.apache.hadoop.hbase.client.CompactType}
|
||||
* @throws IOException if a remote or network exception occurs n
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
*/
|
||||
void compact(TableName tableName, CompactType compactType)
|
||||
throws IOException, InterruptedException;
|
||||
|
@ -946,7 +947,7 @@ public interface Admin extends Abortable, Closeable {
|
|||
* @param tableName table to compact
|
||||
* @param columnFamily column family within a table
|
||||
* @param compactType {@link org.apache.hadoop.hbase.client.CompactType}
|
||||
* @throws IOException if not a mob column family or if a remote or network exception occurs n
|
||||
* @throws IOException if not a mob column family or if a remote or network exception occurs
|
||||
*/
|
||||
void compact(TableName tableName, byte[] columnFamily, CompactType compactType)
|
||||
throws IOException, InterruptedException;
|
||||
|
@ -995,7 +996,7 @@ public interface Admin extends Abortable, Closeable {
|
|||
* while).
|
||||
* @param tableName table to compact
|
||||
* @param compactType {@link org.apache.hadoop.hbase.client.CompactType}
|
||||
* @throws IOException if a remote or network exception occurs n
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
*/
|
||||
void majorCompact(TableName tableName, CompactType compactType)
|
||||
throws IOException, InterruptedException;
|
||||
|
@ -1007,7 +1008,7 @@ public interface Admin extends Abortable, Closeable {
|
|||
* @param tableName table to compact
|
||||
* @param columnFamily column family within a table
|
||||
* @param compactType {@link org.apache.hadoop.hbase.client.CompactType}
|
||||
* @throws IOException if not a mob column family or if a remote or network exception occurs n
|
||||
* @throws IOException if not a mob column family or if a remote or network exception occurs
|
||||
*/
|
||||
void majorCompact(TableName tableName, byte[] columnFamily, CompactType compactType)
|
||||
throws IOException, InterruptedException;
|
||||
|
@ -1018,10 +1019,10 @@ public interface Admin extends Abortable, Closeable {
|
|||
* can take a while).
|
||||
* @param sn the region server name
|
||||
* @param major if it's major compaction
|
||||
* @throws IOException if a remote or network exception occurs n * @deprecated As of release
|
||||
* 2.0.0, this will be removed in HBase 3.0.0. Use
|
||||
* {@link #compactRegionServer(ServerName)} or
|
||||
* {@link #majorCompactRegionServer(ServerName)}.
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. Use
|
||||
* {@link #compactRegionServer(ServerName)} or
|
||||
* {@link #majorCompactRegionServer(ServerName)}.
|
||||
*/
|
||||
@Deprecated
|
||||
default void compactRegionServer(ServerName sn, boolean major)
|
||||
|
@ -2668,7 +2669,7 @@ public interface Admin extends Abortable, Closeable {
|
|||
|
||||
/**
|
||||
* Return the set of supported security capabilities.
|
||||
* @throws IOException if a remote or network exception occurs n
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
*/
|
||||
List<SecurityCapability> getSecurityCapabilities() throws IOException;
|
||||
|
||||
|
@ -3012,7 +3013,7 @@ public interface Admin extends Abortable, Closeable {
|
|||
* Clear compacting queues on a regionserver.
|
||||
* @param serverName the region server name
|
||||
* @param queues the set of queue name
|
||||
* @throws IOException if a remote or network exception occurs n
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
*/
|
||||
void clearCompactionQueues(ServerName serverName, Set<String> queues)
|
||||
throws IOException, InterruptedException;
|
||||
|
|
|
@ -61,7 +61,7 @@ public class Append extends Mutation {
|
|||
* <p>
|
||||
* This range is used as [minStamp, maxStamp).
|
||||
* @param minStamp minimum timestamp value, inclusive
|
||||
* @param maxStamp maximum timestamp value, exclusive n
|
||||
* @param maxStamp maximum timestamp value, exclusive
|
||||
*/
|
||||
public Append setTimeRange(long minStamp, long maxStamp) {
|
||||
tr = new TimeRange(minStamp, maxStamp);
|
||||
|
@ -69,7 +69,7 @@ public class Append extends Mutation {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the TimeRange used for this append. n
|
||||
* Gets the TimeRange used for this append.
|
||||
*/
|
||||
public TimeRange getTimeRange() {
|
||||
return this.tr;
|
||||
|
@ -81,7 +81,7 @@ public class Append extends Mutation {
|
|||
}
|
||||
|
||||
/**
|
||||
* n * True (default) if the append operation should return the results. A client that is not
|
||||
* True (default) if the append operation should return the results. A client that is not
|
||||
* interested in the result can save network bandwidth setting this to false.
|
||||
*/
|
||||
@Override
|
||||
|
@ -120,7 +120,7 @@ public class Append extends Mutation {
|
|||
* Create a Append operation for the specified row.
|
||||
* <p>
|
||||
* At least one column must be appended to.
|
||||
* @param rowArray Makes a copy out of this buffer. nn
|
||||
* @param rowArray Makes a copy out of this buffer.
|
||||
*/
|
||||
public Append(final byte[] rowArray, final int rowOffset, final int rowLength) {
|
||||
checkRow(rowArray, rowOffset, rowLength);
|
||||
|
@ -142,9 +142,9 @@ public class Append extends Mutation {
|
|||
* Add the specified column and value to this Append operation.
|
||||
* @param family family name
|
||||
* @param qualifier column qualifier
|
||||
* @param value value to append to specified column n * @deprecated As of release 2.0.0, this
|
||||
* will be removed in HBase 3.0.0. Use {@link #addColumn(byte[], byte[], byte[])}
|
||||
* instead
|
||||
* @param value value to append to specified column
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. Use
|
||||
* {@link #addColumn(byte[], byte[], byte[])} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public Append add(byte[] family, byte[] qualifier, byte[] value) {
|
||||
|
@ -155,7 +155,7 @@ public class Append extends Mutation {
|
|||
* Add the specified column and value to this Append operation.
|
||||
* @param family family name
|
||||
* @param qualifier column qualifier
|
||||
* @param value value to append to specified column n
|
||||
* @param value value to append to specified column
|
||||
*/
|
||||
public Append addColumn(byte[] family, byte[] qualifier, byte[] value) {
|
||||
KeyValue kv = new KeyValue(this.row, family, qualifier, this.ts, KeyValue.Type.Put, value);
|
||||
|
@ -163,7 +163,8 @@ public class Append extends Mutation {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add column and value to this Append operation. n * @return This instance
|
||||
* Add column and value to this Append operation.
|
||||
* @return This instance
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
|
|
|
@ -206,7 +206,7 @@ public interface AsyncAdmin {
|
|||
CompletableFuture<Void> enableTable(TableName tableName);
|
||||
|
||||
/**
|
||||
* Disable a table. The table has to be in enabled state for it to be disabled. n
|
||||
* Disable a table. The table has to be in enabled state for it to be disabled.
|
||||
*/
|
||||
CompletableFuture<Void> disableTable(TableName tableName);
|
||||
|
||||
|
@ -1134,7 +1134,7 @@ public interface AsyncAdmin {
|
|||
CompletableFuture<Void> stopMaster();
|
||||
|
||||
/**
|
||||
* Stop the designated regionserver. n
|
||||
* Stop the designated regionserver.
|
||||
*/
|
||||
CompletableFuture<Void> stopRegionServer(ServerName serverName);
|
||||
|
||||
|
@ -1336,8 +1336,8 @@ public interface AsyncAdmin {
|
|||
CompletableFuture<Boolean> normalize(NormalizeTableFilterParams ntfp);
|
||||
|
||||
/**
|
||||
* Turn the cleaner chore on/off. n * @return Previous cleaner state wrapped by a
|
||||
* {@link CompletableFuture}
|
||||
* Turn the cleaner chore on/off.
|
||||
* @return Previous cleaner state wrapped by a {@link CompletableFuture}
|
||||
*/
|
||||
CompletableFuture<Boolean> cleanerChoreSwitch(boolean on);
|
||||
|
||||
|
@ -1356,8 +1356,8 @@ public interface AsyncAdmin {
|
|||
CompletableFuture<Boolean> runCleanerChore();
|
||||
|
||||
/**
|
||||
* Turn the catalog janitor on/off. n * @return the previous state wrapped by a
|
||||
* {@link CompletableFuture}
|
||||
* Turn the catalog janitor on/off.
|
||||
* @return the previous state wrapped by a {@link CompletableFuture}
|
||||
*/
|
||||
CompletableFuture<Boolean> catalogJanitorSwitch(boolean on);
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ public class AsyncConnectionImpl implements AsyncConnection {
|
|||
}
|
||||
|
||||
/**
|
||||
* If choreService has not been created yet, create the ChoreService. n
|
||||
* If choreService has not been created yet, create the ChoreService.
|
||||
*/
|
||||
synchronized ChoreService getChoreService() {
|
||||
if (isClosed()) {
|
||||
|
|
|
@ -198,7 +198,7 @@ class AsyncProcess {
|
|||
* The submitted task may be not accomplished at all if there are too many running tasks or other
|
||||
* limits.
|
||||
* @param <CResult> The class to cast the result
|
||||
* @param task The setting and data n
|
||||
* @param task The setting and data
|
||||
*/
|
||||
public <CResult> AsyncRequestFuture submit(AsyncProcessTask<CResult> task)
|
||||
throws InterruptedIOException {
|
||||
|
|
|
@ -57,8 +57,8 @@ public interface ClusterConnection extends Connection {
|
|||
/**
|
||||
* Use this api to check if the table has been created with the specified number of splitkeys
|
||||
* which was used while creating the given table. Note : If this api is used after a table's
|
||||
* region gets splitted, the api may return false. n * tableName n * splitKeys used while creating
|
||||
* table n * if a remote or network exception occurs
|
||||
* region gets splitted, the api may return false. tableName splitKeys used while creating table
|
||||
* if a remote or network exception occurs
|
||||
*/
|
||||
boolean isTableAvailable(TableName tableName, byte[][] splitKeys) throws IOException;
|
||||
|
||||
|
@ -261,7 +261,7 @@ public interface ClusterConnection extends Connection {
|
|||
* Returns a new RpcRetryingCallerFactory from the given {@link Configuration}. This
|
||||
* RpcRetryingCallerFactory lets the users create {@link RpcRetryingCaller}s which can be
|
||||
* intercepted with the configured {@link RetryingCallerInterceptor}
|
||||
* @param conf configuration n
|
||||
* @param conf configuration
|
||||
*/
|
||||
RpcRetryingCallerFactory getNewRpcRetryingCallerFactory(Configuration conf);
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ public interface ColumnFamilyDescriptor {
|
|||
int getMinVersions();
|
||||
|
||||
/**
|
||||
* Get the mob compact partition policy for this family n
|
||||
* Get the mob compact partition policy for this family
|
||||
*/
|
||||
MobCompactPartitionPolicy getMobCompactPartitionPolicy();
|
||||
|
||||
|
|
|
@ -866,8 +866,8 @@ public class ColumnFamilyDescriptorBuilder {
|
|||
|
||||
/**
|
||||
* Set whether the tags should be compressed along with DataBlockEncoding. When no
|
||||
* DataBlockEncoding is been used, this is having no effect. n * @return this (for chained
|
||||
* invocation)
|
||||
* DataBlockEncoding is been used, this is having no effect.
|
||||
* @return this (for chained invocation)
|
||||
*/
|
||||
public ModifyableColumnFamilyDescriptor setCompressTags(boolean compressTags) {
|
||||
return setValue(COMPRESS_TAGS_BYTES, String.valueOf(compressTags));
|
||||
|
|
|
@ -633,7 +633,7 @@ public class ConnectionImplementation implements ClusterConnection, Closeable {
|
|||
}
|
||||
|
||||
/**
|
||||
* If choreService has not been created yet, create the ChoreService. n
|
||||
* If choreService has not been created yet, create the ChoreService.
|
||||
*/
|
||||
synchronized ChoreService getChoreService() {
|
||||
if (choreService == null) {
|
||||
|
|
|
@ -95,7 +95,7 @@ public class Delete extends Mutation {
|
|||
* <p>
|
||||
* This timestamp is ONLY used for a delete row operation. If specifying families or columns, you
|
||||
* must specify each timestamp individually.
|
||||
* @param row We make a local copy of this passed in row. nn
|
||||
* @param row We make a local copy of this passed in row.
|
||||
*/
|
||||
public Delete(final byte[] row, final int rowOffset, final int rowLength) {
|
||||
this(row, rowOffset, rowLength, HConstants.LATEST_TIMESTAMP);
|
||||
|
@ -139,8 +139,9 @@ public class Delete extends Mutation {
|
|||
/**
|
||||
* Advanced use only. Add an existing delete marker to this Delete object.
|
||||
* @param kv An existing KeyValue of type "delete".
|
||||
* @return this for invocation chaining n * @deprecated As of release 2.0.0, this will be removed
|
||||
* in HBase 3.0.0. Use {@link #add(Cell)} instead
|
||||
* @return this for invocation chaining
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. Use {@link #add(Cell)}
|
||||
* instead
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Deprecated
|
||||
|
@ -151,7 +152,7 @@ public class Delete extends Mutation {
|
|||
/**
|
||||
* Add an existing delete marker to this Delete object.
|
||||
* @param cell An existing cell of type "delete".
|
||||
* @return this for invocation chaining n
|
||||
* @return this for invocation chaining
|
||||
*/
|
||||
@Override
|
||||
public Delete add(Cell cell) throws IOException {
|
||||
|
|
|
@ -87,7 +87,7 @@ public class Get extends Query implements Row {
|
|||
}
|
||||
|
||||
/**
|
||||
* Copy-constructor n
|
||||
* Copy-constructor
|
||||
*/
|
||||
public Get(Get get) {
|
||||
this(get.getRow());
|
||||
|
@ -126,7 +126,7 @@ public class Get extends Query implements Row {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a Get operation for the specified row. nnn
|
||||
* Create a Get operation for the specified row.
|
||||
*/
|
||||
public Get(byte[] row, int rowOffset, int rowLength) {
|
||||
Mutation.checkRow(row, rowOffset, rowLength);
|
||||
|
@ -134,7 +134,7 @@ public class Get extends Query implements Row {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a Get operation for the specified row. n
|
||||
* Create a Get operation for the specified row.
|
||||
*/
|
||||
public Get(ByteBuffer row) {
|
||||
Mutation.checkRow(row);
|
||||
|
@ -208,7 +208,8 @@ public class Get extends Query implements Row {
|
|||
/**
|
||||
* Get versions of columns only within the specified timestamp range, [minStamp, maxStamp).
|
||||
* @param minStamp minimum timestamp value, inclusive
|
||||
* @param maxStamp maximum timestamp value, exclusive n * @return this for invocation chaining
|
||||
* @param maxStamp maximum timestamp value, exclusive
|
||||
* @return this for invocation chaining
|
||||
*/
|
||||
public Get setTimeRange(long minStamp, long maxStamp) throws IOException {
|
||||
tr = new TimeRange(minStamp, maxStamp);
|
||||
|
@ -351,7 +352,7 @@ public class Get extends Query implements Row {
|
|||
}
|
||||
|
||||
/**
|
||||
* Method for retrieving the get's row n
|
||||
* Method for retrieving the get's row
|
||||
*/
|
||||
@Override
|
||||
public byte[] getRow() {
|
||||
|
@ -383,7 +384,7 @@ public class Get extends Query implements Row {
|
|||
}
|
||||
|
||||
/**
|
||||
* Method for retrieving the get's TimeRange n
|
||||
* Method for retrieving the get's TimeRange
|
||||
*/
|
||||
public TimeRange getTimeRange() {
|
||||
return this.tr;
|
||||
|
@ -414,7 +415,7 @@ public class Get extends Query implements Row {
|
|||
}
|
||||
|
||||
/**
|
||||
* Method for retrieving the get's familyMap n
|
||||
* Method for retrieving the get's familyMap
|
||||
*/
|
||||
public Map<byte[], NavigableSet<byte[]>> getFamilyMap() {
|
||||
return this.familyMap;
|
||||
|
@ -422,7 +423,7 @@ public class Get extends Query implements Row {
|
|||
|
||||
/**
|
||||
* Compile the table and column family (i.e. schema) information into a String. Useful for parsing
|
||||
* and aggregation by debugging, logging, and administration tools. n
|
||||
* and aggregation by debugging, logging, and administration tools.
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getFingerprint() {
|
||||
|
@ -439,7 +440,7 @@ public class Get extends Query implements Row {
|
|||
* Compile the details beyond the scope of getFingerprint (row, columns, timestamps, etc.) into a
|
||||
* Map along with the fingerprinted information. Useful for debugging, logging, and administration
|
||||
* tools.
|
||||
* @param maxCols a limit on the number of columns output prior to truncation n
|
||||
* @param maxCols a limit on the number of columns output prior to truncation
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> toMap(int maxCols) {
|
||||
|
|
|
@ -1193,7 +1193,7 @@ public class HBaseAdmin implements Admin {
|
|||
}
|
||||
|
||||
/**
|
||||
* n * @return List of {@link HRegionInfo}.
|
||||
* @return List of {@link HRegionInfo}.
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link #getRegions(ServerName)}.
|
||||
|
@ -1417,7 +1417,7 @@ public class HBaseAdmin implements Admin {
|
|||
* @param regionName region to compact
|
||||
* @param columnFamily column family within a table or region
|
||||
* @param major True if we are to do a major compaction.
|
||||
* @throws IOException if a remote or network exception occurs n
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
*/
|
||||
private void compactRegion(final byte[] regionName, final byte[] columnFamily,
|
||||
final boolean major) throws IOException {
|
||||
|
@ -2369,7 +2369,7 @@ public class HBaseAdmin implements Admin {
|
|||
}
|
||||
|
||||
/**
|
||||
* n * @return List of {@link HRegionInfo}.
|
||||
* @return List of {@link HRegionInfo}.
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0 Use
|
||||
* {@link #getRegions(TableName)}.
|
||||
|
|
|
@ -129,8 +129,8 @@ public class HTableMultiplexer {
|
|||
|
||||
/**
|
||||
* The put request will be buffered by its corresponding buffer queue. Return false if the queue
|
||||
* is already full. nn * @return true if the request can be accepted by its corresponding buffer
|
||||
* queue.
|
||||
* is already full.
|
||||
* @return true if the request can be accepted by its corresponding buffer queue.
|
||||
*/
|
||||
public boolean put(TableName tableName, final Put put) {
|
||||
return put(tableName, put, this.maxAttempts);
|
||||
|
@ -138,7 +138,8 @@ public class HTableMultiplexer {
|
|||
|
||||
/**
|
||||
* The puts request will be buffered by their corresponding buffer queue. Return the list of puts
|
||||
* which could not be queued. nn * @return the list of puts which could not be queued
|
||||
* which could not be queued.
|
||||
* @return the list of puts which could not be queued
|
||||
*/
|
||||
public List<Put> put(TableName tableName, final List<Put> puts) {
|
||||
if (puts == null) return null;
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
@InterfaceAudience.Private
|
||||
public class ImmutableHColumnDescriptor extends HColumnDescriptor {
|
||||
/*
|
||||
* Create an unmodifyable copy of an HColumnDescriptor n
|
||||
* Create an unmodifyable copy of an HColumnDescriptor
|
||||
*/
|
||||
ImmutableHColumnDescriptor(final HColumnDescriptor desc) {
|
||||
super(desc, false);
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
public class ImmutableHRegionInfo extends HRegionInfo {
|
||||
|
||||
/*
|
||||
* Creates an immutable copy of an HRegionInfo. n
|
||||
* Creates an immutable copy of an HRegionInfo.
|
||||
*/
|
||||
public ImmutableHRegionInfo(RegionInfo other) {
|
||||
super(other);
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ImmutableHTableDescriptor extends HTableDescriptor {
|
|||
}
|
||||
|
||||
/*
|
||||
* Create an unmodifyable copy of an HTableDescriptor n
|
||||
* Create an unmodifyable copy of an HTableDescriptor
|
||||
*/
|
||||
public ImmutableHTableDescriptor(final HTableDescriptor desc) {
|
||||
super(desc, false);
|
||||
|
|
|
@ -92,7 +92,8 @@ public class Increment extends Mutation {
|
|||
|
||||
/**
|
||||
* Add the specified KeyValue to this operation.
|
||||
* @param cell individual Cell n * @throws java.io.IOException e
|
||||
* @param cell individual Cell
|
||||
* @throws java.io.IOException e
|
||||
*/
|
||||
@Override
|
||||
public Increment add(Cell cell) throws IOException {
|
||||
|
@ -121,7 +122,7 @@ public class Increment extends Mutation {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the TimeRange used for this increment. n
|
||||
* Gets the TimeRange used for this increment.
|
||||
*/
|
||||
public TimeRange getTimeRange() {
|
||||
return this.tr;
|
||||
|
@ -139,7 +140,7 @@ public class Increment extends Mutation {
|
|||
* This range is used as [minStamp, maxStamp).
|
||||
* @param minStamp minimum timestamp value, inclusive
|
||||
* @param maxStamp maximum timestamp value, exclusive
|
||||
* @throws IOException if invalid time range n
|
||||
* @throws IOException if invalid time range
|
||||
*/
|
||||
public Increment setTimeRange(long minStamp, long maxStamp) throws IOException {
|
||||
tr = new TimeRange(minStamp, maxStamp);
|
||||
|
@ -209,8 +210,7 @@ public class Increment extends Mutation {
|
|||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
* */
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
|
@ -107,7 +107,7 @@ abstract class MasterCallable<V> implements RetryingCallable<V>, Closeable {
|
|||
* configured to make this rpc call, use getRpcController(). We are trying to contain
|
||||
* rpcController references so we don't pollute codebase with protobuf references; keep the
|
||||
* protobuf references contained and only present in a few classes rather than all about the code
|
||||
* base. n
|
||||
* base.
|
||||
*/
|
||||
protected abstract V rpcCall() throws Exception;
|
||||
|
||||
|
|
|
@ -186,9 +186,7 @@ public class MetaCache {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* n * @return Map of cached locations for passed <code>tableName</code>
|
||||
*/
|
||||
/** Returns Map of cached locations for passed <code>tableName</code> */
|
||||
private ConcurrentNavigableMap<byte[], RegionLocations>
|
||||
getTableLocations(final TableName tableName) {
|
||||
// find the map of cached locations for this table
|
||||
|
@ -287,7 +285,7 @@ public class MetaCache {
|
|||
|
||||
/**
|
||||
* Delete a cached location, no matter what it is. Called when we were told to not use cache.
|
||||
* @param tableName tableName n
|
||||
* @param tableName tableName
|
||||
*/
|
||||
public void clearCache(final TableName tableName, final byte[] row) {
|
||||
ConcurrentMap<byte[], RegionLocations> tableLocations = getTableLocations(tableName);
|
||||
|
|
|
@ -179,7 +179,7 @@ class MutableRegionInfo implements RegionInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get current table name of the region n
|
||||
* Get current table name of the region
|
||||
*/
|
||||
@Override
|
||||
public TableName getTable() {
|
||||
|
@ -231,7 +231,7 @@ class MutableRegionInfo implements RegionInfo {
|
|||
|
||||
/**
|
||||
* Change the split status flag.
|
||||
* @param split set split status n
|
||||
* @param split set split status
|
||||
*/
|
||||
public MutableRegionInfo setSplit(boolean split) {
|
||||
this.split = split;
|
||||
|
@ -252,7 +252,7 @@ class MutableRegionInfo implements RegionInfo {
|
|||
/**
|
||||
* The parent of a region split is offline while split daughters hold references to the parent.
|
||||
* Offlined regions are closed.
|
||||
* @param offLine Set online/offline status. n
|
||||
* @param offLine Set online/offline status.
|
||||
*/
|
||||
public MutableRegionInfo setOffline(boolean offLine) {
|
||||
this.offLine = offLine;
|
||||
|
|
|
@ -201,7 +201,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
* Compile the details beyond the scope of getFingerprint (row, columns, timestamps, etc.) into a
|
||||
* Map along with the fingerprinted information. Useful for debugging, logging, and administration
|
||||
* tools.
|
||||
* @param maxCols a limit on the number of columns output prior to truncation n
|
||||
* @param maxCols a limit on the number of columns output prior to truncation
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> toMap(int maxCols) {
|
||||
|
@ -264,7 +264,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the durability for this mutation n
|
||||
* Set the durability for this mutation
|
||||
*/
|
||||
public Mutation setDurability(Durability d) {
|
||||
this.durability = d;
|
||||
|
@ -277,7 +277,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
}
|
||||
|
||||
/**
|
||||
* Method for retrieving the put's familyMap n
|
||||
* Method for retrieving the put's familyMap
|
||||
*/
|
||||
public NavigableMap<byte[], List<Cell>> getFamilyCellMap() {
|
||||
return this.familyMap;
|
||||
|
@ -305,7 +305,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
}
|
||||
|
||||
/**
|
||||
* Method for retrieving the delete's row n
|
||||
* Method for retrieving the delete's row
|
||||
*/
|
||||
@Override
|
||||
public byte[] getRow() {
|
||||
|
@ -323,8 +323,9 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
}
|
||||
|
||||
/**
|
||||
* Method for retrieving the timestamp n * @deprecated As of release 2.0.0, this will be removed
|
||||
* in HBase 3.0.0. Use {@link #getTimestamp()} instead
|
||||
* Method for retrieving the timestamp
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. Use
|
||||
* {@link #getTimestamp()} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public long getTimeStamp() {
|
||||
|
@ -332,7 +333,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
}
|
||||
|
||||
/**
|
||||
* Method for retrieving the timestamp. n
|
||||
* Method for retrieving the timestamp.
|
||||
*/
|
||||
public long getTimestamp() {
|
||||
return this.ts;
|
||||
|
@ -368,7 +369,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the visibility expression associated with cells in this Mutation. n
|
||||
* Sets the visibility expression associated with cells in this Mutation.
|
||||
*/
|
||||
public Mutation setCellVisibility(CellVisibility expression) {
|
||||
this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY,
|
||||
|
@ -384,8 +385,8 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer CellVisibility based on a client CellVisibility. n * @return a
|
||||
* protocol buffer CellVisibility
|
||||
* Create a protocol buffer CellVisibility based on a client CellVisibility.
|
||||
* @return a protocol buffer CellVisibility
|
||||
*/
|
||||
static ClientProtos.CellVisibility toCellVisibility(CellVisibility cellVisibility) {
|
||||
ClientProtos.CellVisibility.Builder builder = ClientProtos.CellVisibility.newBuilder();
|
||||
|
@ -394,8 +395,8 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a protocol buffer CellVisibility to a client CellVisibility n * @return the converted
|
||||
* client CellVisibility
|
||||
* Convert a protocol buffer CellVisibility to a client CellVisibility
|
||||
* @return the converted client CellVisibility
|
||||
*/
|
||||
private static CellVisibility toCellVisibility(ClientProtos.CellVisibility proto) {
|
||||
if (proto == null) return null;
|
||||
|
@ -403,8 +404,8 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a protocol buffer CellVisibility bytes to a client CellVisibility n * @return the
|
||||
* converted client CellVisibility n
|
||||
* Convert a protocol buffer CellVisibility bytes to a client CellVisibility
|
||||
* @return the converted client CellVisibility
|
||||
*/
|
||||
private static CellVisibility toCellVisibility(byte[] protoBytes)
|
||||
throws DeserializationException {
|
||||
|
@ -511,7 +512,7 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
|
||||
/**
|
||||
* Set the TTL desired for the result of the mutation, in milliseconds.
|
||||
* @param ttl the TTL desired for the result of the mutation, in milliseconds n
|
||||
* @param ttl the TTL desired for the result of the mutation, in milliseconds
|
||||
*/
|
||||
public Mutation setTTL(long ttl) {
|
||||
setAttribute(OP_ATTRIBUTE_TTL, Bytes.toBytes(ttl));
|
||||
|
@ -688,8 +689,9 @@ public abstract class Mutation extends OperationWithAttributes
|
|||
}
|
||||
|
||||
/**
|
||||
* @param row Row to check nn * @throws IllegalArgumentException Thrown if <code>row</code> is
|
||||
* empty or null or > {@link HConstants#MAX_ROW_LENGTH}
|
||||
* @param row Row to check
|
||||
* @throws IllegalArgumentException Thrown if <code>row</code> is empty or null or >
|
||||
* {@link HConstants#MAX_ROW_LENGTH}
|
||||
* @return <code>row</code>
|
||||
*/
|
||||
static byte[] checkRow(final byte[] row, final int offset, final int length) {
|
||||
|
|
|
@ -94,7 +94,7 @@ public abstract class Operation {
|
|||
/**
|
||||
* Produces a string representation of this Operation. It defaults to a JSON representation, but
|
||||
* falls back to a string representation of the fingerprint and details in the case of a JSON
|
||||
* encoding failure. n
|
||||
* encoding failure.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
@ -106,7 +106,7 @@ public abstract class OperationWithAttributes extends Operation implements Attri
|
|||
* This method allows you to set an identifier on an operation. The original motivation for this
|
||||
* was to allow the identifier to be used in slow query logging, but this could obviously be
|
||||
* useful in other places. One use of this could be to put a class.method identifier in here to
|
||||
* see where the slow query is coming from. n * id to set for the scan
|
||||
* see where the slow query is coming from. id to set for the scan
|
||||
*/
|
||||
public OperationWithAttributes setId(String id) {
|
||||
setAttribute(ID_ATRIBUTE, Bytes.toBytes(id));
|
||||
|
|
|
@ -132,7 +132,7 @@ class PreemptiveFastFailInterceptor extends RetryingCallerInterceptor {
|
|||
/**
|
||||
* Handles failures encountered when communicating with a server. Updates the FailureInfo in
|
||||
* repeatedFailuresMap to reflect the failure. Throws RepeatedConnectException if the client is in
|
||||
* Fast fail mode. nn * - the throwable to be handled. n
|
||||
* Fast fail mode. - the throwable to be handled.
|
||||
*/
|
||||
protected void handleFailureToServer(ServerName serverName, Throwable t) {
|
||||
if (serverName == null || t == null) {
|
||||
|
@ -201,7 +201,8 @@ class PreemptiveFastFailInterceptor extends RetryingCallerInterceptor {
|
|||
/**
|
||||
* Checks to see if we are in the Fast fail mode for requests to the server. If a client is unable
|
||||
* to contact a server for more than fastFailThresholdMilliSec the client will get into fast fail
|
||||
* mode. n * @return true if the client is in fast fail mode for the server.
|
||||
* mode.
|
||||
* @return true if the client is in fast fail mode for the server.
|
||||
*/
|
||||
private boolean inFastFailMode(ServerName server) {
|
||||
FailureInfo fInfo = repeatedFailuresMap.get(server);
|
||||
|
@ -225,7 +226,7 @@ class PreemptiveFastFailInterceptor extends RetryingCallerInterceptor {
|
|||
* Check to see if the client should try to connnect to the server, inspite of knowing that it is
|
||||
* in the fast fail mode. The idea here is that we want just one client thread to be actively
|
||||
* trying to reconnect, while all the other threads trying to reach the server will short circuit.
|
||||
* n * @return true if the client should try to connect to the server.
|
||||
* @return true if the client should try to connect to the server.
|
||||
*/
|
||||
protected boolean shouldRetryInspiteOfFastFail(FailureInfo fInfo) {
|
||||
// We believe that the server is down, But, we want to have just one
|
||||
|
@ -246,7 +247,7 @@ class PreemptiveFastFailInterceptor extends RetryingCallerInterceptor {
|
|||
}
|
||||
|
||||
/**
|
||||
* This function updates the Failure info for a particular server after the attempt to nnnn
|
||||
* This function updates the Failure info for a particular server after the attempt to
|
||||
*/
|
||||
private void updateFailureInfoForServer(ServerName server, FailureInfo fInfo, boolean didTry,
|
||||
boolean couldNotCommunicate, boolean retryDespiteFastFailMode) {
|
||||
|
|
|
@ -60,7 +60,7 @@ public class Put extends Mutation implements HeapSize {
|
|||
}
|
||||
|
||||
/**
|
||||
* We make a copy of the passed in row key to keep local. nnn
|
||||
* We make a copy of the passed in row key to keep local.
|
||||
*/
|
||||
public Put(byte[] rowArray, int rowOffset, int rowLength) {
|
||||
this(rowArray, rowOffset, rowLength, HConstants.LATEST_TIMESTAMP);
|
||||
|
@ -88,7 +88,7 @@ public class Put extends Mutation implements HeapSize {
|
|||
}
|
||||
|
||||
/**
|
||||
* We make a copy of the passed in row key to keep local. nnnn
|
||||
* We make a copy of the passed in row key to keep local.
|
||||
*/
|
||||
public Put(byte[] rowArray, int rowOffset, int rowLength, long ts) {
|
||||
checkRow(rowArray, rowOffset, rowLength);
|
||||
|
@ -155,7 +155,7 @@ public class Put extends Mutation implements HeapSize {
|
|||
* Add the specified column and value to this Put operation.
|
||||
* @param family family name
|
||||
* @param qualifier column qualifier
|
||||
* @param value column value n
|
||||
* @param value column value
|
||||
*/
|
||||
public Put addColumn(byte[] family, byte[] qualifier, byte[] value) {
|
||||
return addColumn(family, qualifier, this.ts, value);
|
||||
|
@ -178,7 +178,7 @@ public class Put extends Mutation implements HeapSize {
|
|||
* @param family family name
|
||||
* @param qualifier column qualifier
|
||||
* @param ts version timestamp
|
||||
* @param value column value n
|
||||
* @param value column value
|
||||
*/
|
||||
public Put addColumn(byte[] family, byte[] qualifier, long ts, byte[] value) {
|
||||
if (ts < 0) {
|
||||
|
@ -222,7 +222,7 @@ public class Put extends Mutation implements HeapSize {
|
|||
* @param family family name
|
||||
* @param qualifier column qualifier
|
||||
* @param ts version timestamp
|
||||
* @param value column value n
|
||||
* @param value column value
|
||||
*/
|
||||
public Put addColumn(byte[] family, ByteBuffer qualifier, long ts, ByteBuffer value) {
|
||||
if (ts < 0) {
|
||||
|
@ -255,7 +255,8 @@ public class Put extends Mutation implements HeapSize {
|
|||
/**
|
||||
* Add the specified KeyValue to this Put operation. Operation assumes that the passed KeyValue is
|
||||
* immutable and its backing array will not be modified for the duration of this Put.
|
||||
* @param cell individual cell n * @throws java.io.IOException e
|
||||
* @param cell individual cell
|
||||
* @throws java.io.IOException e
|
||||
*/
|
||||
@Override
|
||||
public Put add(Cell cell) throws IOException {
|
||||
|
|
|
@ -47,9 +47,6 @@ public abstract class Query extends OperationWithAttributes {
|
|||
protected Map<byte[], TimeRange> colFamTimeRangeMap = Maps.newTreeMap(Bytes.BYTES_COMPARATOR);
|
||||
protected Boolean loadColumnFamiliesOnDemand = null;
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
public Filter getFilter() {
|
||||
return filter;
|
||||
}
|
||||
|
@ -67,7 +64,7 @@ public abstract class Query extends OperationWithAttributes {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the authorizations to be used by this Query n
|
||||
* Sets the authorizations to be used by this Query
|
||||
*/
|
||||
public Query setAuthorizations(Authorizations authorizations) {
|
||||
this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY,
|
||||
|
@ -133,7 +130,7 @@ public abstract class Query extends OperationWithAttributes {
|
|||
* Specify region replica id where Query will fetch data from. Use this together with
|
||||
* {@link #setConsistency(Consistency)} passing {@link Consistency#TIMELINE} to read data from a
|
||||
* specific replicaId. <br>
|
||||
* <b> Expert: </b>This is an advanced API exposed. Only use it if you know what you are doing n
|
||||
* <b> Expert: </b>This is an advanced API exposed. Only use it if you know what you are doing
|
||||
*/
|
||||
public Query setReplicaId(int Id) {
|
||||
this.targetReplicaId = Id;
|
||||
|
@ -209,7 +206,7 @@ public abstract class Query extends OperationWithAttributes {
|
|||
* Column Family time ranges take precedence over the global time range.
|
||||
* @param cf the column family for which you want to restrict
|
||||
* @param minStamp minimum timestamp value, inclusive
|
||||
* @param maxStamp maximum timestamp value, exclusive n
|
||||
* @param maxStamp maximum timestamp value, exclusive
|
||||
*/
|
||||
|
||||
public Query setColumnFamilyTimeRange(byte[] cf, long minStamp, long maxStamp) {
|
||||
|
|
|
@ -184,7 +184,7 @@ public abstract class RegionAdminServiceCallable<T> implements RetryingCallable<
|
|||
* Run RPC call.
|
||||
* @param rpcController PayloadCarryingRpcController is a mouthful but it at a minimum is a facade
|
||||
* on protobuf so we don't have to put protobuf everywhere; we can keep it
|
||||
* behind this class. n
|
||||
* behind this class.
|
||||
*/
|
||||
protected abstract T call(HBaseRpcController rpcController) throws Exception;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,8 @@ public class RegionInfoDisplay {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the start key for display. Optionally hide the real start key. nn * @return the startkey
|
||||
* Get the start key for display. Optionally hide the real start key.
|
||||
* @return the startkey
|
||||
*/
|
||||
public static byte[] getStartKeyForDisplay(RegionInfo ri, Configuration conf) {
|
||||
boolean displayKey = conf.getBoolean(DISPLAY_KEYS_KEY, true);
|
||||
|
@ -68,15 +69,16 @@ public class RegionInfoDisplay {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the region name for display. Optionally hide the start key. nn * @return region name as
|
||||
* String
|
||||
* Get the region name for display. Optionally hide the start key.
|
||||
* @return region name as String
|
||||
*/
|
||||
public static String getRegionNameAsStringForDisplay(RegionInfo ri, Configuration conf) {
|
||||
return Bytes.toStringBinary(getRegionNameForDisplay(ri, conf));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the region name for display. Optionally hide the start key. nn * @return region name bytes
|
||||
* Get the region name for display. Optionally hide the start key.
|
||||
* @return region name bytes
|
||||
*/
|
||||
public static byte[] getRegionNameForDisplay(RegionInfo ri, Configuration conf) {
|
||||
boolean displayKey = conf.getBoolean(DISPLAY_KEYS_KEY, true);
|
||||
|
|
|
@ -84,7 +84,7 @@ public class RegionReplicaUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Removes the non-default replicas from the passed regions collection n
|
||||
* Removes the non-default replicas from the passed regions collection
|
||||
*/
|
||||
public static void removeNonDefaultRegions(Collection<RegionInfo> regions) {
|
||||
Iterator<RegionInfo> iterator = regions.iterator();
|
||||
|
|
|
@ -132,7 +132,7 @@ public abstract class RegionServerCallable<T, S> implements RetryingCallable<T>
|
|||
* configured to make this rpc call, use getRpcController(). We are trying to contain
|
||||
* rpcController references so we don't pollute codebase with protobuf references; keep the
|
||||
* protobuf references contained and only present in a few classes rather than all about the code
|
||||
* base. n
|
||||
* base.
|
||||
*/
|
||||
protected abstract T rpcCall() throws Exception;
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ public class Result implements CellScannable, CellScanner {
|
|||
|
||||
/**
|
||||
* Method for retrieving the row key that corresponds to the row from which this Result was
|
||||
* created. n
|
||||
* created.
|
||||
*/
|
||||
public byte[] getRow() {
|
||||
if (this.row == null) {
|
||||
|
@ -227,8 +227,9 @@ public class Result implements CellScannable, CellScanner {
|
|||
* or Get) only requested 1 version the list will contain at most 1 entry. If the column did not
|
||||
* exist in the result set (either the column does not exist or the column was not selected in the
|
||||
* query) the list will be empty. Also see getColumnLatest which returns just a Cell
|
||||
* @param family the family n * @return a list of Cells for this column or empty list if the
|
||||
* column did not exist in the result set
|
||||
* @param family the family
|
||||
* @return a list of Cells for this column or empty list if the column did not exist in the result
|
||||
* set
|
||||
*/
|
||||
public List<Cell> getColumnCells(byte[] family, byte[] qualifier) {
|
||||
List<Cell> result = new ArrayList<>();
|
||||
|
@ -324,7 +325,7 @@ public class Result implements CellScannable, CellScanner {
|
|||
}
|
||||
|
||||
/**
|
||||
* The Cell for the most recent timestamp for a given column. nn *
|
||||
* The Cell for the most recent timestamp for a given column.
|
||||
* @return the Cell for the column, or null if no value exists in the row or none have been
|
||||
* selected in the query (Get/Scan)
|
||||
*/
|
||||
|
@ -677,8 +678,7 @@ public class Result implements CellScannable, CellScanner {
|
|||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
* */
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -800,7 +800,8 @@ public class Result implements CellScannable, CellScanner {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get total size of raw cells n * @return Total size.
|
||||
* Get total size of raw cells
|
||||
* @return Total size.
|
||||
*/
|
||||
public static long getTotalSizeOfCells(Result result) {
|
||||
long size = 0;
|
||||
|
@ -816,7 +817,7 @@ public class Result implements CellScannable, CellScanner {
|
|||
/**
|
||||
* Copy another Result into this one. Needed for the old Mapred framework
|
||||
* @throws UnsupportedOperationException if invoked on instance of EMPTY_RESULT (which is supposed
|
||||
* to be immutable). n
|
||||
* to be immutable).
|
||||
*/
|
||||
public void copyFrom(Result other) {
|
||||
checkReadonly();
|
||||
|
|
|
@ -46,20 +46,20 @@ abstract class RetryingCallerInterceptor {
|
|||
public abstract RetryingCallerInterceptorContext createEmptyContext();
|
||||
|
||||
/**
|
||||
* Call this function in case we caught a failure during retries. n * : The context object that we
|
||||
* obtained previously. n * : The exception that we caught in this particular try n
|
||||
* Call this function in case we caught a failure during retries. : The context object that we
|
||||
* obtained previously. : The exception that we caught in this particular try
|
||||
*/
|
||||
public abstract void handleFailure(RetryingCallerInterceptorContext context, Throwable t)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Call this function alongside the actual call done on the callable. nn
|
||||
* Call this function alongside the actual call done on the callable.
|
||||
*/
|
||||
public abstract void intercept(
|
||||
RetryingCallerInterceptorContext abstractRetryingCallerInterceptorContext) throws IOException;
|
||||
|
||||
/**
|
||||
* Call this function to update at the end of the retry. This is not necessary to happen. n
|
||||
* Call this function to update at the end of the retry. This is not necessary to happen.
|
||||
*/
|
||||
public abstract void updateFailureInfo(RetryingCallerInterceptorContext context);
|
||||
|
||||
|
|
|
@ -38,17 +38,17 @@ abstract class RetryingCallerInterceptorContext {
|
|||
|
||||
/**
|
||||
* This prepares the context object by populating it with information specific to the
|
||||
* implementation of the {@link RetryingCallerInterceptor} along with which this will be used. n *
|
||||
* : The {@link RetryingCallable} that contains the information about the call that is being made.
|
||||
* implementation of the {@link RetryingCallerInterceptor} along with which this will be used. :
|
||||
* The {@link RetryingCallable} that contains the information about the call that is being made.
|
||||
* @return A new {@link RetryingCallerInterceptorContext} object that can be used for use in the
|
||||
* current retrying call
|
||||
*/
|
||||
public abstract RetryingCallerInterceptorContext prepare(RetryingCallable<?> callable);
|
||||
|
||||
/**
|
||||
* Telescopic extension that takes which of the many retries we are currently in. n * : The
|
||||
* {@link RetryingCallable} that contains the information about the call that is being made. n * :
|
||||
* The retry number that we are currently in.
|
||||
* Telescopic extension that takes which of the many retries we are currently in. : The
|
||||
* {@link RetryingCallable} that contains the information about the call that is being made. : The
|
||||
* retry number that we are currently in.
|
||||
* @return A new context object that can be used for use in the current retrying call
|
||||
*/
|
||||
public abstract RetryingCallerInterceptorContext prepare(RetryingCallable<?> callable, int tries);
|
||||
|
|
|
@ -39,8 +39,8 @@ public class RowMutations implements Row {
|
|||
|
||||
/**
|
||||
* Create a {@link RowMutations} with the specified mutations.
|
||||
* @param mutations the mutations to send n * @throws IOException if any row in mutations is
|
||||
* different to another
|
||||
* @param mutations the mutations to send
|
||||
* @throws IOException if any row in mutations is different to another
|
||||
*/
|
||||
public static RowMutations of(List<? extends Mutation> mutations) throws IOException {
|
||||
if (CollectionUtils.isEmpty(mutations)) {
|
||||
|
|
|
@ -326,7 +326,7 @@ public class Scan extends Query {
|
|||
* Get all columns from the specified family.
|
||||
* <p>
|
||||
* Overrides previous calls to addColumn for this family.
|
||||
* @param family family name n
|
||||
* @param family family name
|
||||
*/
|
||||
public Scan addFamily(byte[] family) {
|
||||
familyMap.remove(family);
|
||||
|
@ -339,7 +339,7 @@ public class Scan extends Query {
|
|||
* <p>
|
||||
* Overrides previous calls to addFamily for this family.
|
||||
* @param family family name
|
||||
* @param qualifier column qualifier n
|
||||
* @param qualifier column qualifier
|
||||
*/
|
||||
public Scan addColumn(byte[] family, byte[] qualifier) {
|
||||
NavigableSet<byte[]> set = familyMap.get(family);
|
||||
|
@ -361,7 +361,7 @@ public class Scan extends Query {
|
|||
* @param minStamp minimum timestamp value, inclusive
|
||||
* @param maxStamp maximum timestamp value, exclusive
|
||||
* @see #setMaxVersions()
|
||||
* @see #setMaxVersions(int) n
|
||||
* @see #setMaxVersions(int)
|
||||
*/
|
||||
public Scan setTimeRange(long minStamp, long maxStamp) throws IOException {
|
||||
tr = new TimeRange(minStamp, maxStamp);
|
||||
|
@ -374,8 +374,9 @@ public class Scan extends Query {
|
|||
* number of versions beyond the defaut.
|
||||
* @param timestamp version timestamp
|
||||
* @see #setMaxVersions()
|
||||
* @see #setMaxVersions(int) n * @deprecated As of release 2.0.0, this will be removed in HBase
|
||||
* 3.0.0. Use {@link #setTimestamp(long)} instead
|
||||
* @see #setMaxVersions(int)
|
||||
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. Use
|
||||
* {@link #setTimestamp(long)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public Scan setTimeStamp(long timestamp) throws IOException {
|
||||
|
@ -388,7 +389,7 @@ public class Scan extends Query {
|
|||
* number of versions beyond the defaut.
|
||||
* @param timestamp version timestamp
|
||||
* @see #setMaxVersions()
|
||||
* @see #setMaxVersions(int) n
|
||||
* @see #setMaxVersions(int)
|
||||
*/
|
||||
public Scan setTimestamp(long timestamp) {
|
||||
try {
|
||||
|
@ -417,9 +418,9 @@ public class Scan extends Query {
|
|||
* {@link #setStartStopRowForPrefixScan(byte[])}.</strong> Doing so will make the scan result
|
||||
* unexpected or even undefined.
|
||||
* </p>
|
||||
* @param startRow row to start scanner at or after n * @throws IllegalArgumentException if
|
||||
* startRow does not meet criteria for a row key (when length exceeds
|
||||
* {@link HConstants#MAX_ROW_LENGTH})
|
||||
* @param startRow row to start scanner at or after
|
||||
* @throws IllegalArgumentException if startRow does not meet criteria for a row key (when length
|
||||
* exceeds {@link HConstants#MAX_ROW_LENGTH})
|
||||
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #withStartRow(byte[])}
|
||||
* instead. This method may change the inclusive of the stop row to keep compatible
|
||||
* with the old behavior.
|
||||
|
@ -441,9 +442,9 @@ public class Scan extends Query {
|
|||
* <p>
|
||||
* If the specified row does not exist, the Scanner will start from the next closest row after the
|
||||
* specified row.
|
||||
* @param startRow row to start scanner at or after n * @throws IllegalArgumentException if
|
||||
* startRow does not meet criteria for a row key (when length exceeds
|
||||
* {@link HConstants#MAX_ROW_LENGTH})
|
||||
* @param startRow row to start scanner at or after
|
||||
* @throws IllegalArgumentException if startRow does not meet criteria for a row key (when length
|
||||
* exceeds {@link HConstants#MAX_ROW_LENGTH})
|
||||
*/
|
||||
public Scan withStartRow(byte[] startRow) {
|
||||
return withStartRow(startRow, true);
|
||||
|
@ -460,9 +461,9 @@ public class Scan extends Query {
|
|||
* unexpected or even undefined.
|
||||
* </p>
|
||||
* @param startRow row to start scanner at or after
|
||||
* @param inclusive whether we should include the start row when scan n * @throws
|
||||
* IllegalArgumentException if startRow does not meet criteria for a row key
|
||||
* (when length exceeds {@link HConstants#MAX_ROW_LENGTH})
|
||||
* @param inclusive whether we should include the start row when scan
|
||||
* @throws IllegalArgumentException if startRow does not meet criteria for a row key (when length
|
||||
* exceeds {@link HConstants#MAX_ROW_LENGTH})
|
||||
*/
|
||||
public Scan withStartRow(byte[] startRow, boolean inclusive) {
|
||||
if (Bytes.len(startRow) > HConstants.MAX_ROW_LENGTH) {
|
||||
|
@ -483,9 +484,9 @@ public class Scan extends Query {
|
|||
* {@link #setStartStopRowForPrefixScan(byte[])}.</strong> Doing so will make the scan result
|
||||
* unexpected or even undefined.
|
||||
* </p>
|
||||
* @param stopRow row to end at (exclusive) n * @throws IllegalArgumentException if stopRow does
|
||||
* not meet criteria for a row key (when length exceeds
|
||||
* {@link HConstants#MAX_ROW_LENGTH})
|
||||
* @param stopRow row to end at (exclusive)
|
||||
* @throws IllegalArgumentException if stopRow does not meet criteria for a row key (when length
|
||||
* exceeds {@link HConstants#MAX_ROW_LENGTH})
|
||||
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #withStopRow(byte[])} instead.
|
||||
* This method may change the inclusive of the stop row to keep compatible with the
|
||||
* old behavior.
|
||||
|
@ -510,9 +511,9 @@ public class Scan extends Query {
|
|||
* <b>Note:</b> When doing a filter for a rowKey <u>Prefix</u> use
|
||||
* {@link #setRowPrefixFilter(byte[])}. The 'trailing 0' will not yield the desired result.
|
||||
* </p>
|
||||
* @param stopRow row to end at (exclusive) n * @throws IllegalArgumentException if stopRow does
|
||||
* not meet criteria for a row key (when length exceeds
|
||||
* {@link HConstants#MAX_ROW_LENGTH})
|
||||
* @param stopRow row to end at (exclusive)
|
||||
* @throws IllegalArgumentException if stopRow does not meet criteria for a row key (when length
|
||||
* exceeds {@link HConstants#MAX_ROW_LENGTH})
|
||||
*/
|
||||
public Scan withStopRow(byte[] stopRow) {
|
||||
return withStopRow(stopRow, false);
|
||||
|
@ -529,9 +530,9 @@ public class Scan extends Query {
|
|||
* unexpected or even undefined.
|
||||
* </p>
|
||||
* @param stopRow row to end at
|
||||
* @param inclusive whether we should include the stop row when scan n * @throws
|
||||
* IllegalArgumentException if stopRow does not meet criteria for a row key (when
|
||||
* length exceeds {@link HConstants#MAX_ROW_LENGTH})
|
||||
* @param inclusive whether we should include the stop row when scan
|
||||
* @throws IllegalArgumentException if stopRow does not meet criteria for a row key (when length
|
||||
* exceeds {@link HConstants#MAX_ROW_LENGTH})
|
||||
*/
|
||||
public Scan withStopRow(byte[] stopRow, boolean inclusive) {
|
||||
if (Bytes.len(stopRow) > HConstants.MAX_ROW_LENGTH) {
|
||||
|
@ -559,11 +560,10 @@ public class Scan extends Query {
|
|||
* <strong>This CANNOT be used in combination with withStartRow and/or withStopRow.</strong> Such
|
||||
* a combination will yield unexpected and even undefined results.
|
||||
* </p>
|
||||
* @param rowPrefix the prefix all rows must start with. (Set <i>null</i> to remove the filter.) n
|
||||
* * @deprecated since 2.5.0, will be removed in 4.0.0. The name of this method
|
||||
* is considered to be confusing as it does not use a {@link Filter} but uses
|
||||
* setting the startRow and stopRow instead. Use
|
||||
* {@link #setStartStopRowForPrefixScan(byte[])} instead.
|
||||
* @param rowPrefix the prefix all rows must start with. (Set <i>null</i> to remove the filter.)
|
||||
* @deprecated since 2.5.0, will be removed in 4.0.0. The name of this method is considered to be
|
||||
* confusing as it does not use a {@link Filter} but uses setting the startRow and
|
||||
* stopRow instead. Use {@link #setStartStopRowForPrefixScan(byte[])} instead.
|
||||
*/
|
||||
public Scan setRowPrefixFilter(byte[] rowPrefix) {
|
||||
return setStartStopRowForPrefixScan(rowPrefix);
|
||||
|
@ -585,7 +585,7 @@ public class Scan extends Query {
|
|||
* <strong>This CANNOT be used in combination with withStartRow and/or withStopRow.</strong> Such
|
||||
* a combination will yield unexpected and even undefined results.
|
||||
* </p>
|
||||
* @param rowPrefix the prefix all rows must start with. (Set <i>null</i> to remove the filter.) n
|
||||
* @param rowPrefix the prefix all rows must start with. (Set <i>null</i> to remove the filter.)
|
||||
*/
|
||||
public Scan setStartStopRowForPrefixScan(byte[] rowPrefix) {
|
||||
if (rowPrefix == null) {
|
||||
|
@ -599,9 +599,9 @@ public class Scan extends Query {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get all available versions. n * @deprecated since 2.0.0 and will be removed in 3.0.0. It is
|
||||
* easy to misunderstand with column family's max versions, so use {@link #readAllVersions()}
|
||||
* instead.
|
||||
* Get all available versions.
|
||||
* @deprecated since 2.0.0 and will be removed in 3.0.0. It is easy to misunderstand with column
|
||||
* family's max versions, so use {@link #readAllVersions()} instead.
|
||||
* @see #readAllVersions()
|
||||
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17125">HBASE-17125</a>
|
||||
*/
|
||||
|
@ -612,9 +612,9 @@ public class Scan extends Query {
|
|||
|
||||
/**
|
||||
* Get up to the specified number of versions of each column.
|
||||
* @param maxVersions maximum versions for each column n * @deprecated since 2.0.0 and will be
|
||||
* removed in 3.0.0. It is easy to misunderstand with column family's max
|
||||
* versions, so use {@link #readVersions(int)} instead.
|
||||
* @param maxVersions maximum versions for each column
|
||||
* @deprecated since 2.0.0 and will be removed in 3.0.0. It is easy to misunderstand with column
|
||||
* family's max versions, so use {@link #readVersions(int)} instead.
|
||||
* @see #readVersions(int)
|
||||
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17125">HBASE-17125</a>
|
||||
*/
|
||||
|
@ -624,7 +624,7 @@ public class Scan extends Query {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get all available versions. n
|
||||
* Get all available versions.
|
||||
*/
|
||||
public Scan readAllVersions() {
|
||||
this.maxVersions = Integer.MAX_VALUE;
|
||||
|
@ -633,7 +633,7 @@ public class Scan extends Query {
|
|||
|
||||
/**
|
||||
* Get up to the specified number of versions of each column.
|
||||
* @param versions specified number of versions for each column n
|
||||
* @param versions specified number of versions for each column
|
||||
*/
|
||||
public Scan readVersions(int versions) {
|
||||
this.maxVersions = versions;
|
||||
|
@ -711,7 +711,7 @@ public class Scan extends Query {
|
|||
|
||||
/**
|
||||
* Setting the familyMap
|
||||
* @param familyMap map of family to qualifier n
|
||||
* @param familyMap map of family to qualifier
|
||||
*/
|
||||
public Scan setFamilyMap(Map<byte[], NavigableSet<byte[]>> familyMap) {
|
||||
this.familyMap = familyMap;
|
||||
|
@ -719,7 +719,7 @@ public class Scan extends Query {
|
|||
}
|
||||
|
||||
/**
|
||||
* Getting the familyMap n
|
||||
* Getting the familyMap
|
||||
*/
|
||||
public Map<byte[], NavigableSet<byte[]>> getFamilyMap() {
|
||||
return this.familyMap;
|
||||
|
@ -794,16 +794,12 @@ public class Scan extends Query {
|
|||
return this.caching;
|
||||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
/** Returns TimeRange */
|
||||
public TimeRange getTimeRange() {
|
||||
return this.tr;
|
||||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
/** Returns RowFilter */
|
||||
@Override
|
||||
public Filter getFilter() {
|
||||
return filter;
|
||||
|
@ -838,7 +834,7 @@ public class Scan extends Query {
|
|||
* Set whether this scan is a reversed one
|
||||
* <p>
|
||||
* This is false by default which means forward(normal) scan.
|
||||
* @param reversed if true, scan will be backward order n
|
||||
* @param reversed if true, scan will be backward order
|
||||
*/
|
||||
public Scan setReversed(boolean reversed) {
|
||||
this.reversed = reversed;
|
||||
|
@ -857,7 +853,8 @@ public class Scan extends Query {
|
|||
* Setting whether the caller wants to see the partial results when server returns
|
||||
* less-than-expected cells. It is helpful while scanning a huge row to prevent OOM at client. By
|
||||
* default this value is false and the complete results will be assembled client side before being
|
||||
* delivered to the caller. nn * @see Result#mayHaveMoreCellsInRow()
|
||||
* delivered to the caller.
|
||||
* @see Result#mayHaveMoreCellsInRow()
|
||||
* @see #setBatch(int)
|
||||
*/
|
||||
public Scan setAllowPartialResults(final boolean allowPartialResults) {
|
||||
|
@ -881,7 +878,7 @@ public class Scan extends Query {
|
|||
|
||||
/**
|
||||
* Compile the table and column family (i.e. schema) information into a String. Useful for parsing
|
||||
* and aggregation by debugging, logging, and administration tools. n
|
||||
* and aggregation by debugging, logging, and administration tools.
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getFingerprint() {
|
||||
|
@ -903,7 +900,7 @@ public class Scan extends Query {
|
|||
* Compile the details beyond the scope of getFingerprint (row, columns, timestamps, etc.) into a
|
||||
* Map along with the fingerprinted information. Useful for debugging, logging, and administration
|
||||
* tools.
|
||||
* @param maxCols a limit on the number of columns output prior to truncation n
|
||||
* @param maxCols a limit on the number of columns output prior to truncation
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> toMap(int maxCols) {
|
||||
|
@ -1109,7 +1106,7 @@ public class Scan extends Query {
|
|||
* reaches this value.
|
||||
* <p>
|
||||
* This condition will be tested at last, after all other conditions such as stopRow, filter, etc.
|
||||
* @param limit the limit of rows for this scan n
|
||||
* @param limit the limit of rows for this scan
|
||||
*/
|
||||
public Scan setLimit(int limit) {
|
||||
this.limit = limit;
|
||||
|
@ -1118,7 +1115,7 @@ public class Scan extends Query {
|
|||
|
||||
/**
|
||||
* Call this when you only want to get one row. It will set {@code limit} to {@code 1}, and also
|
||||
* set {@code readType} to {@link ReadType#PREAD}. n
|
||||
* set {@code readType} to {@link ReadType#PREAD}.
|
||||
*/
|
||||
public Scan setOneRowLimit() {
|
||||
return setLimit(1).setReadType(ReadType.PREAD);
|
||||
|
@ -1140,7 +1137,7 @@ public class Scan extends Query {
|
|||
* Set the read type for this scan.
|
||||
* <p>
|
||||
* Notice that we may choose to use pread even if you specific {@link ReadType#STREAM} here. For
|
||||
* example, we will always use pread if this is a get scan. n
|
||||
* example, we will always use pread if this is a get scan.
|
||||
*/
|
||||
public Scan setReadType(ReadType readType) {
|
||||
this.readType = readType;
|
||||
|
|
|
@ -99,8 +99,8 @@ public class SecureBulkLoadClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Securely bulk load a list of HFiles using client protocol. nnnnnn * @return true if all are
|
||||
* loaded n
|
||||
* Securely bulk load a list of HFiles using client protocol.
|
||||
* @return true if all are loaded
|
||||
*/
|
||||
public boolean secureBulkLoadHFiles(final ClientService.BlockingInterface client,
|
||||
final List<Pair<byte[], String>> familyPaths, final byte[] regionName, boolean assignSeqNum,
|
||||
|
@ -110,8 +110,8 @@ public class SecureBulkLoadClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Securely bulk load a list of HFiles using client protocol. nnnnnnn * @return true if all are
|
||||
* loaded n
|
||||
* Securely bulk load a list of HFiles using client protocol.
|
||||
* @return true if all are loaded
|
||||
*/
|
||||
public boolean secureBulkLoadHFiles(final ClientService.BlockingInterface client,
|
||||
final List<Pair<byte[], String>> familyPaths, final byte[] regionName, boolean assignSeqNum,
|
||||
|
|
|
@ -147,7 +147,8 @@ public interface Table extends Closeable {
|
|||
* @param results Empty Object[], same size as actions. Provides access to partial results, in
|
||||
* case an exception is thrown. A null in the result array means that the call for
|
||||
* that action failed, even after retries. The order of the objects in the results
|
||||
* array corresponds to the order of actions in the request list. n * @since 0.90.0
|
||||
* array corresponds to the order of actions in the request list.
|
||||
* @since 0.90.0
|
||||
*/
|
||||
default void batch(final List<? extends Row> actions, final Object[] results)
|
||||
throws IOException, InterruptedException {
|
||||
|
@ -358,8 +359,8 @@ public interface Table extends Closeable {
|
|||
* @apiNote In 3.0.0 version, the input list {@code deletes} will no longer be modified. Also,
|
||||
* {@link #put(List)} runs pre-flight validations on the input list on client. Currently
|
||||
* {@link #delete(List)} doesn't run validations on the client, there is no need
|
||||
* currently, but this may change in the future. An * {@link IllegalArgumentException}
|
||||
* will be thrown in this case.
|
||||
* currently, but this may change in the future. An {@link IllegalArgumentException} will
|
||||
* be thrown in this case.
|
||||
*/
|
||||
default void delete(List<Delete> deletes) throws IOException {
|
||||
throw new NotImplementedException("Add an implementation!");
|
||||
|
@ -780,12 +781,12 @@ public interface Table extends Closeable {
|
|||
* Creates an instance of the given {@link com.google.protobuf.Service} subclass for each table
|
||||
* region spanning the range from the {@code startKey} row to {@code endKey} row (inclusive), all
|
||||
* the invocations to the same region server will be batched into one call. The coprocessor
|
||||
* service is invoked according to the service instance, method name and parameters. n * the
|
||||
* descriptor for the protobuf service method to call. n * the method call parameters n * start
|
||||
* region selection with region containing this row. If {@code null}, the selection will start
|
||||
* with the first table region. n * select regions up to and including the region containing this
|
||||
* row. If {@code null}, selection will continue through the last table region. n * the proto type
|
||||
* of the response of the method in Service.
|
||||
* service is invoked according to the service instance, method name and parameters. the
|
||||
* descriptor for the protobuf service method to call. the method call parameters start region
|
||||
* selection with region containing this row. If {@code null}, the selection will start with the
|
||||
* first table region. select regions up to and including the region containing this row. If
|
||||
* {@code null}, selection will continue through the last table region. the proto type of the
|
||||
* response of the method in Service.
|
||||
* @param <R> the response type for the coprocessor Service method
|
||||
* @return a map of result values keyed by region name
|
||||
*/
|
||||
|
|
|
@ -940,7 +940,7 @@ public class TableDescriptorBuilder {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the name of the table n
|
||||
* Get the name of the table
|
||||
*/
|
||||
@Override
|
||||
public TableName getTableName() {
|
||||
|
@ -1353,7 +1353,8 @@ public class TableDescriptorBuilder {
|
|||
* org.apache.hadoop.hbase.coprocessor.RegionObserver or Endpoint. It won't check if the class
|
||||
* can be loaded or not. Whether a coprocessor is loadable or not will be determined when a
|
||||
* region is opened.
|
||||
* @param className Full class name. n * @return the modifyable TD
|
||||
* @param className Full class name.
|
||||
* @return the modifyable TD
|
||||
*/
|
||||
public ModifyableTableDescriptor setCoprocessor(String className) throws IOException {
|
||||
return setCoprocessor(CoprocessorDescriptorBuilder.newBuilder(className)
|
||||
|
@ -1401,8 +1402,8 @@ public class TableDescriptorBuilder {
|
|||
* org.apache.hadoop.hbase.coprocessor.RegionObserver or Endpoint. It won't check if the class
|
||||
* can be loaded or not. Whether a coprocessor is loadable or not will be determined when a
|
||||
* region is opened.
|
||||
* @param specStr The Coprocessor specification all in in one String n * @return the modifyable
|
||||
* TD
|
||||
* @param specStr The Coprocessor specification all in in one String
|
||||
* @return the modifyable TD
|
||||
* @deprecated used by HTableDescriptor and admin.rb. As of release 2.0.0, this will be removed
|
||||
* in HBase 3.0.0.
|
||||
*/
|
||||
|
@ -1550,8 +1551,8 @@ public class TableDescriptorBuilder {
|
|||
/**
|
||||
* Parse the serialized representation of a {@link ModifyableTableDescriptor}
|
||||
* @param bytes A pb serialized {@link ModifyableTableDescriptor} instance with pb magic prefix
|
||||
* @return An instance of {@link ModifyableTableDescriptor} made from <code>bytes</code> n
|
||||
* * @see #toByteArray()
|
||||
* @return An instance of {@link ModifyableTableDescriptor} made from <code>bytes</code>
|
||||
* @see #toByteArray()
|
||||
*/
|
||||
private static TableDescriptor parseFrom(final byte[] bytes) throws DeserializationException {
|
||||
if (!ProtobufUtil.isPBMagicPrefix(bytes)) {
|
||||
|
|
|
@ -42,7 +42,7 @@ public class TableState {
|
|||
|
||||
/**
|
||||
* Covert from PB version of State
|
||||
* @param state convert from n
|
||||
* @param state convert from
|
||||
*/
|
||||
public static State convert(HBaseProtos.TableState.State state) {
|
||||
State ret;
|
||||
|
@ -66,7 +66,7 @@ public class TableState {
|
|||
}
|
||||
|
||||
/**
|
||||
* Covert to PB version of State n
|
||||
* Covert to PB version of State
|
||||
*/
|
||||
public HBaseProtos.TableState.State convert() {
|
||||
HBaseProtos.TableState.State state;
|
||||
|
@ -140,7 +140,7 @@ public class TableState {
|
|||
}
|
||||
|
||||
/**
|
||||
* Table name for state n
|
||||
* Table name for state
|
||||
*/
|
||||
public TableName getTableName() {
|
||||
return tableName;
|
||||
|
@ -168,7 +168,7 @@ public class TableState {
|
|||
}
|
||||
|
||||
/**
|
||||
* Covert to PB version of TableState n
|
||||
* Covert to PB version of TableState
|
||||
*/
|
||||
public HBaseProtos.TableState convert() {
|
||||
return HBaseProtos.TableState.newBuilder().setState(this.state.convert()).build();
|
||||
|
@ -177,7 +177,7 @@ public class TableState {
|
|||
/**
|
||||
* Covert from PB version of TableState
|
||||
* @param tableName table this state of
|
||||
* @param tableState convert from n
|
||||
* @param tableState convert from
|
||||
*/
|
||||
public static TableState convert(TableName tableName, HBaseProtos.TableState tableState) {
|
||||
TableState.State state = State.convert(tableState.getState());
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||
@Deprecated
|
||||
class UnmodifyableHRegionInfo extends HRegionInfo {
|
||||
/*
|
||||
* Creates an unmodifyable copy of an HRegionInfo n
|
||||
* Creates an unmodifyable copy of an HRegionInfo
|
||||
*/
|
||||
UnmodifyableHRegionInfo(HRegionInfo info) {
|
||||
super(info);
|
||||
|
|
|
@ -33,7 +33,7 @@ public class ServerStatistics {
|
|||
|
||||
/**
|
||||
* Good enough attempt. Last writer wins. It doesn't really matter which one gets to update, as
|
||||
* something gets set nn
|
||||
* something gets set
|
||||
*/
|
||||
public void update(byte[] region, RegionLoadStats currentStats) {
|
||||
RegionStatistics regionStat = this.stats.get(region);
|
||||
|
|
|
@ -35,8 +35,8 @@ public class ServerSideScanMetrics {
|
|||
private final Map<String, AtomicLong> counters = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Create a new counter with the specified name n * @return {@link AtomicLong} instance for the
|
||||
* counter with counterName
|
||||
* Create a new counter with the specified name
|
||||
* @return {@link AtomicLong} instance for the counter with counterName
|
||||
*/
|
||||
protected AtomicLong createCounter(String counterName) {
|
||||
AtomicLong c = new AtomicLong(0);
|
||||
|
@ -75,9 +75,6 @@ public class ServerSideScanMetrics {
|
|||
*/
|
||||
public final AtomicLong countOfRowsScanned = createCounter(COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME);
|
||||
|
||||
/**
|
||||
* nn
|
||||
*/
|
||||
public void setCounter(String counterName, long value) {
|
||||
AtomicLong c = this.counters.get(counterName);
|
||||
if (c != null) {
|
||||
|
@ -85,23 +82,16 @@ public class ServerSideScanMetrics {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* n * @return true if a counter exists with the counterName
|
||||
*/
|
||||
/** Returns true if a counter exists with the counterName */
|
||||
public boolean hasCounter(String counterName) {
|
||||
return this.counters.containsKey(counterName);
|
||||
}
|
||||
|
||||
/**
|
||||
* n * @return {@link AtomicLong} instance for this counter name, null if counter does not exist.
|
||||
*/
|
||||
/** Returns {@link AtomicLong} instance for this counter name, null if counter does not exist. */
|
||||
public AtomicLong getCounter(String counterName) {
|
||||
return this.counters.get(counterName);
|
||||
}
|
||||
|
||||
/**
|
||||
* nn
|
||||
*/
|
||||
public void addToCounter(String counterName, long delta) {
|
||||
AtomicLong c = this.counters.get(counterName);
|
||||
if (c != null) {
|
||||
|
|
|
@ -175,7 +175,8 @@ public class ReplicationAdmin implements Closeable {
|
|||
|
||||
/**
|
||||
* Get the number of slave clusters the local cluster has.
|
||||
* @return number of slave clusters n * @deprecated
|
||||
* @return number of slave clusters
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public int getPeersCount() throws IOException {
|
||||
|
@ -219,8 +220,9 @@ public class ReplicationAdmin implements Closeable {
|
|||
/**
|
||||
* Append the replicable table-cf config of the specified peer
|
||||
* @param id a short that identifies the cluster
|
||||
* @param tableCfs table-cfs config str nn * @deprecated as release of 2.0.0, and it will be
|
||||
* removed in 3.0.0, use {@link #appendPeerTableCFs(String, Map)} instead.
|
||||
* @param tableCfs table-cfs config str
|
||||
* @deprecated as release of 2.0.0, and it will be removed in 3.0.0, use
|
||||
* {@link #appendPeerTableCFs(String, Map)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void appendPeerTableCFs(String id, String tableCfs)
|
||||
|
@ -231,7 +233,7 @@ public class ReplicationAdmin implements Closeable {
|
|||
/**
|
||||
* Append the replicable table-cf config of the specified peer
|
||||
* @param id a short that identifies the cluster
|
||||
* @param tableCfs A map from tableName to column family names nn
|
||||
* @param tableCfs A map from tableName to column family names
|
||||
*/
|
||||
@Deprecated
|
||||
public void appendPeerTableCFs(String id, Map<TableName, ? extends Collection<String>> tableCfs)
|
||||
|
@ -242,8 +244,9 @@ public class ReplicationAdmin implements Closeable {
|
|||
/**
|
||||
* Remove some table-cfs from table-cfs config of the specified peer
|
||||
* @param id a short name that identifies the cluster
|
||||
* @param tableCf table-cfs config str nn * @deprecated as release of 2.0.0, and it will be
|
||||
* removed in 3.0.0, use {@link #removePeerTableCFs(String, Map)} instead.
|
||||
* @param tableCf table-cfs config str
|
||||
* @deprecated as release of 2.0.0, and it will be removed in 3.0.0, use
|
||||
* {@link #removePeerTableCFs(String, Map)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void removePeerTableCFs(String id, String tableCf)
|
||||
|
@ -254,7 +257,7 @@ public class ReplicationAdmin implements Closeable {
|
|||
/**
|
||||
* Remove some table-cfs from config of the specified peer
|
||||
* @param id a short name that identifies the cluster
|
||||
* @param tableCfs A map from tableName to column family names nn
|
||||
* @param tableCfs A map from tableName to column family names
|
||||
*/
|
||||
@Deprecated
|
||||
public void removePeerTableCFs(String id, Map<TableName, ? extends Collection<String>> tableCfs)
|
||||
|
|
|
@ -51,36 +51,27 @@ import org.apache.yetus.audience.InterfaceStability;
|
|||
public abstract class ColumnInterpreter<T, S, P extends Message, Q extends Message,
|
||||
R extends Message> {
|
||||
|
||||
/**
|
||||
* nnn * @return value of type T n
|
||||
*/
|
||||
/** Returns value of type T */
|
||||
public abstract T getValue(byte[] colFamily, byte[] colQualifier, Cell c) throws IOException;
|
||||
|
||||
/**
|
||||
* nn * @return sum or non null value among (if either of them is null); otherwise returns a null.
|
||||
*/
|
||||
/** Returns sum or non null value among (if either of them is null); otherwise returns a null. */
|
||||
public abstract S add(S l1, S l2);
|
||||
|
||||
/**
|
||||
* returns the maximum value for this type T n
|
||||
* returns the maximum value for this type T
|
||||
*/
|
||||
|
||||
public abstract T getMaxValue();
|
||||
|
||||
public abstract T getMinValue();
|
||||
|
||||
/**
|
||||
* nnn
|
||||
*/
|
||||
/** Returns multiplication */
|
||||
public abstract S multiply(S o1, S o2);
|
||||
|
||||
/**
|
||||
* nn
|
||||
*/
|
||||
/** Returns increment */
|
||||
public abstract S increment(S o);
|
||||
|
||||
/**
|
||||
* provides casting opportunity between the data types. nn
|
||||
* provides casting opportunity between the data types.
|
||||
*/
|
||||
public abstract S castToReturnType(T o);
|
||||
|
||||
|
@ -95,7 +86,7 @@ public abstract class ColumnInterpreter<T, S, P extends Message, Q extends Messa
|
|||
|
||||
/**
|
||||
* used for computing average of <S> data values. Not providing the divide method that takes
|
||||
* two <S> values as it is not needed as of now. nnn
|
||||
* two <S> values as it is not needed as of now.
|
||||
*/
|
||||
public abstract double divideForAvg(S o, Long l);
|
||||
|
||||
|
@ -111,37 +102,37 @@ public abstract class ColumnInterpreter<T, S, P extends Message, Q extends Messa
|
|||
|
||||
/**
|
||||
* This method should initialize any field(s) of the ColumnInterpreter with a parsing of the
|
||||
* passed message bytes (used on the server side). n
|
||||
* passed message bytes (used on the server side).
|
||||
*/
|
||||
public abstract void initialize(P msg);
|
||||
|
||||
/**
|
||||
* This method gets the PB message corresponding to the cell type n * @return the PB message for
|
||||
* the cell-type instance
|
||||
* This method gets the PB message corresponding to the cell type
|
||||
* @return the PB message for the cell-type instance
|
||||
*/
|
||||
public abstract Q getProtoForCellType(T t);
|
||||
|
||||
/**
|
||||
* This method gets the PB message corresponding to the cell type n * @return the cell-type
|
||||
* instance from the PB message
|
||||
* This method gets the PB message corresponding to the cell type
|
||||
* @return the cell-type instance from the PB message
|
||||
*/
|
||||
public abstract T getCellValueFromProto(Q q);
|
||||
|
||||
/**
|
||||
* This method gets the PB message corresponding to the promoted type n * @return the PB message
|
||||
* for the promoted-type instance
|
||||
* This method gets the PB message corresponding to the promoted type
|
||||
* @return the PB message for the promoted-type instance
|
||||
*/
|
||||
public abstract R getProtoForPromotedType(S s);
|
||||
|
||||
/**
|
||||
* This method gets the promoted type from the proto message n * @return the promoted-type
|
||||
* instance from the PB message
|
||||
* This method gets the promoted type from the proto message
|
||||
* @return the promoted-type instance from the PB message
|
||||
*/
|
||||
public abstract S getPromotedValueFromProto(R r);
|
||||
|
||||
/**
|
||||
* The response message comes as type S. This will convert/cast it to T. In some sense, performs
|
||||
* the opposite of {@link #castToReturnType(Object)} nn
|
||||
* the opposite of {@link #castToReturnType(Object)}
|
||||
*/
|
||||
public abstract T castToCellType(S response);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class CoprocessorException extends DoNotRetryIOException {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructor with a Class object and exception message. nn
|
||||
* Constructor with a Class object and exception message.
|
||||
*/
|
||||
public CoprocessorException(Class<?> clazz, String s) {
|
||||
super("Coprocessor [" + clazz.getName() + "]: " + s);
|
||||
|
|
|
@ -150,7 +150,7 @@ public final class ClientExceptionsUtil {
|
|||
/**
|
||||
* Translates exception for preemptive fast fail checks.
|
||||
* @param t exception to check
|
||||
* @return translated exception n
|
||||
* @return translated exception
|
||||
*/
|
||||
public static Throwable translatePFFE(Throwable t) throws IOException {
|
||||
if (t instanceof NoSuchMethodError) {
|
||||
|
|
|
@ -35,15 +35,13 @@ public class FailedSanityCheckException extends org.apache.hadoop.hbase.DoNotRet
|
|||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
* */
|
||||
public FailedSanityCheckException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* nn
|
||||
*/
|
||||
* */
|
||||
public FailedSanityCheckException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
|
|
@ -68,9 +68,7 @@ public class ColumnValueFilter extends FilterBase {
|
|||
this.comparator = Preconditions.checkNotNull(comparator, "Comparator should not be null");
|
||||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
/** Returns operator */
|
||||
public CompareOperator getCompareOperator() {
|
||||
return op;
|
||||
}
|
||||
|
|
|
@ -101,8 +101,7 @@ public abstract class CompareFilter extends FilterBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* n * @deprecated since 2.0.0. Will be removed in 3.0.0. Use {@link #getCompareOperator()}
|
||||
* instead.
|
||||
* @deprecated since 2.0.0. Will be removed in 3.0.0. Use {@link #getCompareOperator()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public CompareOp getOperator() {
|
||||
|
|
|
@ -252,8 +252,9 @@ public abstract class Filter {
|
|||
|
||||
/**
|
||||
* Concrete implementers can signal a failure condition in their code by throwing an
|
||||
* {@link IOException}. n * @return true if and only if the fields of the filter that are
|
||||
* serialized are equal to the corresponding fields in other. Used for testing.
|
||||
* {@link IOException}.
|
||||
* @return true if and only if the fields of the filter that are serialized are equal to the
|
||||
* corresponding fields in other. Used for testing.
|
||||
*/
|
||||
abstract boolean areSerializedFieldsEqual(Filter other);
|
||||
|
||||
|
|
|
@ -148,9 +148,9 @@ public abstract class FilterBase extends Filter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Default implementation so that writers of custom filters aren't forced to implement. n
|
||||
* * @return true if and only if the fields of the filter that are serialized are equal to the
|
||||
* corresponding fields in other. Used for testing.
|
||||
* Default implementation so that writers of custom filters aren't forced to implement.
|
||||
* @return true if and only if the fields of the filter that are serialized are equal to the
|
||||
* corresponding fields in other. Used for testing.
|
||||
*/
|
||||
@Override
|
||||
boolean areSerializedFieldsEqual(Filter other) {
|
||||
|
|
|
@ -84,7 +84,7 @@ final public class FilterList extends FilterBase {
|
|||
|
||||
/**
|
||||
* Constructor that takes a var arg number of {@link Filter}s. The default operator MUST_PASS_ALL
|
||||
* is assumed. n
|
||||
* is assumed.
|
||||
*/
|
||||
public FilterList(final Filter... filters) {
|
||||
this(Operator.MUST_PASS_ALL, Arrays.asList(filters));
|
||||
|
@ -108,14 +108,14 @@ final public class FilterList extends FilterBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the operator. n
|
||||
* Get the operator.
|
||||
*/
|
||||
public Operator getOperator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the filters. n
|
||||
* Get the filters.
|
||||
*/
|
||||
public List<Filter> getFilters() {
|
||||
return filterListBase.getFilters();
|
||||
|
|
|
@ -92,7 +92,7 @@ public abstract class FilterListBase extends FilterBase {
|
|||
* the current child, we should set the traverse result (transformed cell) of previous node(s) as
|
||||
* the initial value. (HBASE-18879).
|
||||
* @param c The cell in question.
|
||||
* @return the transformed cell. n
|
||||
* @return the transformed cell.
|
||||
*/
|
||||
@Override
|
||||
public Cell transformCell(Cell c) throws IOException {
|
||||
|
|
|
@ -138,7 +138,8 @@ public class FuzzyRowFilter extends FilterBase {
|
|||
|
||||
/**
|
||||
* We need to preprocess mask array, as since we treat 2's as unfixed positions and -1 (0xff) as
|
||||
* fixed positions n * @return mask array
|
||||
* fixed positions
|
||||
* @return mask array
|
||||
*/
|
||||
private byte[] preprocessMask(byte[] mask) {
|
||||
if (!UNSAFE_UNALIGNED) {
|
||||
|
@ -630,8 +631,8 @@ public class FuzzyRowFilter extends FilterBase {
|
|||
|
||||
/**
|
||||
* For forward scanner, next cell hint should not contain any trailing zeroes unless they are part
|
||||
* of fuzzyKeyMeta hint = '\x01\x01\x01\x00\x00' will skip valid row '\x01\x01\x01' nn * @param
|
||||
* toInc - position of incremented byte
|
||||
* of fuzzyKeyMeta hint = '\x01\x01\x01\x00\x00' will skip valid row '\x01\x01\x01'
|
||||
* @param toInc - position of incremented byte
|
||||
* @return trimmed version of result
|
||||
*/
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class RandomRowFilter extends FilterBase {
|
|||
protected boolean filterOutRow;
|
||||
|
||||
/**
|
||||
* Create a new filter with a specified chance for a row to be included. n
|
||||
* Create a new filter with a specified chance for a row to be included.
|
||||
*/
|
||||
public RandomRowFilter(float chance) {
|
||||
this.chance = chance;
|
||||
|
@ -50,7 +50,7 @@ public class RandomRowFilter extends FilterBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the chance that a row is included. n
|
||||
* Set the chance that a row is included.
|
||||
*/
|
||||
public void setChance(float chance) {
|
||||
this.chance = chance;
|
||||
|
|
|
@ -109,9 +109,9 @@ public class SingleColumnValueExcludeFilter extends SingleColumnValueFilter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructor for protobuf deserialization only. nnnnnn * @deprecated Since 2.0.0. Will be
|
||||
* removed in 3.0.0. Use
|
||||
* {@link #SingleColumnValueExcludeFilter(byte[], byte[], CompareOperator, ByteArrayComparable, boolean, boolean)}
|
||||
* Constructor for protobuf deserialization only.
|
||||
* @deprecated Since 2.0.0. Will be removed in 3.0.0. Use
|
||||
* {@link #SingleColumnValueExcludeFilter(byte[], byte[], CompareOperator, ByteArrayComparable, boolean, boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
protected SingleColumnValueExcludeFilter(final byte[] family, final byte[] qualifier,
|
||||
|
@ -122,7 +122,7 @@ public class SingleColumnValueExcludeFilter extends SingleColumnValueFilter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructor for protobuf deserialization only. nnnnnn
|
||||
* Constructor for protobuf deserialization only.
|
||||
*/
|
||||
protected SingleColumnValueExcludeFilter(final byte[] family, final byte[] qualifier,
|
||||
final CompareOperator op, ByteArrayComparable comparator, final boolean filterIfMissing,
|
||||
|
|
|
@ -155,10 +155,10 @@ public class SingleColumnValueFilter extends FilterBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructor for protobuf deserialization only. nnnnnn * @deprecated Since 2.0.0. Will be
|
||||
* removed in 3.0.0. Use
|
||||
* {@link #SingleColumnValueFilter(byte[], byte[], CompareOperator, ByteArrayComparable, boolean, boolean)}
|
||||
* instead.
|
||||
* Constructor for protobuf deserialization only.
|
||||
* @deprecated Since 2.0.0. Will be removed in 3.0.0. Use
|
||||
* {@link #SingleColumnValueFilter(byte[], byte[], CompareOperator, ByteArrayComparable, boolean, boolean)}
|
||||
* instead.
|
||||
*/
|
||||
@Deprecated
|
||||
protected SingleColumnValueFilter(final byte[] family, final byte[] qualifier,
|
||||
|
@ -169,7 +169,7 @@ public class SingleColumnValueFilter extends FilterBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructor for protobuf deserialization only. nnnnnn
|
||||
* Constructor for protobuf deserialization only.
|
||||
*/
|
||||
protected SingleColumnValueFilter(final byte[] family, final byte[] qualifier,
|
||||
final CompareOperator op, org.apache.hadoop.hbase.filter.ByteArrayComparable comparator,
|
||||
|
@ -180,8 +180,7 @@ public class SingleColumnValueFilter extends FilterBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* n * @deprecated since 2.0.0. Will be removed in 3.0.0. Use {@link #getCompareOperator()}
|
||||
* instead.
|
||||
* @deprecated since 2.0.0. Will be removed in 3.0.0. Use {@link #getCompareOperator()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public CompareOp getOperator() {
|
||||
|
|
|
@ -54,7 +54,7 @@ public class TimestampsFilter extends FilterBase {
|
|||
long minTimestamp = Long.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* Constructor for filter that retains only the specified timestamps in the list. n
|
||||
* Constructor for filter that retains only the specified timestamps in the list.
|
||||
*/
|
||||
public TimestampsFilter(List<Long> timestamps) {
|
||||
this(timestamps, false);
|
||||
|
|
|
@ -104,9 +104,10 @@ class CellBlockBuilder {
|
|||
|
||||
/**
|
||||
* Puts CellScanner Cells into a cell block using passed in <code>codec</code> and/or
|
||||
* <code>compressor</code>. nnn * @return Null or byte buffer filled with a cellblock filled with
|
||||
* passed-in Cells encoded using passed in <code>codec</code> and/or <code>compressor</code>; the
|
||||
* returned buffer has been flipped and is ready for reading. Use limit to find total size. n
|
||||
* <code>compressor</code>.
|
||||
* @return Null or byte buffer filled with a cellblock filled with passed-in Cells encoded using
|
||||
* passed in <code>codec</code> and/or <code>compressor</code>; the returned buffer has
|
||||
* been flipped and is ready for reading. Use limit to find total size.
|
||||
*/
|
||||
public ByteBuffer buildCellBlock(final Codec codec, final CompressionCodec compressor,
|
||||
final CellScanner cellScanner) throws IOException {
|
||||
|
|
|
@ -259,7 +259,7 @@ public final class ProtobufUtil {
|
|||
* Like {@link #getRemoteException(ServiceException)} but more generic, able to handle more than
|
||||
* just {@link ServiceException}. Prefer this method to
|
||||
* {@link #getRemoteException(ServiceException)} because trying to contain direct protobuf
|
||||
* references. n
|
||||
* references.
|
||||
*/
|
||||
public static IOException handleRemoteException(Exception e) {
|
||||
return makeIOExceptionOfException(e);
|
||||
|
@ -363,7 +363,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a protocol buffer Get to a client Get
|
||||
* @param proto the protocol buffer Get to convert
|
||||
* @return the converted client Get n
|
||||
* @return the converted client Get
|
||||
*/
|
||||
public static Get toGet(final ClientProtos.Get proto) throws IOException {
|
||||
if (proto == null) return null;
|
||||
|
@ -448,7 +448,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a protocol buffer Mutate to a Put.
|
||||
* @param proto The protocol buffer MutationProto to convert
|
||||
* @return A client Put. n
|
||||
* @return A client Put.
|
||||
*/
|
||||
public static Put toPut(final MutationProto proto) throws IOException {
|
||||
return toPut(proto, null);
|
||||
|
@ -458,7 +458,7 @@ public final class ProtobufUtil {
|
|||
* Convert a protocol buffer Mutate to a Put.
|
||||
* @param proto The protocol buffer MutationProto to convert
|
||||
* @param cellScanner If non-null, the Cell data that goes with this proto.
|
||||
* @return A client Put. n
|
||||
* @return A client Put.
|
||||
*/
|
||||
public static Put toPut(final MutationProto proto, final CellScanner cellScanner)
|
||||
throws IOException {
|
||||
|
@ -542,7 +542,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a protocol buffer Mutate to a Delete
|
||||
* @param proto the protocol buffer Mutate to convert
|
||||
* @return the converted client Delete n
|
||||
* @return the converted client Delete
|
||||
*/
|
||||
public static Delete toDelete(final MutationProto proto) throws IOException {
|
||||
return toDelete(proto, null);
|
||||
|
@ -552,7 +552,7 @@ public final class ProtobufUtil {
|
|||
* Convert a protocol buffer Mutate to a Delete
|
||||
* @param proto the protocol buffer Mutate to convert
|
||||
* @param cellScanner if non-null, the data that goes with this delete.
|
||||
* @return the converted client Delete n
|
||||
* @return the converted client Delete
|
||||
*/
|
||||
public static Delete toDelete(final MutationProto proto, final CellScanner cellScanner)
|
||||
throws IOException {
|
||||
|
@ -716,7 +716,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a MutateRequest to Mutation
|
||||
* @param proto the protocol buffer Mutate to convert
|
||||
* @return the converted Mutation n
|
||||
* @return the converted Mutation
|
||||
*/
|
||||
public static Mutation toMutation(final MutationProto proto) throws IOException {
|
||||
MutationType type = proto.getMutateType();
|
||||
|
@ -737,7 +737,8 @@ public final class ProtobufUtil {
|
|||
|
||||
/**
|
||||
* Convert a protocol buffer Mutate to a Get.
|
||||
* @param proto the protocol buffer Mutate to convert. n * @return the converted client get. n
|
||||
* @param proto the protocol buffer Mutate to convert.
|
||||
* @return the converted client get.
|
||||
*/
|
||||
public static Get toGet(final MutationProto proto, final CellScanner cellScanner)
|
||||
throws IOException {
|
||||
|
@ -817,7 +818,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a client Scan to a protocol buffer Scan
|
||||
* @param scan the client Scan to convert
|
||||
* @return the converted protocol buffer Scan n
|
||||
* @return the converted protocol buffer Scan
|
||||
*/
|
||||
public static ClientProtos.Scan toScan(final Scan scan) throws IOException {
|
||||
ClientProtos.Scan.Builder scanBuilder = ClientProtos.Scan.newBuilder();
|
||||
|
@ -910,7 +911,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a protocol buffer Scan to a client Scan
|
||||
* @param proto the protocol buffer Scan to convert
|
||||
* @return the converted client Scan n
|
||||
* @return the converted client Scan
|
||||
*/
|
||||
public static Scan toScan(final ClientProtos.Scan proto) throws IOException {
|
||||
byte[] startRow = HConstants.EMPTY_START_ROW;
|
||||
|
@ -1011,7 +1012,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Create a protocol buffer Get based on a client Get.
|
||||
* @param get the client Get
|
||||
* @return a protocol buffer Get n
|
||||
* @return a protocol buffer Get
|
||||
*/
|
||||
public static ClientProtos.Get toGet(final Get get) throws IOException {
|
||||
ClientProtos.Get.Builder builder = ClientProtos.Get.newBuilder();
|
||||
|
@ -1076,7 +1077,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer Mutate based on a client Mutation nn * @return a protobuf'd Mutation n
|
||||
* Create a protocol buffer Mutate based on a client Mutation
|
||||
* @return a protobuf'd Mutation
|
||||
*/
|
||||
public static MutationProto toMutation(final MutationType type, final Mutation mutation,
|
||||
final long nonce) throws IOException {
|
||||
|
@ -1125,8 +1127,8 @@ public final class ProtobufUtil {
|
|||
|
||||
/**
|
||||
* Create a protocol buffer MutationProto based on a client Mutation. Does NOT include data.
|
||||
* Understanding is that the Cell will be transported other than via protobuf. nnn * @return a
|
||||
* protobuf'd Mutation n
|
||||
* Understanding is that the Cell will be transported other than via protobuf.
|
||||
* @return a protobuf'd Mutation
|
||||
*/
|
||||
public static MutationProto toMutationNoData(final MutationType type, final Mutation mutation,
|
||||
final MutationProto.Builder builder) throws IOException {
|
||||
|
@ -1135,8 +1137,8 @@ public final class ProtobufUtil {
|
|||
|
||||
/**
|
||||
* Create a protocol buffer MutationProto based on a client Mutation. Does NOT include data.
|
||||
* Understanding is that the Cell will be transported other than via protobuf. nn * @return a
|
||||
* protobuf'd Mutation n
|
||||
* Understanding is that the Cell will be transported other than via protobuf.
|
||||
* @return a protobuf'd Mutation
|
||||
*/
|
||||
public static MutationProto toMutationNoData(final MutationType type, final Mutation mutation)
|
||||
throws IOException {
|
||||
|
@ -1162,8 +1164,8 @@ public final class ProtobufUtil {
|
|||
|
||||
/**
|
||||
* Code shared by {@link #toMutation(MutationType, Mutation)} and
|
||||
* {@link #toMutationNoData(MutationType, Mutation)} nn * @return A partly-filled out protobuf'd
|
||||
* Mutation.
|
||||
* {@link #toMutationNoData(MutationType, Mutation)}
|
||||
* @return A partly-filled out protobuf'd Mutation.
|
||||
*/
|
||||
private static MutationProto.Builder getMutationBuilderAndSetCommonFields(final MutationType type,
|
||||
final Mutation mutation, MutationProto.Builder builder) {
|
||||
|
@ -1268,7 +1270,7 @@ public final class ProtobufUtil {
|
|||
* Convert a protocol buffer Result to a client Result
|
||||
* @param proto the protocol buffer Result to convert
|
||||
* @param scanner Optional cell scanner.
|
||||
* @return the converted client Result n
|
||||
* @return the converted client Result
|
||||
*/
|
||||
public static Result toResult(final ClientProtos.Result proto, final CellScanner scanner)
|
||||
throws IOException {
|
||||
|
@ -1382,8 +1384,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a delete KeyValue type to protocol buffer DeleteType. n * @return protocol buffer
|
||||
* DeleteType n
|
||||
* Convert a delete KeyValue type to protocol buffer DeleteType.
|
||||
* @return protocol buffer DeleteType
|
||||
*/
|
||||
public static DeleteType toDeleteType(KeyValue.Type type) throws IOException {
|
||||
switch (type) {
|
||||
|
@ -1403,7 +1405,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a protocol buffer DeleteType to delete KeyValue type.
|
||||
* @param type The DeleteType
|
||||
* @return The type. n
|
||||
* @return The type.
|
||||
*/
|
||||
public static KeyValue.Type fromDeleteType(DeleteType type) throws IOException {
|
||||
switch (type) {
|
||||
|
@ -1567,7 +1569,7 @@ public final class ProtobufUtil {
|
|||
* This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when
|
||||
* working with byte arrays
|
||||
* @param builder current message builder
|
||||
* @param b byte array n
|
||||
* @param b byte array
|
||||
*/
|
||||
public static void mergeFrom(Message.Builder builder, byte[] b) throws IOException {
|
||||
final CodedInputStream codedInput = CodedInputStream.newInstance(b);
|
||||
|
@ -1580,7 +1582,7 @@ public final class ProtobufUtil {
|
|||
* This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when
|
||||
* working with byte arrays
|
||||
* @param builder current message builder
|
||||
* @param b byte array nnn
|
||||
* @param b byte array
|
||||
*/
|
||||
public static void mergeFrom(Message.Builder builder, byte[] b, int offset, int length)
|
||||
throws IOException {
|
||||
|
@ -1634,7 +1636,7 @@ public final class ProtobufUtil {
|
|||
* magic and that is then followed by a protobuf that has a serialized
|
||||
* {@link ServerName} in it.
|
||||
* @return Returns null if <code>data</code> is null else converts passed data to a ServerName
|
||||
* instance. n
|
||||
* instance.
|
||||
*/
|
||||
public static ServerName toServerName(final byte[] data) throws DeserializationException {
|
||||
if (data == null || data.length <= 0) return null;
|
||||
|
|
|
@ -34,8 +34,7 @@ public class LeaseException extends DoNotRetryIOException {
|
|||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
* */
|
||||
public LeaseException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
|
|
@ -33,8 +33,7 @@ public class FailedLogCloseException extends IOException {
|
|||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
* */
|
||||
public FailedLogCloseException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
|
|
@ -32,8 +32,7 @@ public class FailedSyncBeforeLogCloseException extends FailedLogCloseException {
|
|||
}
|
||||
|
||||
/**
|
||||
* n
|
||||
*/
|
||||
* */
|
||||
public FailedSyncBeforeLogCloseException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public abstract class AbstractHBaseSaslRpcClient {
|
|||
* @param token token to use if needed by the authentication method
|
||||
* @param serverAddr the address of the hbase service
|
||||
* @param securityInfo the security details for the remote hbase service
|
||||
* @param fallbackAllowed does the client allow fallback to simple authentication n
|
||||
* @param fallbackAllowed does the client allow fallback to simple authentication
|
||||
*/
|
||||
protected AbstractHBaseSaslRpcClient(Configuration conf,
|
||||
SaslClientAuthenticationProvider provider, Token<? extends TokenIdentifier> token,
|
||||
|
@ -66,7 +66,7 @@ public abstract class AbstractHBaseSaslRpcClient {
|
|||
* @param serverAddr the address of the hbase service
|
||||
* @param securityInfo the security details for the remote hbase service
|
||||
* @param fallbackAllowed does the client allow fallback to simple authentication
|
||||
* @param rpcProtection the protection level ("authentication", "integrity" or "privacy") n
|
||||
* @param rpcProtection the protection level ("authentication", "integrity" or "privacy")
|
||||
*/
|
||||
protected AbstractHBaseSaslRpcClient(Configuration conf,
|
||||
SaslClientAuthenticationProvider provider, Token<? extends TokenIdentifier> token,
|
||||
|
|
|
@ -62,7 +62,7 @@ public final class EncryptionUtil {
|
|||
* @param conf configuration
|
||||
* @param key the raw key bytes
|
||||
* @param algorithm the algorithm to use with this key material
|
||||
* @return the encrypted key bytes n
|
||||
* @return the encrypted key bytes
|
||||
*/
|
||||
public static byte[] wrapKey(Configuration conf, byte[] key, String algorithm)
|
||||
throws IOException {
|
||||
|
@ -115,7 +115,7 @@ public final class EncryptionUtil {
|
|||
* @param conf configuration
|
||||
* @param subject subject key alias
|
||||
* @param value the encrypted key bytes
|
||||
* @return the raw key bytes nn
|
||||
* @return the raw key bytes
|
||||
*/
|
||||
public static Key unwrapKey(Configuration conf, String subject, byte[] value)
|
||||
throws IOException, KeyException {
|
||||
|
|
|
@ -86,7 +86,7 @@ public class HBaseSaslRpcClient extends AbstractHBaseSaslRpcClient {
|
|||
* Do client side SASL authentication with server via the given InputStream and OutputStream
|
||||
* @param inS InputStream to use
|
||||
* @param outS OutputStream to use
|
||||
* @return true if connection is set up, or false if needs to switch to simple Auth. n
|
||||
* @return true if connection is set up, or false if needs to switch to simple Auth.
|
||||
*/
|
||||
public boolean saslConnect(InputStream inS, OutputStream outS) throws IOException {
|
||||
DataInputStream inStream = new DataInputStream(new BufferedInputStream(inS));
|
||||
|
@ -185,7 +185,7 @@ public class HBaseSaslRpcClient extends AbstractHBaseSaslRpcClient {
|
|||
|
||||
/**
|
||||
* Get a SASL wrapped InputStream. Can be called only after saslConnect() has been called.
|
||||
* @return a SASL wrapped InputStream n
|
||||
* @return a SASL wrapped InputStream
|
||||
*/
|
||||
public InputStream getInputStream() throws IOException {
|
||||
if (!saslClient.isComplete()) {
|
||||
|
@ -248,7 +248,7 @@ public class HBaseSaslRpcClient extends AbstractHBaseSaslRpcClient {
|
|||
|
||||
/**
|
||||
* Get a SASL wrapped OutputStream. Can be called only after saslConnect() has been called.
|
||||
* @return a SASL wrapped OutputStream n
|
||||
* @return a SASL wrapped OutputStream
|
||||
*/
|
||||
public OutputStream getOutputStream() throws IOException {
|
||||
if (!saslClient.isComplete()) {
|
||||
|
|
|
@ -45,7 +45,7 @@ public class AccessControlClient {
|
|||
/**
|
||||
* Return true if authorization is supported and enabled
|
||||
* @param connection The connection to use
|
||||
* @return true if authorization is supported and enabled, false otherwise n
|
||||
* @return true if authorization is supported and enabled, false otherwise
|
||||
*/
|
||||
public static boolean isAuthorizationEnabled(Connection connection) throws IOException {
|
||||
return connection.getAdmin().getSecurityCapabilities()
|
||||
|
@ -55,7 +55,7 @@ public class AccessControlClient {
|
|||
/**
|
||||
* Return true if cell authorization is supported and enabled
|
||||
* @param connection The connection to use
|
||||
* @return true if cell authorization is supported and enabled, false otherwise n
|
||||
* @return true if cell authorization is supported and enabled, false otherwise
|
||||
*/
|
||||
public static boolean isCellAuthorizationEnabled(Connection connection) throws IOException {
|
||||
return connection.getAdmin().getSecurityCapabilities()
|
||||
|
@ -146,7 +146,7 @@ public class AccessControlClient {
|
|||
|
||||
/**
|
||||
* Grant global permissions for the specified user. If permissions for the specified user exists,
|
||||
* later granted permissions will override previous granted permissions. nnnn
|
||||
* later granted permissions will override previous granted permissions.
|
||||
*/
|
||||
public static void grant(Connection connection, final String userName,
|
||||
final Permission.Action... actions) throws Throwable {
|
||||
|
@ -162,7 +162,7 @@ public class AccessControlClient {
|
|||
|
||||
/**
|
||||
* Revokes the permission on the table
|
||||
* @param connection The Connection instance to use nnnnnn
|
||||
* @param connection The Connection instance to use
|
||||
*/
|
||||
public static void revoke(Connection connection, final TableName tableName, final String username,
|
||||
final byte[] family, final byte[] qualifier, final Permission.Action... actions)
|
||||
|
@ -173,7 +173,7 @@ public class AccessControlClient {
|
|||
|
||||
/**
|
||||
* Revokes the permission on the namespace for the specified user.
|
||||
* @param connection The Connection instance to use nnnn
|
||||
* @param connection The Connection instance to use
|
||||
*/
|
||||
public static void revoke(Connection connection, final String namespace, final String userName,
|
||||
final Permission.Action... actions) throws Throwable {
|
||||
|
@ -197,7 +197,7 @@ public class AccessControlClient {
|
|||
* along with the list of superusers would be returned. Else, no rows get returned.
|
||||
* @param connection The Connection instance to use
|
||||
* @param tableRegex The regular expression string to match against
|
||||
* @return List of UserPermissions n
|
||||
* @return List of UserPermissions
|
||||
*/
|
||||
public static List<UserPermission> getUserPermissions(Connection connection, String tableRegex)
|
||||
throws Throwable {
|
||||
|
|
|
@ -447,8 +447,8 @@ public class AccessControlUtil {
|
|||
* It's also called by the shell, in case you want to find references.
|
||||
* @param protocol the AccessControlService protocol proxy
|
||||
* @param userShortName the short name of the user to grant permissions
|
||||
* @param actions the permissions to be granted n * @deprecated Use
|
||||
* {@link Admin#grant(UserPermission, boolean)} instead.
|
||||
* @param actions the permissions to be granted
|
||||
* @deprecated Use {@link Admin#grant(UserPermission, boolean)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void grant(RpcController controller,
|
||||
|
@ -475,8 +475,8 @@ public class AccessControlUtil {
|
|||
* @param tableName optional table name
|
||||
* @param f optional column family
|
||||
* @param q optional qualifier
|
||||
* @param actions the permissions to be granted n * @deprecated Use
|
||||
* {@link Admin#grant(UserPermission, boolean)} instead.
|
||||
* @param actions the permissions to be granted
|
||||
* @deprecated Use {@link Admin#grant(UserPermission, boolean)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void grant(RpcController controller,
|
||||
|
@ -501,8 +501,8 @@ public class AccessControlUtil {
|
|||
* @param controller RpcController
|
||||
* @param protocol the AccessControlService protocol proxy
|
||||
* @param namespace the short name of the user to grant permissions
|
||||
* @param actions the permissions to be granted n * @deprecated Use
|
||||
* {@link Admin#grant(UserPermission, boolean)} instead.
|
||||
* @param actions the permissions to be granted
|
||||
* @deprecated Use {@link Admin#grant(UserPermission, boolean)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void grant(RpcController controller,
|
||||
|
@ -618,9 +618,8 @@ public class AccessControlUtil {
|
|||
* A utility used to get user's global permissions based on the specified user name.
|
||||
* @param controller RpcController
|
||||
* @param protocol the AccessControlService protocol proxy
|
||||
* @param userName User name, if empty then all user permissions will be retrieved. n
|
||||
* * @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)}
|
||||
* instead.
|
||||
* @param userName User name, if empty then all user permissions will be retrieved.
|
||||
* @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static List<UserPermission> getUserPermissions(RpcController controller,
|
||||
|
@ -648,8 +647,8 @@ public class AccessControlUtil {
|
|||
* It's also called by the shell, in case you want to find references.
|
||||
* @param controller RpcController
|
||||
* @param protocol the AccessControlService protocol proxy
|
||||
* @param t optional table name n * @deprecated Use
|
||||
* {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
|
||||
* @param t optional table name
|
||||
* @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static List<UserPermission> getUserPermissions(RpcController controller,
|
||||
|
@ -665,9 +664,8 @@ public class AccessControlUtil {
|
|||
* @param t optional table name
|
||||
* @param columnFamily Column family
|
||||
* @param columnQualifier Column qualifier
|
||||
* @param userName User name, if empty then all user permissions will be retrieved. n
|
||||
* * @deprecated Use
|
||||
* {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
|
||||
* @param userName User name, if empty then all user permissions will be retrieved.
|
||||
* @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static List<UserPermission> getUserPermissions(RpcController controller,
|
||||
|
@ -705,8 +703,8 @@ public class AccessControlUtil {
|
|||
* It's also called by the shell, in case you want to find references.
|
||||
* @param controller RpcController
|
||||
* @param protocol the AccessControlService protocol proxy
|
||||
* @param namespace name of the namespace n * @deprecated Use
|
||||
* {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
|
||||
* @param namespace name of the namespace
|
||||
* @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static List<UserPermission> getUserPermissions(RpcController controller,
|
||||
|
@ -719,9 +717,8 @@ public class AccessControlUtil {
|
|||
* @param controller RpcController
|
||||
* @param protocol the AccessControlService protocol proxy
|
||||
* @param namespace name of the namespace
|
||||
* @param userName User name, if empty then all user permissions will be retrieved. n
|
||||
* * @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)}
|
||||
* instead.
|
||||
* @param userName User name, if empty then all user permissions will be retrieved.
|
||||
* @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static List<UserPermission> getUserPermissions(RpcController controller,
|
||||
|
@ -759,8 +756,8 @@ public class AccessControlUtil {
|
|||
* will not be considered if columnFamily is passed as null or empty.
|
||||
* @param userName User name, it shouldn't be null or empty.
|
||||
* @param actions Actions
|
||||
* @return true if access allowed, otherwise false n * @deprecated Use
|
||||
* {@link Admin#hasUserPermissions(String, List)} instead.
|
||||
* @return true if access allowed, otherwise false
|
||||
* @deprecated Use {@link Admin#hasUserPermissions(String, List)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean hasPermission(RpcController controller,
|
||||
|
|
|
@ -55,7 +55,7 @@ public class VisibilityClient {
|
|||
/**
|
||||
* Return true if cell visibility features are supported and enabled
|
||||
* @param connection The connection to use
|
||||
* @return true if cell visibility features are supported and enabled, false otherwise n
|
||||
* @return true if cell visibility features are supported and enabled, false otherwise
|
||||
*/
|
||||
public static boolean isCellVisibilityEnabled(Connection connection) throws IOException {
|
||||
return connection.getAdmin().getSecurityCapabilities()
|
||||
|
@ -63,8 +63,8 @@ public class VisibilityClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Utility method for adding label to the system. nnnn * @deprecated Use
|
||||
* {@link #addLabel(Connection,String)} instead.
|
||||
* Utility method for adding label to the system.
|
||||
* @deprecated Use {@link #addLabel(Connection,String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static VisibilityLabelsResponse addLabel(Configuration conf, final String label)
|
||||
|
@ -75,7 +75,7 @@ public class VisibilityClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Utility method for adding label to the system. nnnn
|
||||
* Utility method for adding label to the system.
|
||||
*/
|
||||
public static VisibilityLabelsResponse addLabel(Connection connection, final String label)
|
||||
throws Throwable {
|
||||
|
@ -83,8 +83,8 @@ public class VisibilityClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Utility method for adding labels to the system. nnnn * @deprecated Use
|
||||
* {@link #addLabels(Connection,String[])} instead.
|
||||
* Utility method for adding labels to the system.
|
||||
* @deprecated Use {@link #addLabels(Connection,String[])} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static VisibilityLabelsResponse addLabels(Configuration conf, final String[] labels)
|
||||
|
@ -95,7 +95,7 @@ public class VisibilityClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Utility method for adding labels to the system. nnnn
|
||||
* Utility method for adding labels to the system.
|
||||
*/
|
||||
public static VisibilityLabelsResponse addLabels(Connection connection, final String[] labels)
|
||||
throws Throwable {
|
||||
|
@ -133,8 +133,8 @@ public class VisibilityClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets given labels globally authorized for the user. nnnnn * @deprecated Use
|
||||
* {@link #setAuths(Connection,String[],String)} instead.
|
||||
* Sets given labels globally authorized for the user.
|
||||
* @deprecated Use {@link #setAuths(Connection,String[],String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static VisibilityLabelsResponse setAuths(Configuration conf, final String[] auths,
|
||||
|
@ -145,7 +145,7 @@ public class VisibilityClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets given labels globally authorized for the user. nnnnn
|
||||
* Sets given labels globally authorized for the user.
|
||||
*/
|
||||
public static VisibilityLabelsResponse setAuths(Connection connection, final String[] auths,
|
||||
final String user) throws Throwable {
|
||||
|
@ -153,8 +153,8 @@ public class VisibilityClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns labels, the given user is globally authorized for. n * @deprecated Use
|
||||
* {@link #getAuths(Connection,String)} instead.
|
||||
* Returns labels, the given user is globally authorized for.
|
||||
* @deprecated Use {@link #getAuths(Connection,String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static GetAuthsResponse getAuths(Configuration conf, final String user) throws Throwable {
|
||||
|
@ -216,7 +216,7 @@ public class VisibilityClient {
|
|||
* Retrieve the list of visibility labels defined in the system.
|
||||
* @param connection The Connection instance to use.
|
||||
* @param regex The regular expression to filter which labels are returned.
|
||||
* @return labels The list of visibility labels defined in the system. n
|
||||
* @return labels The list of visibility labels defined in the system.
|
||||
*/
|
||||
public static ListLabelsResponse listLabels(Connection connection, final String regex)
|
||||
throws Throwable {
|
||||
|
@ -252,8 +252,8 @@ public class VisibilityClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Removes given labels from user's globally authorized list of labels. nnnnn * @deprecated Use
|
||||
* {@link #clearAuths(Connection,String[],String)} instead.
|
||||
* Removes given labels from user's globally authorized list of labels.
|
||||
* @deprecated Use {@link #clearAuths(Connection,String[],String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static VisibilityLabelsResponse clearAuths(Configuration conf, final String[] auths,
|
||||
|
@ -264,7 +264,7 @@ public class VisibilityClient {
|
|||
}
|
||||
|
||||
/**
|
||||
* Removes given labels from user's globally authorized list of labels. nnnnn
|
||||
* Removes given labels from user's globally authorized list of labels.
|
||||
*/
|
||||
public static VisibilityLabelsResponse clearAuths(Connection connection, final String[] auths,
|
||||
final String user) throws Throwable {
|
||||
|
|
|
@ -352,7 +352,7 @@ public final class ProtobufUtil {
|
|||
* Like {@link #getRemoteException(ServiceException)} but more generic, able to handle more than
|
||||
* just {@link ServiceException}. Prefer this method to
|
||||
* {@link #getRemoteException(ServiceException)} because trying to contain direct protobuf
|
||||
* references. n
|
||||
* references.
|
||||
*/
|
||||
public static IOException handleRemoteException(Exception e) {
|
||||
return makeIOExceptionOfException(e);
|
||||
|
@ -513,7 +513,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a protocol buffer Get to a client Get
|
||||
* @param proto the protocol buffer Get to convert
|
||||
* @return the converted client Get n
|
||||
* @return the converted client Get
|
||||
*/
|
||||
public static Get toGet(final ClientProtos.Get proto) throws IOException {
|
||||
if (proto == null) return null;
|
||||
|
@ -598,7 +598,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a protocol buffer Mutate to a Put.
|
||||
* @param proto The protocol buffer MutationProto to convert
|
||||
* @return A client Put. n
|
||||
* @return A client Put.
|
||||
*/
|
||||
public static Put toPut(final MutationProto proto) throws IOException {
|
||||
return toPut(proto, null);
|
||||
|
@ -608,7 +608,7 @@ public final class ProtobufUtil {
|
|||
* Convert a protocol buffer Mutate to a Put.
|
||||
* @param proto The protocol buffer MutationProto to convert
|
||||
* @param cellScanner If non-null, the Cell data that goes with this proto.
|
||||
* @return A client Put. n
|
||||
* @return A client Put.
|
||||
*/
|
||||
public static Put toPut(final MutationProto proto, final CellScanner cellScanner)
|
||||
throws IOException {
|
||||
|
@ -692,7 +692,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a protocol buffer Mutate to a Delete
|
||||
* @param proto the protocol buffer Mutate to convert
|
||||
* @return the converted client Delete n
|
||||
* @return the converted client Delete
|
||||
*/
|
||||
public static Delete toDelete(final MutationProto proto) throws IOException {
|
||||
return toDelete(proto, null);
|
||||
|
@ -702,7 +702,7 @@ public final class ProtobufUtil {
|
|||
* Convert a protocol buffer Mutate to a Delete
|
||||
* @param proto the protocol buffer Mutate to convert
|
||||
* @param cellScanner if non-null, the data that goes with this delete.
|
||||
* @return the converted client Delete n
|
||||
* @return the converted client Delete
|
||||
*/
|
||||
public static Delete toDelete(final MutationProto proto, final CellScanner cellScanner)
|
||||
throws IOException {
|
||||
|
@ -871,7 +871,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a MutateRequest to Mutation
|
||||
* @param proto the protocol buffer Mutate to convert
|
||||
* @return the converted Mutation n
|
||||
* @return the converted Mutation
|
||||
*/
|
||||
public static Mutation toMutation(final MutationProto proto) throws IOException {
|
||||
MutationType type = proto.getMutateType();
|
||||
|
@ -919,7 +919,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a client Scan to a protocol buffer Scan
|
||||
* @param scan the client Scan to convert
|
||||
* @return the converted protocol buffer Scan n
|
||||
* @return the converted protocol buffer Scan
|
||||
*/
|
||||
public static ClientProtos.Scan toScan(final Scan scan) throws IOException {
|
||||
ClientProtos.Scan.Builder scanBuilder = ClientProtos.Scan.newBuilder();
|
||||
|
@ -1016,7 +1016,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a protocol buffer Scan to a client Scan
|
||||
* @param proto the protocol buffer Scan to convert
|
||||
* @return the converted client Scan n
|
||||
* @return the converted client Scan
|
||||
*/
|
||||
public static Scan toScan(final ClientProtos.Scan proto) throws IOException {
|
||||
byte[] startRow = HConstants.EMPTY_START_ROW;
|
||||
|
@ -1141,7 +1141,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Create a protocol buffer Get based on a client Get.
|
||||
* @param get the client Get
|
||||
* @return a protocol buffer Get n
|
||||
* @return a protocol buffer Get
|
||||
*/
|
||||
public static ClientProtos.Get toGet(final Get get) throws IOException {
|
||||
ClientProtos.Get.Builder builder = ClientProtos.Get.newBuilder();
|
||||
|
@ -1207,7 +1207,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer Mutate based on a client Mutation nn * @return a protobuf'd Mutation n
|
||||
* Create a protocol buffer Mutate based on a client Mutation
|
||||
* @return a protobuf'd Mutation
|
||||
*/
|
||||
public static MutationProto toMutation(final MutationType type, final Mutation mutation,
|
||||
final long nonce) throws IOException {
|
||||
|
@ -1256,8 +1257,8 @@ public final class ProtobufUtil {
|
|||
|
||||
/**
|
||||
* Create a protocol buffer MutationProto based on a client Mutation. Does NOT include data.
|
||||
* Understanding is that the Cell will be transported other than via protobuf. nnn * @return a
|
||||
* protobuf'd Mutation n
|
||||
* Understanding is that the Cell will be transported other than via protobuf.
|
||||
* @return a protobuf'd Mutation
|
||||
*/
|
||||
public static MutationProto toMutationNoData(final MutationType type, final Mutation mutation,
|
||||
final MutationProto.Builder builder) throws IOException {
|
||||
|
@ -1266,8 +1267,8 @@ public final class ProtobufUtil {
|
|||
|
||||
/**
|
||||
* Create a protocol buffer MutationProto based on a client Mutation. Does NOT include data.
|
||||
* Understanding is that the Cell will be transported other than via protobuf. nn * @return a
|
||||
* protobuf'd Mutation n
|
||||
* Understanding is that the Cell will be transported other than via protobuf.
|
||||
* @return a protobuf'd Mutation
|
||||
*/
|
||||
public static MutationProto toMutationNoData(final MutationType type, final Mutation mutation)
|
||||
throws IOException {
|
||||
|
@ -1293,8 +1294,8 @@ public final class ProtobufUtil {
|
|||
|
||||
/**
|
||||
* Code shared by {@link #toMutation(MutationType, Mutation)} and
|
||||
* {@link #toMutationNoData(MutationType, Mutation)} nn * @return A partly-filled out protobuf'd
|
||||
* Mutation.
|
||||
* {@link #toMutationNoData(MutationType, Mutation)}
|
||||
* @return A partly-filled out protobuf'd Mutation.
|
||||
*/
|
||||
private static MutationProto.Builder getMutationBuilderAndSetCommonFields(final MutationType type,
|
||||
final Mutation mutation, MutationProto.Builder builder) {
|
||||
|
@ -1427,7 +1428,7 @@ public final class ProtobufUtil {
|
|||
* Convert a protocol buffer Result to a client Result
|
||||
* @param proto the protocol buffer Result to convert
|
||||
* @param scanner Optional cell scanner.
|
||||
* @return the converted client Result n
|
||||
* @return the converted client Result
|
||||
*/
|
||||
public static Result toResult(final ClientProtos.Result proto, final CellScanner scanner)
|
||||
throws IOException {
|
||||
|
@ -1542,8 +1543,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a delete KeyValue type to protocol buffer DeleteType. n * @return protocol buffer
|
||||
* DeleteType n
|
||||
* Convert a delete KeyValue type to protocol buffer DeleteType.
|
||||
* @return protocol buffer DeleteType
|
||||
*/
|
||||
public static DeleteType toDeleteType(KeyValue.Type type) throws IOException {
|
||||
switch (type) {
|
||||
|
@ -1563,7 +1564,7 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Convert a protocol buffer DeleteType to delete KeyValue type.
|
||||
* @param type The DeleteType
|
||||
* @return The type. n
|
||||
* @return The type.
|
||||
*/
|
||||
public static KeyValue.Type fromDeleteType(DeleteType type) throws IOException {
|
||||
switch (type) {
|
||||
|
@ -1654,7 +1655,7 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* A helper to close a region given a region name using admin protocol. nnn
|
||||
* A helper to close a region given a region name using admin protocol.
|
||||
*/
|
||||
public static void closeRegion(final RpcController controller,
|
||||
final AdminService.BlockingInterface admin, final ServerName server, final byte[] regionName)
|
||||
|
@ -1669,7 +1670,7 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* A helper to warmup a region given a region name using admin protocol nn *
|
||||
* A helper to warmup a region given a region name using admin protocol
|
||||
*/
|
||||
public static void warmupRegion(final RpcController controller,
|
||||
final AdminService.BlockingInterface admin,
|
||||
|
@ -1686,7 +1687,7 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* A helper to open a region using admin protocol. nnn
|
||||
* A helper to open a region using admin protocol.
|
||||
*/
|
||||
public static void openRegion(final RpcController controller,
|
||||
final AdminService.BlockingInterface admin, ServerName server,
|
||||
|
@ -1700,8 +1701,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* A helper to get the all the online regions on a region server using admin protocol. n * @return
|
||||
* a list of online region info n
|
||||
* A helper to get the all the online regions on a region server using admin protocol.
|
||||
* @return a list of online region info
|
||||
*/
|
||||
public static List<org.apache.hadoop.hbase.client.RegionInfo>
|
||||
getOnlineRegions(final AdminService.BlockingInterface admin) throws IOException {
|
||||
|
@ -2034,7 +2035,8 @@ public final class ProtobufUtil {
|
|||
/**
|
||||
* Return short version of Message toString'd, shorter than TextFormat#shortDebugString. Tries to
|
||||
* NOT print out data both because it can be big but also so we do not have data in our logs. Use
|
||||
* judiciously. n * @return toString of passed <code>m</code>
|
||||
* judiciously.
|
||||
* @return toString of passed <code>m</code>
|
||||
*/
|
||||
public static String getShortTextFormat(Message m) {
|
||||
if (m == null) return "null";
|
||||
|
@ -2181,8 +2183,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a protocol buffer CellVisibility to a client CellVisibility n * @return the converted
|
||||
* client CellVisibility
|
||||
* Convert a protocol buffer CellVisibility to a client CellVisibility
|
||||
* @return the converted client CellVisibility
|
||||
*/
|
||||
public static CellVisibility toCellVisibility(ClientProtos.CellVisibility proto) {
|
||||
if (proto == null) return null;
|
||||
|
@ -2190,8 +2192,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a protocol buffer CellVisibility bytes to a client CellVisibility n * @return the
|
||||
* converted client CellVisibility n
|
||||
* Convert a protocol buffer CellVisibility bytes to a client CellVisibility
|
||||
* @return the converted client CellVisibility
|
||||
*/
|
||||
public static CellVisibility toCellVisibility(byte[] protoBytes) throws DeserializationException {
|
||||
if (protoBytes == null) return null;
|
||||
|
@ -2207,8 +2209,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer CellVisibility based on a client CellVisibility. n * @return a
|
||||
* protocol buffer CellVisibility
|
||||
* Create a protocol buffer CellVisibility based on a client CellVisibility.
|
||||
* @return a protocol buffer CellVisibility
|
||||
*/
|
||||
public static ClientProtos.CellVisibility toCellVisibility(CellVisibility cellVisibility) {
|
||||
ClientProtos.CellVisibility.Builder builder = ClientProtos.CellVisibility.newBuilder();
|
||||
|
@ -2217,8 +2219,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a protocol buffer Authorizations to a client Authorizations n * @return the converted
|
||||
* client Authorizations
|
||||
* Convert a protocol buffer Authorizations to a client Authorizations
|
||||
* @return the converted client Authorizations
|
||||
*/
|
||||
public static Authorizations toAuthorizations(ClientProtos.Authorizations proto) {
|
||||
if (proto == null) return null;
|
||||
|
@ -2226,8 +2228,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a protocol buffer Authorizations bytes to a client Authorizations n * @return the
|
||||
* converted client Authorizations n
|
||||
* Convert a protocol buffer Authorizations bytes to a client Authorizations
|
||||
* @return the converted client Authorizations
|
||||
*/
|
||||
public static Authorizations toAuthorizations(byte[] protoBytes) throws DeserializationException {
|
||||
if (protoBytes == null) return null;
|
||||
|
@ -2243,8 +2245,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer Authorizations based on a client Authorizations. n * @return a
|
||||
* protocol buffer Authorizations
|
||||
* Create a protocol buffer Authorizations based on a client Authorizations.
|
||||
* @return a protocol buffer Authorizations
|
||||
*/
|
||||
public static ClientProtos.Authorizations toAuthorizations(Authorizations authorizations) {
|
||||
ClientProtos.Authorizations.Builder builder = ClientProtos.Authorizations.newBuilder();
|
||||
|
@ -2255,8 +2257,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a protocol buffer TimeUnit to a client TimeUnit n * @return the converted client
|
||||
* TimeUnit
|
||||
* Convert a protocol buffer TimeUnit to a client TimeUnit
|
||||
* @return the converted client TimeUnit
|
||||
*/
|
||||
public static TimeUnit toTimeUnit(final HBaseProtos.TimeUnit proto) {
|
||||
switch (proto) {
|
||||
|
@ -2279,8 +2281,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a client TimeUnit to a protocol buffer TimeUnit n * @return the converted protocol
|
||||
* buffer TimeUnit
|
||||
* Convert a client TimeUnit to a protocol buffer TimeUnit
|
||||
* @return the converted protocol buffer TimeUnit
|
||||
*/
|
||||
public static HBaseProtos.TimeUnit toProtoTimeUnit(final TimeUnit timeUnit) {
|
||||
switch (timeUnit) {
|
||||
|
@ -2303,8 +2305,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a protocol buffer ThrottleType to a client ThrottleType n * @return the converted
|
||||
* client ThrottleType
|
||||
* Convert a protocol buffer ThrottleType to a client ThrottleType
|
||||
* @return the converted client ThrottleType
|
||||
*/
|
||||
public static ThrottleType toThrottleType(final QuotaProtos.ThrottleType proto) {
|
||||
switch (proto) {
|
||||
|
@ -2332,8 +2334,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a client ThrottleType to a protocol buffer ThrottleType n * @return the converted
|
||||
* protocol buffer ThrottleType
|
||||
* Convert a client ThrottleType to a protocol buffer ThrottleType
|
||||
* @return the converted protocol buffer ThrottleType
|
||||
*/
|
||||
public static QuotaProtos.ThrottleType toProtoThrottleType(final ThrottleType type) {
|
||||
switch (type) {
|
||||
|
@ -2361,8 +2363,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a protocol buffer QuotaScope to a client QuotaScope n * @return the converted client
|
||||
* QuotaScope
|
||||
* Convert a protocol buffer QuotaScope to a client QuotaScope
|
||||
* @return the converted client QuotaScope
|
||||
*/
|
||||
public static QuotaScope toQuotaScope(final QuotaProtos.QuotaScope proto) {
|
||||
switch (proto) {
|
||||
|
@ -2375,8 +2377,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a client QuotaScope to a protocol buffer QuotaScope n * @return the converted protocol
|
||||
* buffer QuotaScope
|
||||
* Convert a client QuotaScope to a protocol buffer QuotaScope
|
||||
* @return the converted protocol buffer QuotaScope
|
||||
*/
|
||||
public static QuotaProtos.QuotaScope toProtoQuotaScope(final QuotaScope scope) {
|
||||
switch (scope) {
|
||||
|
@ -2389,8 +2391,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a protocol buffer QuotaType to a client QuotaType n * @return the converted client
|
||||
* QuotaType
|
||||
* Convert a protocol buffer QuotaType to a client QuotaType
|
||||
* @return the converted client QuotaType
|
||||
*/
|
||||
public static QuotaType toQuotaScope(final QuotaProtos.QuotaType proto) {
|
||||
switch (proto) {
|
||||
|
@ -2403,8 +2405,8 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convert a client QuotaType to a protocol buffer QuotaType n * @return the converted protocol
|
||||
* buffer QuotaType
|
||||
* Convert a client QuotaType to a protocol buffer QuotaType
|
||||
* @return the converted protocol buffer QuotaType
|
||||
*/
|
||||
public static QuotaProtos.QuotaType toProtoQuotaScope(final QuotaType type) {
|
||||
switch (type) {
|
||||
|
@ -2531,7 +2533,7 @@ public final class ProtobufUtil {
|
|||
* This version of protobuf's mergeDelimitedFrom avoid the hard-coded 64MB limit for decoding
|
||||
* buffers
|
||||
* @param builder current message builder
|
||||
* @param in Inputsream with delimited protobuf data n
|
||||
* @param in Inputsream with delimited protobuf data
|
||||
*/
|
||||
public static void mergeDelimitedFrom(Message.Builder builder, InputStream in)
|
||||
throws IOException {
|
||||
|
@ -2553,7 +2555,7 @@ public final class ProtobufUtil {
|
|||
* where the message size is known
|
||||
* @param builder current message builder
|
||||
* @param in InputStream containing protobuf data
|
||||
* @param size known size of protobuf data n
|
||||
* @param size known size of protobuf data
|
||||
*/
|
||||
public static void mergeFrom(Message.Builder builder, InputStream in, int size)
|
||||
throws IOException {
|
||||
|
@ -2567,7 +2569,7 @@ public final class ProtobufUtil {
|
|||
* This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers
|
||||
* where the message size is not known
|
||||
* @param builder current message builder
|
||||
* @param in InputStream containing protobuf data n
|
||||
* @param in InputStream containing protobuf data
|
||||
*/
|
||||
public static void mergeFrom(Message.Builder builder, InputStream in) throws IOException {
|
||||
final CodedInputStream codedInput = CodedInputStream.newInstance(in);
|
||||
|
@ -2580,7 +2582,7 @@ public final class ProtobufUtil {
|
|||
* This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when
|
||||
* working with ByteStrings
|
||||
* @param builder current message builder
|
||||
* @param bs ByteString containing the n
|
||||
* @param bs ByteString containing the
|
||||
*/
|
||||
public static void mergeFrom(Message.Builder builder, ByteString bs) throws IOException {
|
||||
final CodedInputStream codedInput = bs.newCodedInput();
|
||||
|
@ -2593,7 +2595,7 @@ public final class ProtobufUtil {
|
|||
* This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when
|
||||
* working with byte arrays
|
||||
* @param builder current message builder
|
||||
* @param b byte array n
|
||||
* @param b byte array
|
||||
*/
|
||||
public static void mergeFrom(Message.Builder builder, byte[] b) throws IOException {
|
||||
final CodedInputStream codedInput = CodedInputStream.newInstance(b);
|
||||
|
@ -2606,7 +2608,7 @@ public final class ProtobufUtil {
|
|||
* This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when
|
||||
* working with byte arrays
|
||||
* @param builder current message builder
|
||||
* @param b byte array nnn
|
||||
* @param b byte array
|
||||
*/
|
||||
public static void mergeFrom(Message.Builder builder, byte[] b, int offset, int length)
|
||||
throws IOException {
|
||||
|
@ -2778,7 +2780,7 @@ public final class ProtobufUtil {
|
|||
|
||||
/**
|
||||
* Creates {@link CompactionState} from {@link GetRegionInfoResponse.CompactionState} state
|
||||
* @param state the protobuf CompactionState n
|
||||
* @param state the protobuf CompactionState
|
||||
*/
|
||||
public static CompactionState createCompactionState(GetRegionInfoResponse.CompactionState state) {
|
||||
return CompactionState.valueOf(state.toString());
|
||||
|
@ -2790,7 +2792,7 @@ public final class ProtobufUtil {
|
|||
|
||||
/**
|
||||
* Creates {@link CompactionState} from {@link RegionLoad.CompactionState} state
|
||||
* @param state the protobuf CompactionState n
|
||||
* @param state the protobuf CompactionState
|
||||
*/
|
||||
public static CompactionState
|
||||
createCompactionStateForRegionLoad(RegionLoad.CompactionState state) {
|
||||
|
@ -2895,9 +2897,7 @@ public final class ProtobufUtil {
|
|||
stats.getCompactionPressure());
|
||||
}
|
||||
|
||||
/**
|
||||
* n * @return A String version of the passed in <code>msg</code>
|
||||
*/
|
||||
/** Returns A String version of the passed in <code>msg</code> */
|
||||
public static String toText(Message msg) {
|
||||
return TextFormat.shortDebugString(msg);
|
||||
}
|
||||
|
@ -2907,7 +2907,7 @@ public final class ProtobufUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Contain ServiceException inside here. Take a callable that is doing our pb rpc and run it. n
|
||||
* Contain ServiceException inside here. Take a callable that is doing our pb rpc and run it.
|
||||
*/
|
||||
public static <T> T call(Callable<T> callable) throws IOException {
|
||||
try {
|
||||
|
@ -3018,7 +3018,7 @@ public final class ProtobufUtil {
|
|||
* magic and that is then followed by a protobuf that has a serialized
|
||||
* {@link ServerName} in it.
|
||||
* @return Returns null if <code>data</code> is null else converts passed data to a ServerName
|
||||
* instance. n
|
||||
* instance.
|
||||
*/
|
||||
public static ServerName parseServerNameFrom(final byte[] data) throws DeserializationException {
|
||||
if (data == null || data.length <= 0) return null;
|
||||
|
|
|
@ -193,7 +193,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer MutateRequest for a client increment nnnnnn * @return a mutate request
|
||||
* Create a protocol buffer MutateRequest for a client increment
|
||||
* @return a mutate request
|
||||
*/
|
||||
public static MutateRequest buildIncrementRequest(final byte[] regionName, final byte[] row,
|
||||
final byte[] family, final byte[] qualifier, final long amount, final Durability durability,
|
||||
|
@ -227,7 +228,7 @@ public final class RequestConverter {
|
|||
|
||||
/**
|
||||
* Create a protocol buffer MutateRequest for a conditioned put/delete/increment/append
|
||||
* @return a mutate request n
|
||||
* @return a mutate request
|
||||
*/
|
||||
public static MutateRequest buildMutateRequest(final byte[] regionName, final byte[] row,
|
||||
final byte[] family, final byte[] qualifier, final CompareOperator op, final byte[] value,
|
||||
|
@ -247,7 +248,7 @@ public final class RequestConverter {
|
|||
|
||||
/**
|
||||
* Create a protocol buffer MultiRequest for conditioned row mutations
|
||||
* @return a multi request n
|
||||
* @return a multi request
|
||||
*/
|
||||
public static ClientProtos.MultiRequest buildMultiRequest(final byte[] regionName,
|
||||
final byte[] row, final byte[] family, final byte[] qualifier, final CompareOperator op,
|
||||
|
@ -304,7 +305,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer MutateRequest for a put nn * @return a mutate request n
|
||||
* Create a protocol buffer MutateRequest for a put
|
||||
* @return a mutate request
|
||||
*/
|
||||
public static MutateRequest buildMutateRequest(final byte[] regionName, final Put put)
|
||||
throws IOException {
|
||||
|
@ -316,7 +318,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer MutateRequest for an append nn * @return a mutate request n
|
||||
* Create a protocol buffer MutateRequest for an append
|
||||
* @return a mutate request
|
||||
*/
|
||||
public static MutateRequest buildMutateRequest(final byte[] regionName, final Append append,
|
||||
long nonceGroup, long nonce) throws IOException {
|
||||
|
@ -332,7 +335,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer MutateRequest for a client increment nn * @return a mutate request
|
||||
* Create a protocol buffer MutateRequest for a client increment
|
||||
* @return a mutate request
|
||||
*/
|
||||
public static MutateRequest buildMutateRequest(final byte[] regionName, final Increment increment,
|
||||
final long nonceGroup, final long nonce) throws IOException {
|
||||
|
@ -348,7 +352,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer MutateRequest for a delete nn * @return a mutate request n
|
||||
* Create a protocol buffer MutateRequest for a delete
|
||||
* @return a mutate request
|
||||
*/
|
||||
public static MutateRequest buildMutateRequest(final byte[] regionName, final Delete delete)
|
||||
throws IOException {
|
||||
|
@ -368,7 +373,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer ScanRequest for a client Scan nnnn * @return a scan request n
|
||||
* Create a protocol buffer ScanRequest for a client Scan
|
||||
* @return a scan request
|
||||
*/
|
||||
public static ScanRequest buildScanRequest(byte[] regionName, Scan scan, int numberOfRows,
|
||||
boolean closeScanner) throws IOException {
|
||||
|
@ -388,7 +394,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer ScanRequest for a scanner id nnn * @return a scan request
|
||||
* Create a protocol buffer ScanRequest for a scanner id
|
||||
* @return a scan request
|
||||
*/
|
||||
public static ScanRequest buildScanRequest(long scannerId, int numberOfRows, boolean closeScanner,
|
||||
boolean trackMetrics) {
|
||||
|
@ -403,7 +410,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer ScanRequest for a scanner id nnnn * @return a scan request
|
||||
* Create a protocol buffer ScanRequest for a scanner id
|
||||
* @return a scan request
|
||||
*/
|
||||
public static ScanRequest buildScanRequest(long scannerId, int numberOfRows, boolean closeScanner,
|
||||
long nextCallSeq, boolean trackMetrics, boolean renew, int limitOfRows) {
|
||||
|
@ -423,7 +431,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer bulk load request nnnnn * @return a bulk load request
|
||||
* Create a protocol buffer bulk load request
|
||||
* @return a bulk load request
|
||||
*/
|
||||
public static BulkLoadHFileRequest buildBulkLoadHFileRequest(
|
||||
final List<Pair<byte[], String>> familyPaths, final byte[] regionName, boolean assignSeqNum,
|
||||
|
@ -433,7 +442,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer bulk load request nnnnnn * @return a bulk load request
|
||||
* Create a protocol buffer bulk load request
|
||||
* @return a bulk load request
|
||||
*/
|
||||
public static BulkLoadHFileRequest buildBulkLoadHFileRequest(
|
||||
final List<Pair<byte[], String>> familyPaths, final byte[] regionName, boolean assignSeqNum,
|
||||
|
@ -490,7 +500,7 @@ public final class RequestConverter {
|
|||
* @param mutationBuilder mutationBuilder to be used to build mutation.
|
||||
* @param nonceGroup nonceGroup to be applied.
|
||||
* @param indexMap Map of created RegionAction to the original index for a
|
||||
* RowMutations/CheckAndMutate within the original list of actions n
|
||||
* RowMutations/CheckAndMutate within the original list of actions
|
||||
*/
|
||||
public static void buildRegionActions(final byte[] regionName, final List<Action> actions,
|
||||
final MultiRequest.Builder multiRequestBuilder, final RegionAction.Builder regionActionBuilder,
|
||||
|
@ -653,7 +663,7 @@ public final class RequestConverter {
|
|||
* @param mutationBuilder mutationBuilder to be used to build mutation.
|
||||
* @param nonceGroup nonceGroup to be applied.
|
||||
* @param indexMap Map of created RegionAction to the original index for a
|
||||
* RowMutations/CheckAndMutate within the original list of actions n
|
||||
* RowMutations/CheckAndMutate within the original list of actions
|
||||
*/
|
||||
public static void buildNoDataRegionActions(final byte[] regionName,
|
||||
final Iterable<Action> actions, final List<CellScannable> cells,
|
||||
|
@ -1021,7 +1031,8 @@ public final class RequestConverter {
|
|||
/**
|
||||
* Create a CompactRegionRequest for a given region name
|
||||
* @param regionName the name of the region to get info
|
||||
* @param major indicator if it is a major compaction n * @return a CompactRegionRequest
|
||||
* @param major indicator if it is a major compaction
|
||||
* @return a CompactRegionRequest
|
||||
*/
|
||||
public static CompactRegionRequest buildCompactRegionRequest(byte[] regionName, boolean major,
|
||||
byte[] columnFamily) {
|
||||
|
@ -1079,7 +1090,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer AddColumnRequest nn * @return an AddColumnRequest
|
||||
* Create a protocol buffer AddColumnRequest
|
||||
* @return an AddColumnRequest
|
||||
*/
|
||||
public static AddColumnRequest buildAddColumnRequest(final TableName tableName,
|
||||
final ColumnFamilyDescriptor column, final long nonceGroup, final long nonce) {
|
||||
|
@ -1092,7 +1104,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer DeleteColumnRequest nn * @return a DeleteColumnRequest
|
||||
* Create a protocol buffer DeleteColumnRequest
|
||||
* @return a DeleteColumnRequest
|
||||
*/
|
||||
public static DeleteColumnRequest buildDeleteColumnRequest(final TableName tableName,
|
||||
final byte[] columnName, final long nonceGroup, final long nonce) {
|
||||
|
@ -1105,7 +1118,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer ModifyColumnRequest nn * @return an ModifyColumnRequest
|
||||
* Create a protocol buffer ModifyColumnRequest
|
||||
* @return an ModifyColumnRequest
|
||||
*/
|
||||
public static ModifyColumnRequest buildModifyColumnRequest(final TableName tableName,
|
||||
final ColumnFamilyDescriptor column, final long nonceGroup, final long nonce) {
|
||||
|
@ -1131,7 +1145,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer MoveRegionRequest nn * @return A MoveRegionRequest
|
||||
* Create a protocol buffer MoveRegionRequest
|
||||
* @return A MoveRegionRequest
|
||||
*/
|
||||
public static MoveRegionRequest buildMoveRegionRequest(byte[] encodedRegionName,
|
||||
ServerName destServerName) {
|
||||
|
@ -1172,7 +1187,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a protocol buffer AssignRegionRequest n * @return an AssignRegionRequest
|
||||
* Create a protocol buffer AssignRegionRequest
|
||||
* @return an AssignRegionRequest
|
||||
*/
|
||||
public static AssignRegionRequest buildAssignRegionRequest(final byte[] regionName) {
|
||||
AssignRegionRequest.Builder builder = AssignRegionRequest.newBuilder();
|
||||
|
@ -1181,7 +1197,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer UnassignRegionRequest n * @return an UnassignRegionRequest
|
||||
* Creates a protocol buffer UnassignRegionRequest
|
||||
* @return an UnassignRegionRequest
|
||||
*/
|
||||
public static UnassignRegionRequest buildUnassignRegionRequest(final byte[] regionName) {
|
||||
UnassignRegionRequest.Builder builder = UnassignRegionRequest.newBuilder();
|
||||
|
@ -1190,7 +1207,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer OfflineRegionRequest n * @return an OfflineRegionRequest
|
||||
* Creates a protocol buffer OfflineRegionRequest
|
||||
* @return an OfflineRegionRequest
|
||||
*/
|
||||
public static OfflineRegionRequest buildOfflineRegionRequest(final byte[] regionName) {
|
||||
OfflineRegionRequest.Builder builder = OfflineRegionRequest.newBuilder();
|
||||
|
@ -1199,7 +1217,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer DeleteTableRequest n * @return a DeleteTableRequest
|
||||
* Creates a protocol buffer DeleteTableRequest
|
||||
* @return a DeleteTableRequest
|
||||
*/
|
||||
public static DeleteTableRequest buildDeleteTableRequest(final TableName tableName,
|
||||
final long nonceGroup, final long nonce) {
|
||||
|
@ -1227,7 +1246,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer EnableTableRequest n * @return an EnableTableRequest
|
||||
* Creates a protocol buffer EnableTableRequest
|
||||
* @return an EnableTableRequest
|
||||
*/
|
||||
public static EnableTableRequest buildEnableTableRequest(final TableName tableName,
|
||||
final long nonceGroup, final long nonce) {
|
||||
|
@ -1239,7 +1259,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer DisableTableRequest n * @return a DisableTableRequest
|
||||
* Creates a protocol buffer DisableTableRequest
|
||||
* @return a DisableTableRequest
|
||||
*/
|
||||
public static DisableTableRequest buildDisableTableRequest(final TableName tableName,
|
||||
final long nonceGroup, final long nonce) {
|
||||
|
@ -1251,7 +1272,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer CreateTableRequest nn * @return a CreateTableRequest
|
||||
* Creates a protocol buffer CreateTableRequest
|
||||
* @return a CreateTableRequest
|
||||
*/
|
||||
public static CreateTableRequest buildCreateTableRequest(final TableDescriptor tableDescriptor,
|
||||
final byte[][] splitKeys, final long nonceGroup, final long nonce) {
|
||||
|
@ -1268,7 +1290,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer ModifyTableRequest nn * @return a ModifyTableRequest
|
||||
* Creates a protocol buffer ModifyTableRequest
|
||||
* @return a ModifyTableRequest
|
||||
*/
|
||||
public static ModifyTableRequest buildModifyTableRequest(final TableName tableName,
|
||||
final TableDescriptor tableDesc, final long nonceGroup, final long nonce) {
|
||||
|
@ -1292,7 +1315,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer GetSchemaAlterStatusRequest n * @return a GetSchemaAlterStatusRequest
|
||||
* Creates a protocol buffer GetSchemaAlterStatusRequest
|
||||
* @return a GetSchemaAlterStatusRequest
|
||||
*/
|
||||
public static GetSchemaAlterStatusRequest
|
||||
buildGetSchemaAlterStatusRequest(final TableName tableName) {
|
||||
|
@ -1302,7 +1326,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer GetTableDescriptorsRequest n * @return a GetTableDescriptorsRequest
|
||||
* Creates a protocol buffer GetTableDescriptorsRequest
|
||||
* @return a GetTableDescriptorsRequest
|
||||
*/
|
||||
public static GetTableDescriptorsRequest
|
||||
buildGetTableDescriptorsRequest(final List<TableName> tableNames) {
|
||||
|
@ -1409,7 +1434,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer SetBalancerRunningRequest nn * @return a SetBalancerRunningRequest
|
||||
* Creates a protocol buffer SetBalancerRunningRequest
|
||||
* @return a SetBalancerRunningRequest
|
||||
*/
|
||||
public static SetBalancerRunningRequest buildSetBalancerRunningRequest(boolean on,
|
||||
boolean synchronous) {
|
||||
|
@ -1494,8 +1520,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a request for querying the master the last flushed sequence Id for a region n * @return
|
||||
* A {@link GetLastFlushedSequenceIdRequest}
|
||||
* Creates a request for querying the master the last flushed sequence Id for a region
|
||||
* @return A {@link GetLastFlushedSequenceIdRequest}
|
||||
*/
|
||||
public static GetLastFlushedSequenceIdRequest
|
||||
buildGetLastFlushedSequenceIdRequest(byte[] regionName) {
|
||||
|
@ -1546,7 +1572,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer SetNormalizerRunningRequest n * @return a SetNormalizerRunningRequest
|
||||
* Creates a protocol buffer SetNormalizerRunningRequest
|
||||
* @return a SetNormalizerRunningRequest
|
||||
*/
|
||||
public static SetNormalizerRunningRequest buildSetNormalizerRunningRequest(boolean on) {
|
||||
return SetNormalizerRunningRequest.newBuilder().setOn(on).build();
|
||||
|
@ -1654,7 +1681,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer CreateNamespaceRequest n * @return a CreateNamespaceRequest
|
||||
* Creates a protocol buffer CreateNamespaceRequest
|
||||
* @return a CreateNamespaceRequest
|
||||
*/
|
||||
public static CreateNamespaceRequest
|
||||
buildCreateNamespaceRequest(final NamespaceDescriptor descriptor) {
|
||||
|
@ -1664,7 +1692,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer ModifyNamespaceRequest n * @return a ModifyNamespaceRequest
|
||||
* Creates a protocol buffer ModifyNamespaceRequest
|
||||
* @return a ModifyNamespaceRequest
|
||||
*/
|
||||
public static ModifyNamespaceRequest
|
||||
buildModifyNamespaceRequest(final NamespaceDescriptor descriptor) {
|
||||
|
@ -1674,7 +1703,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer DeleteNamespaceRequest n * @return a DeleteNamespaceRequest
|
||||
* Creates a protocol buffer DeleteNamespaceRequest
|
||||
* @return a DeleteNamespaceRequest
|
||||
*/
|
||||
public static DeleteNamespaceRequest buildDeleteNamespaceRequest(final String name) {
|
||||
DeleteNamespaceRequest.Builder builder = DeleteNamespaceRequest.newBuilder();
|
||||
|
@ -1683,8 +1713,8 @@ public final class RequestConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a protocol buffer GetNamespaceDescriptorRequest n * @return a
|
||||
* GetNamespaceDescriptorRequest
|
||||
* Creates a protocol buffer GetNamespaceDescriptorRequest
|
||||
* @return a GetNamespaceDescriptorRequest
|
||||
*/
|
||||
public static GetNamespaceDescriptorRequest
|
||||
buildGetNamespaceDescriptorRequest(final String name) {
|
||||
|
@ -1801,7 +1831,7 @@ public final class RequestConverter {
|
|||
|
||||
/**
|
||||
* Creates IsSnapshotCleanupEnabledRequest to determine if auto snapshot cleanup based on TTL
|
||||
* expiration is turned on n
|
||||
* expiration is turned on
|
||||
*/
|
||||
public static IsSnapshotCleanupEnabledRequest buildIsSnapshotCleanupEnabledRequest() {
|
||||
return IsSnapshotCleanupEnabledRequest.newBuilder().build();
|
||||
|
|
|
@ -90,7 +90,7 @@ public final class ResponseConverter {
|
|||
* @param request the original protocol buffer MultiRequest
|
||||
* @param response the protocol buffer MultiResponse to convert
|
||||
* @param cells Cells to go with the passed in <code>proto</code>. Can be null.
|
||||
* @return the results that were in the MultiResponse (a Result or an Exception). n
|
||||
* @return the results that were in the MultiResponse (a Result or an Exception).
|
||||
*/
|
||||
public static org.apache.hadoop.hbase.client.MultiResponse getResults(final MultiRequest request,
|
||||
final MultiResponse response, final CellScanner cells) throws IOException {
|
||||
|
@ -103,7 +103,7 @@ public final class ResponseConverter {
|
|||
* @param indexMap Used to support RowMutations/CheckAndMutate in batch
|
||||
* @param response the protocol buffer MultiResponse to convert
|
||||
* @param cells Cells to go with the passed in <code>proto</code>. Can be null.
|
||||
* @return the results that were in the MultiResponse (a Result or an Exception). n
|
||||
* @return the results that were in the MultiResponse (a Result or an Exception).
|
||||
*/
|
||||
public static org.apache.hadoop.hbase.client.MultiResponse getResults(final MultiRequest request,
|
||||
final Map<Integer, Integer> indexMap, final MultiResponse response, final CellScanner cells)
|
||||
|
@ -265,7 +265,8 @@ public final class ResponseConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Wrap a throwable to an action result. n * @return an action result builder
|
||||
* Wrap a throwable to an action result.
|
||||
* @return an action result builder
|
||||
*/
|
||||
public static ResultOrException.Builder buildActionResult(final Throwable t) {
|
||||
ResultOrException.Builder builder = ResultOrException.newBuilder();
|
||||
|
@ -274,7 +275,8 @@ public final class ResponseConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Wrap a throwable to an action result. n * @return an action result builder
|
||||
* Wrap a throwable to an action result.
|
||||
* @return an action result builder
|
||||
*/
|
||||
public static ResultOrException.Builder buildActionResult(final ClientProtos.Result r) {
|
||||
ResultOrException.Builder builder = ResultOrException.newBuilder();
|
||||
|
@ -282,9 +284,7 @@ public final class ResponseConverter {
|
|||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* n * @return NameValuePair of the exception name to stringified version os exception.
|
||||
*/
|
||||
/** Returns NameValuePair of the exception name to stringified version os exception. */
|
||||
public static NameBytesPair buildException(final Throwable t) {
|
||||
NameBytesPair.Builder parameterBuilder = NameBytesPair.newBuilder();
|
||||
parameterBuilder.setName(t.getClass().getName());
|
||||
|
@ -325,7 +325,8 @@ public final class ResponseConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* A utility to build a GetServerInfoResponse. nn * @return the response
|
||||
* A utility to build a GetServerInfoResponse.
|
||||
* @return the response
|
||||
*/
|
||||
public static GetServerInfoResponse buildGetServerInfoResponse(final ServerName serverName,
|
||||
final int webuiPort) {
|
||||
|
@ -340,7 +341,8 @@ public final class ResponseConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* A utility to build a GetOnlineRegionResponse. n * @return the response
|
||||
* A utility to build a GetOnlineRegionResponse.
|
||||
* @return the response
|
||||
*/
|
||||
public static GetOnlineRegionResponse
|
||||
buildGetOnlineRegionResponse(final List<RegionInfo> regions) {
|
||||
|
@ -424,7 +426,7 @@ public final class ResponseConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create Results from the cells using the cells meta data. nnn
|
||||
* Create Results from the cells using the cells meta data.
|
||||
*/
|
||||
public static Result[] getResults(CellScanner cellScanner, ScanResponse response)
|
||||
throws IOException {
|
||||
|
|
|
@ -91,7 +91,7 @@ public class Writables {
|
|||
* @return The passed Writable after its readFields has been called fed by the passed
|
||||
* <code>bytes</code> array or IllegalArgumentException if passed null or an empty
|
||||
* <code>bytes</code> array.
|
||||
* @throws IOException e n
|
||||
* @throws IOException e
|
||||
*/
|
||||
public static Writable getWritable(final byte[] bytes, final Writable w) throws IOException {
|
||||
return getWritable(bytes, 0, bytes.length, w);
|
||||
|
@ -107,7 +107,7 @@ public class Writables {
|
|||
* @return The passed Writable after its readFields has been called fed by the passed
|
||||
* <code>bytes</code> array or IllegalArgumentException if passed null or an empty
|
||||
* <code>bytes</code> array.
|
||||
* @throws IOException e n
|
||||
* @throws IOException e
|
||||
*/
|
||||
public static Writable getWritable(final byte[] bytes, final int offset, final int length,
|
||||
final Writable w) throws IOException {
|
||||
|
|
|
@ -148,7 +148,7 @@ public class ZNodePaths {
|
|||
|
||||
/**
|
||||
* Parses the meta replicaId from the passed path.
|
||||
* @param path the name of the full path which includes baseZNode. n
|
||||
* @param path the name of the full path which includes baseZNode.
|
||||
*/
|
||||
public int getMetaReplicaIdFromPath(String path) {
|
||||
// Extract the znode from path. The prefix is of the following format.
|
||||
|
@ -159,7 +159,7 @@ public class ZNodePaths {
|
|||
|
||||
/**
|
||||
* Parse the meta replicaId from the passed znode
|
||||
* @param znode the name of the znode, does not include baseZNode n
|
||||
* @param znode the name of the znode, does not include baseZNode
|
||||
*/
|
||||
public int getMetaReplicaIdFromZNode(String znode) {
|
||||
return znode.equals(metaZNodePrefix)
|
||||
|
|
|
@ -212,7 +212,7 @@ public class TestClientNoCluster extends Configured implements Tool {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test that operation timeout prevails over rpc default timeout and retries, etc. n
|
||||
* Test that operation timeout prevails over rpc default timeout and retries, etc.
|
||||
*/
|
||||
@Test
|
||||
public void testRpcTimeout() throws IOException {
|
||||
|
@ -600,8 +600,8 @@ public class TestClientNoCluster extends Configured implements Tool {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param name region name or encoded region name. n * @return True if we are dealing with a
|
||||
* hbase:meta region.
|
||||
* @param name region name or encoded region name.
|
||||
* @return True if we are dealing with a hbase:meta region.
|
||||
*/
|
||||
static boolean isMetaRegion(final byte[] name, final RegionSpecifierType type) {
|
||||
switch (type) {
|
||||
|
@ -656,8 +656,9 @@ public class TestClientNoCluster extends Configured implements Tool {
|
|||
|
||||
/**
|
||||
* Format passed integer. Zero-pad. Copied from hbase-server PE class and small amendment. Make
|
||||
* them share. n * @return Returns zero-prefixed 10-byte wide decimal version of passed number
|
||||
* (Does absolute in case number is negative).
|
||||
* them share.
|
||||
* @return Returns zero-prefixed 10-byte wide decimal version of passed number (Does absolute in
|
||||
* case number is negative).
|
||||
*/
|
||||
private static byte[] format(final long number) {
|
||||
byte[] b = new byte[10];
|
||||
|
@ -669,9 +670,7 @@ public class TestClientNoCluster extends Configured implements Tool {
|
|||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* nn * @return <code>count</code> regions
|
||||
*/
|
||||
/** Returns <code>count</code> regions */
|
||||
private static HRegionInfo[] makeHRegionInfos(final byte[] tableName, final int count,
|
||||
final long namespaceSpan) {
|
||||
byte[] startKey = HConstants.EMPTY_BYTE_ARRAY;
|
||||
|
@ -691,9 +690,7 @@ public class TestClientNoCluster extends Configured implements Tool {
|
|||
return hris;
|
||||
}
|
||||
|
||||
/**
|
||||
* n * @return Return <code>count</code> servernames.
|
||||
*/
|
||||
/** Returns Return <code>count</code> servernames. */
|
||||
private static ServerName[] makeServerNames(final int count) {
|
||||
ServerName[] sns = new ServerName[count];
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
@ -736,7 +733,7 @@ public class TestClientNoCluster extends Configured implements Tool {
|
|||
}
|
||||
|
||||
/**
|
||||
* Code for each 'client' to run. nnnn
|
||||
* Code for each 'client' to run.
|
||||
*/
|
||||
static void cycle(int id, final Configuration c, final Connection sharedConnection)
|
||||
throws IOException {
|
||||
|
@ -853,7 +850,7 @@ public class TestClientNoCluster extends Configured implements Tool {
|
|||
|
||||
/**
|
||||
* Run a client instance against a faked up server.
|
||||
* @param args TODO n
|
||||
* @param args TODO
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.exit(ToolRunner.run(HBaseConfiguration.create(), new TestClientNoCluster(), args));
|
||||
|
|
|
@ -42,7 +42,7 @@ public class TestDeleteTimeStamp {
|
|||
private static final byte[] QUALIFIER = Bytes.toBytes("testQualifier");
|
||||
|
||||
/*
|
||||
* Test for verifying that the timestamp in delete object is being honored. n
|
||||
* Test for verifying that the timestamp in delete object is being honored.
|
||||
*/
|
||||
@Test
|
||||
public void testTimeStamp() {
|
||||
|
|
|
@ -100,7 +100,8 @@ public final class AuthUtil {
|
|||
/**
|
||||
* For kerberized cluster, return login user (from kinit or from keytab if specified). For
|
||||
* non-kerberized cluster, return system user.
|
||||
* @param conf configuartion file n * @throws IOException login exception
|
||||
* @param conf configuartion file
|
||||
* @throws IOException login exception
|
||||
*/
|
||||
@InterfaceAudience.Private
|
||||
public static User loginClient(Configuration conf) throws IOException {
|
||||
|
@ -160,7 +161,8 @@ public final class AuthUtil {
|
|||
* <p>
|
||||
* NOT recommend to use to method unless you're sure what you're doing, it is for canary only.
|
||||
* Please use User#loginClient.
|
||||
* @param conf configuration file n * @throws IOException login exception
|
||||
* @param conf configuration file
|
||||
* @throws IOException login exception
|
||||
*/
|
||||
private static User loginClientAsService(Configuration conf) throws IOException {
|
||||
UserProvider provider = UserProvider.instantiate(conf);
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ByteBufferKeyOnlyKeyValue extends ByteBufferExtendedCell {
|
|||
|
||||
/**
|
||||
* A setter that helps to avoid object creation every time and whenever there is a need to create
|
||||
* new OffheapKeyOnlyKeyValue. nnn
|
||||
* new OffheapKeyOnlyKeyValue.
|
||||
*/
|
||||
public void setKey(ByteBuffer key, int offset, int length) {
|
||||
setKey(key, offset, length, ByteBufferUtils.toShort(key, offset));
|
||||
|
|
|
@ -48,7 +48,7 @@ public interface CellBuilder {
|
|||
Cell build();
|
||||
|
||||
/**
|
||||
* Remove all internal elements from builder. n
|
||||
* Remove all internal elements from builder.
|
||||
*/
|
||||
CellBuilder clear();
|
||||
}
|
||||
|
|
|
@ -662,9 +662,8 @@ public class CellComparatorImpl implements CellComparator {
|
|||
/**
|
||||
* Compares the row part of the cell with a simple plain byte[] like the stopRow in Scan. This
|
||||
* should be used with context where for hbase:meta cells the
|
||||
* {{@link MetaCellComparator#META_COMPARATOR} should be used n * the cell to be compared n * the
|
||||
* kv serialized byte[] to be compared with n * the offset in the byte[] n * the length in the
|
||||
* byte[]
|
||||
* {{@link MetaCellComparator#META_COMPARATOR} should be used the cell to be compared the kv
|
||||
* serialized byte[] to be compared with the offset in the byte[] the length in the byte[]
|
||||
* @return 0 if both cell and the byte[] are equal, 1 if the cell is bigger than byte[], -1
|
||||
* otherwise
|
||||
*/
|
||||
|
|
|
@ -584,9 +584,7 @@ public final class CellUtil {
|
|||
return PrivateCellUtil.createCell(cell, value, tags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return CellScanner interface over <code>cellIterables</code>
|
||||
*/
|
||||
/** Returns CellScanner interface over <code>cellIterables</code> */
|
||||
public static CellScanner
|
||||
createCellScanner(final List<? extends CellScannable> cellScannerables) {
|
||||
return new CellScanner() {
|
||||
|
@ -612,16 +610,14 @@ public final class CellUtil {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return CellScanner interface over <code>cellIterable</code>
|
||||
*/
|
||||
/** Returns CellScanner interface over <code>cellIterable</code> */
|
||||
public static CellScanner createCellScanner(final Iterable<Cell> cellIterable) {
|
||||
if (cellIterable == null) return null;
|
||||
return createCellScanner(cellIterable.iterator());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return CellScanner interface over <code>cellIterable</code> or null if <code>cells</code> is
|
||||
* Returns CellScanner interface over <code>cellIterable</code> or null if <code>cells</code> is
|
||||
* null
|
||||
*/
|
||||
public static CellScanner createCellScanner(final Iterator<Cell> cells) {
|
||||
|
@ -644,9 +640,7 @@ public final class CellUtil {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return CellScanner interface over <code>cellArray</code>
|
||||
*/
|
||||
/** Returns CellScanner interface over <code>cellArray</code> */
|
||||
public static CellScanner createCellScanner(final Cell[] cellArray) {
|
||||
return new CellScanner() {
|
||||
private final Cell[] cells = cellArray;
|
||||
|
|
|
@ -145,7 +145,7 @@ public class CompoundConfiguration extends Configuration {
|
|||
/**
|
||||
* Add Bytes map to config list. This map is generally created by HTableDescriptor or
|
||||
* HColumnDescriptor, but can be abstractly used. The added configuration overrides the previous
|
||||
* ones if there are name collisions. n * Bytes map
|
||||
* ones if there are name collisions. Bytes map
|
||||
* @return this, for builder pattern
|
||||
*/
|
||||
public CompoundConfiguration addBytesMap(final Map<Bytes, Bytes> map) {
|
||||
|
|
|
@ -41,7 +41,7 @@ public interface ExtendedCell extends RawCell, HeapSize {
|
|||
* <tags></code>
|
||||
* @param out Stream to which cell has to be written
|
||||
* @param withTags Whether to write tags.
|
||||
* @return how many bytes are written. n
|
||||
* @return how many bytes are written.
|
||||
*/
|
||||
// TODO remove the boolean param once HBASE-16706 is done.
|
||||
default int write(OutputStream out, boolean withTags) throws IOException {
|
||||
|
|
|
@ -235,7 +235,7 @@ public class HBaseConfiguration extends Configuration {
|
|||
* @param conf configuration instance for accessing the passwords
|
||||
* @param alias the name of the password element
|
||||
* @param defPass the default password
|
||||
* @return String password or default password n
|
||||
* @return String password or default password
|
||||
*/
|
||||
public static String getPassword(Configuration conf, String alias, String defPass)
|
||||
throws IOException {
|
||||
|
|
|
@ -1840,8 +1840,8 @@ public class KeyValue implements ExtendedCell, Cloneable {
|
|||
* Compare columnFamily, qualifier, timestamp, and key type (everything except the row). This
|
||||
* method is used both in the normal comparator and the "same-prefix" comparator. Note that we
|
||||
* are assuming that row portions of both KVs have already been parsed and found identical, and
|
||||
* we don't validate that assumption here. n * the length of the common prefix of the two
|
||||
* key-values being compared, including row length and row
|
||||
* we don't validate that assumption here. the length of the common prefix of the two key-values
|
||||
* being compared, including row length and row
|
||||
*/
|
||||
private int compareWithoutRow(int commonPrefix, byte[] left, int loffset, int llength,
|
||||
byte[] right, int roffset, int rlength, short rowlength) {
|
||||
|
|
|
@ -55,8 +55,8 @@ public class KeyValueTestUtil {
|
|||
|
||||
/**
|
||||
* Checks whether KeyValues from kvCollection2 are contained in kvCollection1. The comparison is
|
||||
* made without distinguishing MVCC version of the KeyValues nn * @return true if KeyValues from
|
||||
* kvCollection2 are contained in kvCollection1
|
||||
* made without distinguishing MVCC version of the KeyValues
|
||||
* @return true if KeyValues from kvCollection2 are contained in kvCollection1
|
||||
*/
|
||||
public static boolean containsIgnoreMvccVersion(Collection<? extends Cell> kvCollection1,
|
||||
Collection<? extends Cell> kvCollection2) {
|
||||
|
|
|
@ -58,8 +58,8 @@ public class KeyValueUtil {
|
|||
|
||||
/**
|
||||
* Returns number of bytes this cell's key part would have been used if serialized as in
|
||||
* {@link KeyValue}. Key includes rowkey, family, qualifier, timestamp and type. n * @return the
|
||||
* key length
|
||||
* {@link KeyValue}. Key includes rowkey, family, qualifier, timestamp and type.
|
||||
* @return the key length
|
||||
*/
|
||||
public static int keyLength(final Cell cell) {
|
||||
return keyLength(cell.getRowLength(), cell.getFamilyLength(), cell.getQualifierLength());
|
||||
|
@ -96,8 +96,8 @@ public class KeyValueUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* The position will be set to the beginning of the new ByteBuffer n * @return the Bytebuffer
|
||||
* containing the key part of the cell
|
||||
* The position will be set to the beginning of the new ByteBuffer
|
||||
* @return the Bytebuffer containing the key part of the cell
|
||||
*/
|
||||
public static ByteBuffer copyKeyToNewByteBuffer(final Cell cell) {
|
||||
byte[] bytes = new byte[keyLength(cell)];
|
||||
|
@ -107,8 +107,8 @@ public class KeyValueUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Copies the key to a new KeyValue n * @return the KeyValue that consists only the key part of
|
||||
* the incoming cell
|
||||
* Copies the key to a new KeyValue
|
||||
* @return the KeyValue that consists only the key part of the incoming cell
|
||||
*/
|
||||
public static KeyValue toNewKeyCell(final Cell cell) {
|
||||
byte[] bytes = new byte[keyLength(cell)];
|
||||
|
@ -203,7 +203,7 @@ public class KeyValueUtil {
|
|||
|
||||
/**
|
||||
* Creates a new KeyValue object positioned in the supplied ByteBuffer and sets the ByteBuffer's
|
||||
* position to the start of the next KeyValue. Does not allocate a new array or copy data. nnn
|
||||
* position to the start of the next KeyValue. Does not allocate a new array or copy data.
|
||||
*/
|
||||
public static KeyValue nextShallowCopy(final ByteBuffer bb, final boolean includesMvccVersion,
|
||||
boolean includesTags) {
|
||||
|
@ -236,7 +236,8 @@ public class KeyValueUtil {
|
|||
|
||||
/**
|
||||
* Decrement the timestamp. For tests (currently wasteful) Remember timestamps are sorted reverse
|
||||
* chronologically. n * @return previous key
|
||||
* chronologically.
|
||||
* @return previous key
|
||||
*/
|
||||
public static KeyValue previousKey(final KeyValue in) {
|
||||
return createFirstOnRow(CellUtil.cloneRow(in), CellUtil.cloneFamily(in),
|
||||
|
@ -246,9 +247,8 @@ public class KeyValueUtil {
|
|||
/**
|
||||
* Create a KeyValue for the specified row, family and qualifier that would be larger than or
|
||||
* equal to all other possible KeyValues that have the same row, family, qualifier. Used for
|
||||
* reseeking. Should NEVER be returned to a client. n * row key n * row offset n * row length n *
|
||||
* family name n * family offset n * family length n * column qualifier n * qualifier offset n *
|
||||
* qualifier length
|
||||
* reseeking. Should NEVER be returned to a client. row key row offset row length family name
|
||||
* family offset family length column qualifier qualifier offset qualifier length
|
||||
* @return Last possible key on passed row, family, qualifier.
|
||||
*/
|
||||
public static KeyValue createLastOnRow(final byte[] row, final int roffset, final int rlength,
|
||||
|
@ -408,11 +408,11 @@ public class KeyValueUtil {
|
|||
|
||||
/*************** misc **********************************/
|
||||
/**
|
||||
* n * @return <code>cell</code> if it is an object of class {@link KeyValue} else we will return
|
||||
* a new {@link KeyValue} instance made from <code>cell</code> Note: Even if the cell is an object
|
||||
* of any of the subclass of {@link KeyValue}, we will create a new {@link KeyValue} object
|
||||
* wrapping same buffer. This API is used only with MR based tools which expect the type to be
|
||||
* exactly KeyValue. That is the reason for doing this way.
|
||||
* @return <code>cell</code> if it is an object of class {@link KeyValue} else we will return a
|
||||
* new {@link KeyValue} instance made from <code>cell</code> Note: Even if the cell is an
|
||||
* object of any of the subclass of {@link KeyValue}, we will create a new
|
||||
* {@link KeyValue} object wrapping same buffer. This API is used only with MR based tools
|
||||
* which expect the type to be exactly KeyValue. That is the reason for doing this way.
|
||||
* @deprecated without any replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -444,8 +444,9 @@ public class KeyValueUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Write out a KeyValue in the manner in which we used to when KeyValue was a Writable. nn
|
||||
* * @return Length written on stream n * @see #create(DataInput) for the inverse function
|
||||
* Write out a KeyValue in the manner in which we used to when KeyValue was a Writable.
|
||||
* @return Length written on stream
|
||||
* @see #create(DataInput) for the inverse function
|
||||
*/
|
||||
public static long write(final KeyValue kv, final DataOutput out) throws IOException {
|
||||
// This is how the old Writables write used to serialize KVs. Need to figure
|
||||
|
@ -639,7 +640,7 @@ public class KeyValueUtil {
|
|||
* @param in inputStream to read.
|
||||
* @param withTags whether the keyvalue should include tags are not
|
||||
* @return Created KeyValue OR if we find a length of zero, we will return null which can be
|
||||
* useful marking a stream as done. n
|
||||
* useful marking a stream as done.
|
||||
*/
|
||||
public static KeyValue createKeyValueFromInputStream(InputStream in, boolean withTags)
|
||||
throws IOException {
|
||||
|
@ -663,24 +664,24 @@ public class KeyValueUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* n * @return A KeyValue made of a byte array that holds the key-only part. Needed to convert
|
||||
* hfile index members to KeyValues.
|
||||
* Returns a KeyValue made of a byte array that holds the key-only part. Needed to convert hfile
|
||||
* index members to KeyValues.
|
||||
*/
|
||||
public static KeyValue createKeyValueFromKey(final byte[] b) {
|
||||
return createKeyValueFromKey(b, 0, b.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* n * @return A KeyValue made of a byte buffer that holds the key-only part. Needed to convert
|
||||
* hfile index members to KeyValues.
|
||||
* Return a KeyValue made of a byte buffer that holds the key-only part. Needed to convert hfile
|
||||
* index members to KeyValues.
|
||||
*/
|
||||
public static KeyValue createKeyValueFromKey(final ByteBuffer bb) {
|
||||
return createKeyValueFromKey(bb.array(), bb.arrayOffset(), bb.limit());
|
||||
}
|
||||
|
||||
/**
|
||||
* nnn * @return A KeyValue made of a byte array that holds the key-only part. Needed to convert
|
||||
* hfile index members to KeyValues.
|
||||
* Return a KeyValue made of a byte array that holds the key-only part. Needed to convert hfile
|
||||
* index members to KeyValues.
|
||||
*/
|
||||
public static KeyValue createKeyValueFromKey(final byte[] b, final int o, final int l) {
|
||||
byte[] newb = new byte[l + KeyValue.ROW_OFFSET];
|
||||
|
@ -691,19 +692,19 @@ public class KeyValueUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* n * Where to read bytes from. Creates a byte array to hold the KeyValue backing bytes copied
|
||||
* from the steam.
|
||||
* Where to read bytes from. Creates a byte array to hold the KeyValue backing bytes copied from
|
||||
* the steam.
|
||||
* @return KeyValue created by deserializing from <code>in</code> OR if we find a length of zero,
|
||||
* we will return null which can be useful marking a stream as done. n
|
||||
* we will return null which can be useful marking a stream as done.
|
||||
*/
|
||||
public static KeyValue create(final DataInput in) throws IOException {
|
||||
return create(in.readInt(), in);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a KeyValue reading <code>length</code> from <code>in</code> nn * @return Created
|
||||
* KeyValue OR if we find a length of zero, we will return null which can be useful marking a
|
||||
* stream as done. n
|
||||
* Create a KeyValue reading <code>length</code> from <code>in</code>
|
||||
* @return Created KeyValue OR if we find a length of zero, we will return null which can be
|
||||
* useful marking a stream as done.
|
||||
*/
|
||||
public static KeyValue create(int length, final DataInput in) throws IOException {
|
||||
|
||||
|
|
|
@ -1019,7 +1019,7 @@ public final class PrivateCellUtil {
|
|||
* Writes the row from the given cell to the output stream excluding the common prefix
|
||||
* @param out The dataoutputstream to which the data has to be written
|
||||
* @param cell The cell whose contents has to be written
|
||||
* @param rlength the row length n
|
||||
* @param rlength the row length
|
||||
*/
|
||||
public static void writeRowSkippingBytes(DataOutputStream out, Cell cell, short rlength,
|
||||
int commonPrefix) throws IOException {
|
||||
|
@ -1207,7 +1207,6 @@ public final class PrivateCellUtil {
|
|||
|
||||
/**
|
||||
* Compares only the key portion of a cell. It does not include the sequence id/mvcc of the cell
|
||||
* nn
|
||||
* @return an int greater than 0 if left > than right lesser than 0 if left < than right
|
||||
* equal to 0 if left is equal to right
|
||||
*/
|
||||
|
@ -2168,7 +2167,7 @@ public final class PrivateCellUtil {
|
|||
/**
|
||||
* Writes the Cell's key part as it would have serialized in a KeyValue. The format is <2 bytes
|
||||
* rk len><rk><1 byte cf len><cf><qualifier><8 bytes
|
||||
* timestamp><1 byte type> nnn
|
||||
* timestamp><1 byte type>
|
||||
*/
|
||||
public static void writeFlatKey(Cell cell, DataOutput out) throws IOException {
|
||||
short rowLen = cell.getRowLength();
|
||||
|
@ -2200,7 +2199,7 @@ public final class PrivateCellUtil {
|
|||
/**
|
||||
* Deep clones the given cell if the cell supports deep cloning
|
||||
* @param cell the cell to be cloned
|
||||
* @return the cloned cell n
|
||||
* @return the cloned cell
|
||||
*/
|
||||
public static Cell deepClone(Cell cell) throws CloneNotSupportedException {
|
||||
if (cell instanceof ExtendedCell) {
|
||||
|
@ -2214,7 +2213,7 @@ public final class PrivateCellUtil {
|
|||
* @param cell the cell to be written
|
||||
* @param out the outputstream
|
||||
* @param withTags if tags are to be written or not
|
||||
* @return the total bytes written n
|
||||
* @return the total bytes written
|
||||
*/
|
||||
public static int writeCell(Cell cell, OutputStream out, boolean withTags) throws IOException {
|
||||
if (cell instanceof ExtendedCell) {
|
||||
|
@ -2289,8 +2288,8 @@ public final class PrivateCellUtil {
|
|||
|
||||
/**
|
||||
* Sets the given seqId to the cell. Marked as audience Private as of 1.2.0. Setting a Cell
|
||||
* sequenceid is an internal implementation detail not for general public use. nn * @throws
|
||||
* IOException when the passed cell is not of type {@link ExtendedCell}
|
||||
* sequenceid is an internal implementation detail not for general public use.
|
||||
* @throws IOException when the passed cell is not of type {@link ExtendedCell}
|
||||
*/
|
||||
public static void setSequenceId(Cell cell, long seqId) throws IOException {
|
||||
if (cell instanceof ExtendedCell) {
|
||||
|
@ -2302,8 +2301,8 @@ public final class PrivateCellUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the given timestamp to the cell. nn * @throws IOException when the passed cell is not of
|
||||
* type {@link ExtendedCell}
|
||||
* Sets the given timestamp to the cell.
|
||||
* @throws IOException when the passed cell is not of type {@link ExtendedCell}
|
||||
*/
|
||||
public static void setTimestamp(Cell cell, long ts) throws IOException {
|
||||
if (cell instanceof ExtendedCell) {
|
||||
|
@ -2359,7 +2358,7 @@ public final class PrivateCellUtil {
|
|||
* Writes the row from the given cell to the output stream
|
||||
* @param out The outputstream to which the data has to be written
|
||||
* @param cell The cell whose contents has to be written
|
||||
* @param rlength the row length n
|
||||
* @param rlength the row length
|
||||
*/
|
||||
public static void writeRow(OutputStream out, Cell cell, short rlength) throws IOException {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2374,7 +2373,7 @@ public final class PrivateCellUtil {
|
|||
* Writes the family from the given cell to the output stream
|
||||
* @param out The outputstream to which the data has to be written
|
||||
* @param cell The cell whose contents has to be written
|
||||
* @param flength the family length n
|
||||
* @param flength the family length
|
||||
*/
|
||||
public static void writeFamily(OutputStream out, Cell cell, byte flength) throws IOException {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2389,7 +2388,7 @@ public final class PrivateCellUtil {
|
|||
* Writes the qualifier from the given cell to the output stream
|
||||
* @param out The outputstream to which the data has to be written
|
||||
* @param cell The cell whose contents has to be written
|
||||
* @param qlength the qualifier length n
|
||||
* @param qlength the qualifier length
|
||||
*/
|
||||
public static void writeQualifier(OutputStream out, Cell cell, int qlength) throws IOException {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2405,7 +2404,7 @@ public final class PrivateCellUtil {
|
|||
* Writes the qualifier from the given cell to the output stream excluding the common prefix
|
||||
* @param out The dataoutputstream to which the data has to be written
|
||||
* @param cell The cell whose contents has to be written
|
||||
* @param qlength the qualifier length n
|
||||
* @param qlength the qualifier length
|
||||
*/
|
||||
public static void writeQualifierSkippingBytes(DataOutputStream out, Cell cell, int qlength,
|
||||
int commonPrefix) throws IOException {
|
||||
|
@ -2424,7 +2423,7 @@ public final class PrivateCellUtil {
|
|||
* Writes the value from the given cell to the output stream
|
||||
* @param out The outputstream to which the data has to be written
|
||||
* @param cell The cell whose contents has to be written
|
||||
* @param vlength the value length n
|
||||
* @param vlength the value length
|
||||
*/
|
||||
public static void writeValue(OutputStream out, Cell cell, int vlength) throws IOException {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2439,7 +2438,7 @@ public final class PrivateCellUtil {
|
|||
* Writes the tag from the given cell to the output stream
|
||||
* @param out The outputstream to which the data has to be written
|
||||
* @param cell The cell whose contents has to be written
|
||||
* @param tagsLength the tag length n
|
||||
* @param tagsLength the tag length
|
||||
*/
|
||||
public static void writeTags(OutputStream out, Cell cell, int tagsLength) throws IOException {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2472,7 +2471,8 @@ public final class PrivateCellUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Converts the rowkey bytes of the given cell into an int value n * @return rowkey as int
|
||||
* Converts the rowkey bytes of the given cell into an int value
|
||||
* @return rowkey as int
|
||||
*/
|
||||
public static int getRowAsInt(Cell cell) {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2483,7 +2483,8 @@ public final class PrivateCellUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Converts the value bytes of the given cell into a long value n * @return value as long
|
||||
* Converts the value bytes of the given cell into a long value
|
||||
* @return value as long
|
||||
*/
|
||||
public static long getValueAsLong(Cell cell) {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2494,7 +2495,8 @@ public final class PrivateCellUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Converts the value bytes of the given cell into a int value n * @return value as int
|
||||
* Converts the value bytes of the given cell into a int value
|
||||
* @return value as int
|
||||
*/
|
||||
public static int getValueAsInt(Cell cell) {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2505,7 +2507,8 @@ public final class PrivateCellUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Converts the value bytes of the given cell into a double value n * @return value as double
|
||||
* Converts the value bytes of the given cell into a double value
|
||||
* @return value as double
|
||||
*/
|
||||
public static double getValueAsDouble(Cell cell) {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2516,7 +2519,8 @@ public final class PrivateCellUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Converts the value bytes of the given cell into a BigDecimal n * @return value as BigDecimal
|
||||
* Converts the value bytes of the given cell into a BigDecimal
|
||||
* @return value as BigDecimal
|
||||
*/
|
||||
public static BigDecimal getValueAsBigDecimal(Cell cell) {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2737,8 +2741,9 @@ public final class PrivateCellUtil {
|
|||
/**
|
||||
* Estimate based on keyvalue's serialization format in the RPC layer. Note that there is an extra
|
||||
* SIZEOF_INT added to the size here that indicates the actual length of the cell for cases where
|
||||
* cell's are serialized in a contiguous format (For eg in RPCs). n * @return Estimate of the
|
||||
* <code>cell</code> size in bytes plus an extra SIZEOF_INT indicating the actual cell length.
|
||||
* cell's are serialized in a contiguous format (For eg in RPCs).
|
||||
* @return Estimate of the <code>cell</code> size in bytes plus an extra SIZEOF_INT indicating the
|
||||
* actual cell length.
|
||||
*/
|
||||
public static int estimatedSerializedSizeOf(final Cell cell) {
|
||||
return cell.getSerializedSize() + Bytes.SIZEOF_INT;
|
||||
|
@ -2758,9 +2763,9 @@ public final class PrivateCellUtil {
|
|||
/**
|
||||
* This method exists just to encapsulate how we serialize keys. To be replaced by a factory that
|
||||
* we query to figure what the Cell implementation is and then, what serialization engine to use
|
||||
* and further, how to serialize the key for inclusion in hfile index. TODO. n * @return The key
|
||||
* portion of the Cell serialized in the old-school KeyValue way or null if passed a null
|
||||
* <code>cell</code>
|
||||
* and further, how to serialize the key for inclusion in hfile index. TODO.
|
||||
* @return The key portion of the Cell serialized in the old-school KeyValue way or null if passed
|
||||
* a null <code>cell</code>
|
||||
*/
|
||||
public static byte[] getCellKeySerializedAsKeyValueKey(final Cell cell) {
|
||||
if (cell == null) return null;
|
||||
|
@ -2770,8 +2775,8 @@ public final class PrivateCellUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a Cell that is smaller than all other possible Cells for the given Cell's row. n
|
||||
* * @return First possible Cell on passed Cell's row.
|
||||
* Create a Cell that is smaller than all other possible Cells for the given Cell's row.
|
||||
* @return First possible Cell on passed Cell's row.
|
||||
*/
|
||||
public static Cell createFirstOnRow(final Cell cell) {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2835,8 +2840,8 @@ public final class PrivateCellUtil {
|
|||
|
||||
/**
|
||||
* Create a Cell that is smaller than all other possible Cells for the given Cell's rk:cf and
|
||||
* passed qualifier. nnnn * @return Last possible Cell on passed Cell's rk:cf and passed
|
||||
* qualifier.
|
||||
* passed qualifier.
|
||||
* @return Last possible Cell on passed Cell's rk:cf and passed qualifier.
|
||||
*/
|
||||
public static Cell createFirstOnRowCol(final Cell cell, byte[] qArray, int qoffest, int qlength) {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2856,7 +2861,7 @@ public final class PrivateCellUtil {
|
|||
* Creates the first cell with the row/family/qualifier of this cell and the given timestamp. Uses
|
||||
* the "maximum" type that guarantees that the new cell is the lowest possible for this
|
||||
* combination of row, family, qualifier, and timestamp. This cell's own timestamp is ignored.
|
||||
* @param cell - cell n
|
||||
* @param cell - cell
|
||||
*/
|
||||
public static Cell createFirstOnRowColTS(Cell cell, long ts) {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2874,8 +2879,8 @@ public final class PrivateCellUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a Cell that is larger than all other possible Cells for the given Cell's row. n
|
||||
* * @return Last possible Cell on passed Cell's row.
|
||||
* Create a Cell that is larger than all other possible Cells for the given Cell's row.
|
||||
* @return Last possible Cell on passed Cell's row.
|
||||
*/
|
||||
public static Cell createLastOnRow(final Cell cell) {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
@ -2892,7 +2897,8 @@ public final class PrivateCellUtil {
|
|||
/**
|
||||
* Create a Cell that is larger than all other possible Cells for the given Cell's rk:cf:q. Used
|
||||
* in creating "fake keys" for the multi-column Bloom filter optimization to skip the row/column
|
||||
* we already know is not in the file. n * @return Last possible Cell on passed Cell's rk:cf:q.
|
||||
* we already know is not in the file.
|
||||
* @return Last possible Cell on passed Cell's rk:cf:q.
|
||||
*/
|
||||
public static Cell createLastOnRowCol(final Cell cell) {
|
||||
if (cell instanceof ByteBufferExtendedCell) {
|
||||
|
|
|
@ -95,7 +95,7 @@ public abstract class BaseDecoder implements Codec.Decoder {
|
|||
/**
|
||||
* Extract a Cell.
|
||||
* @return a parsed Cell or throws an Exception. EOFException or a generic IOException maybe
|
||||
* thrown if EOF is reached prematurely. Does not return null. n
|
||||
* thrown if EOF is reached prematurely. Does not return null.
|
||||
*/
|
||||
@NonNull
|
||||
protected abstract Cell parseCell() throws IOException;
|
||||
|
|
|
@ -62,7 +62,7 @@ public class CellCodec implements Codec {
|
|||
}
|
||||
|
||||
/**
|
||||
* Write int length followed by array bytes. nnnn
|
||||
* Write int length followed by array bytes.
|
||||
*/
|
||||
private void write(final byte[] bytes, final int offset, final int length) throws IOException {
|
||||
// TODO add BB backed os check and do for write. Pass Cell
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue