HBASE-27401 Clean up current broken 'n's in our javadoc (#4812)

Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
Duo Zhang 2022-10-06 18:17:34 +08:00 committed by GitHub
parent feccf958e1
commit 63cdd026f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
497 changed files with 2090 additions and 2099 deletions

View File

@ -368,7 +368,7 @@ public final class FanOutOneBlockAsyncDFSOutputSaslHelper {
* Create a ByteString from byte array without copying (wrap), and then set it as the payload * Create a ByteString from byte array without copying (wrap), and then set it as the payload
* for the builder. * for the builder.
* @param builder builder for HDFS DataTransferEncryptorMessage. * @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, static void wrapAndSetPayload(DataTransferEncryptorMessageProto.Builder builder,
byte[] payload) throws IOException { byte[] payload) throws IOException {

View File

@ -165,7 +165,7 @@ public class BackupManager implements Closeable {
} }
/** /**
* Get configuration n * Get configuration
*/ */
Configuration getConf() { Configuration getConf() {
return conf; return conf;
@ -192,7 +192,8 @@ public class BackupManager implements Closeable {
* @param tableList table list * @param tableList table list
* @param targetRootDir root dir * @param targetRootDir root dir
* @param workers number of parallel workers * @param workers number of parallel workers
* @param bandwidth bandwidth per worker in MB per sec n * @throws BackupException exception * @param bandwidth bandwidth per worker in MB per sec
* @throws BackupException exception
*/ */
public BackupInfo createBackupInfo(String backupId, BackupType type, List<TableName> tableList, public BackupInfo createBackupInfo(String backupId, BackupType type, List<TableName> tableList,
String targetRootDir, int workers, long bandwidth) throws BackupException { String targetRootDir, int workers, long bandwidth) throws BackupException {

View File

@ -184,9 +184,7 @@ public class FavoredNodeAssignmentHelper {
return servers; return servers;
} }
/** /** Returns PB'ed bytes of {@link FavoredNodes} generated by the server list. */
* n * @return PB'ed bytes of {@link FavoredNodes} generated by the server list.
*/
public static byte[] getFavoredNodes(List<ServerName> serverAddrList) { public static byte[] getFavoredNodes(List<ServerName> serverAddrList) {
FavoredNodes.Builder f = FavoredNodes.newBuilder(); FavoredNodes.Builder f = FavoredNodes.newBuilder();
for (ServerName s : serverAddrList) { for (ServerName s : serverAddrList) {
@ -319,8 +317,8 @@ public class FavoredNodeAssignmentHelper {
/** /**
* For regions that share the primary, avoid placing the secondary and tertiary on a same RS. Used * For regions that share the primary, avoid placing the secondary and tertiary on a same RS. Used
* for generating new assignments for the primary/secondary/tertiary RegionServers n * @return the * for generating new assignments for the primary/secondary/tertiary RegionServers
* map of regions to the servers the region-files should be hosted on * @return the map of regions to the servers the region-files should be hosted on
*/ */
public Map<RegionInfo, ServerName[]> public Map<RegionInfo, ServerName[]>
placeSecondaryAndTertiaryWithRestrictions(Map<RegionInfo, ServerName> primaryRSMap) { placeSecondaryAndTertiaryWithRestrictions(Map<RegionInfo, ServerName> primaryRSMap) {

View File

@ -80,7 +80,7 @@ public class FavoredNodesPlan {
/** /**
* Return the position of the server in the favoredNodes list. Assumes the favoredNodes list is of * Return the position of the server in the favoredNodes list. Assumes the favoredNodes list is of
* size 3. n * size 3.
*/ */
public static Position getFavoredServerPosition(List<ServerName> favoredNodes, public static Position getFavoredServerPosition(List<ServerName> favoredNodes,
ServerName server) { ServerName server) {

View File

@ -294,7 +294,7 @@ public class AssignmentVerificationReport {
} }
/** /**
* Use this to project the dispersion scores nnn * Use this to project the dispersion scores
*/ */
public void fillUpDispersion(TableName tableName, SnapshotOfRegionAssignmentFromMeta snapshot, public void fillUpDispersion(TableName tableName, SnapshotOfRegionAssignmentFromMeta snapshot,
FavoredNodesPlan newPlan) { FavoredNodesPlan newPlan) {
@ -566,7 +566,8 @@ public class AssignmentVerificationReport {
/** /**
* Return the number of regions based on the position (primary/secondary/ tertiary) assigned to * Return the number of regions based on the position (primary/secondary/ tertiary) assigned to
* their favored nodes n * @return the number of regions * their favored nodes
* @return the number of regions
*/ */
int getNumRegionsOnFavoredNodeByPosition(FavoredNodesPlan.Position position) { int getNumRegionsOnFavoredNodeByPosition(FavoredNodesPlan.Position position) {
return favoredNodes[position.ordinal()]; return favoredNodes[position.ordinal()];

View File

@ -53,7 +53,8 @@ public class ClusterId {
/** /**
* Parse the serialized representation of the {@link ClusterId} * Parse the serialized representation of the {@link ClusterId}
* @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix * @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 { public static ClusterId parseFrom(final byte[] bytes) throws DeserializationException {
if (ProtobufUtil.isPBMagicPrefix(bytes)) { if (ProtobufUtil.isPBMagicPrefix(bytes)) {
@ -79,9 +80,7 @@ public class ClusterId {
return builder.setClusterId(this.id).build(); return builder.setClusterId(this.id).build();
} }
/** /** Returns A {@link ClusterId} made from the passed in <code>cid</code> */
* n * @return A {@link ClusterId} made from the passed in <code>cid</code>
*/
public static ClusterId convert(final ClusterIdProtos.ClusterId cid) { public static ClusterId convert(final ClusterIdProtos.ClusterId cid) {
return new ClusterId(cid.getClusterId()); return new ClusterId(cid.getClusterId());
} }

View File

@ -80,9 +80,7 @@ public class HRegionLocation implements Comparable<HRegionLocation> {
return this.serverName.hashCode(); return this.serverName.hashCode();
} }
/** /** Returns regionInfo */
* n
*/
public RegionInfo getRegion() { public RegionInfo getRegion() {
return regionInfo; return regionInfo;
} }

View File

@ -34,8 +34,7 @@ public class NotAllMetaRegionsOnlineException extends DoNotRetryIOException {
} }
/** /**
* n * */
*/
public NotAllMetaRegionsOnlineException(String message) { public NotAllMetaRegionsOnlineException(String message) {
super(message); super(message);
} }

View File

@ -76,7 +76,7 @@ public interface ServerMetrics {
Map<String, List<ReplicationLoadSource>> getReplicationLoadSourceMap(); Map<String, List<ReplicationLoadSource>> getReplicationLoadSourceMap();
/** /**
* Call directly from client such as hbase shell n * Call directly from client such as hbase shell
*/ */
@Nullable @Nullable
ReplicationLoadSink getReplicationLoadSink(); ReplicationLoadSink getReplicationLoadSink();

View File

@ -373,9 +373,10 @@ public interface Admin extends Abortable, Closeable {
* Disable table and wait on completion. May timeout eventually. Use * Disable table and wait on completion. May timeout eventually. Use
* {@link #disableTableAsync(org.apache.hadoop.hbase.TableName)} and * {@link #disableTableAsync(org.apache.hadoop.hbase.TableName)} and
* {@link #isTableDisabled(org.apache.hadoop.hbase.TableName)} instead. The table has to be in * {@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 * enabled state for it to be disabled.
* IOException TableNotFoundException means the table doesn't exist. TableNotEnabledException * @throws IOException There could be couple types of IOException TableNotFoundException means the
* means the table isn't in enabled state. * table doesn't exist. TableNotEnabledException means the table isn't in
* enabled state.
*/ */
default void disableTable(TableName tableName) throws IOException { default void disableTable(TableName tableName) throws IOException {
get(disableTableAsync(tableName), getSyncWaitTimeout(), TimeUnit.MILLISECONDS); get(disableTableAsync(tableName), getSyncWaitTimeout(), TimeUnit.MILLISECONDS);
@ -598,7 +599,7 @@ public interface Admin extends Abortable, Closeable {
* then it returns. It does not wait on the completion of Compaction (it can take a while). * then it returns. It does not wait on the completion of Compaction (it can take a while).
* @param tableName table to compact * @param tableName table to compact
* @param compactType {@link org.apache.hadoop.hbase.client.CompactType} * @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) void compact(TableName tableName, CompactType compactType)
throws IOException, InterruptedException; throws IOException, InterruptedException;
@ -610,7 +611,7 @@ public interface Admin extends Abortable, Closeable {
* @param tableName table to compact * @param tableName table to compact
* @param columnFamily column family within a table * @param columnFamily column family within a table
* @param compactType {@link org.apache.hadoop.hbase.client.CompactType} * @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) void compact(TableName tableName, byte[] columnFamily, CompactType compactType)
throws IOException, InterruptedException; throws IOException, InterruptedException;
@ -659,7 +660,7 @@ public interface Admin extends Abortable, Closeable {
* while). * while).
* @param tableName table to compact * @param tableName table to compact
* @param compactType {@link org.apache.hadoop.hbase.client.CompactType} * @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) void majorCompact(TableName tableName, CompactType compactType)
throws IOException, InterruptedException; throws IOException, InterruptedException;
@ -671,7 +672,7 @@ public interface Admin extends Abortable, Closeable {
* @param tableName table to compact * @param tableName table to compact
* @param columnFamily column family within a table * @param columnFamily column family within a table
* @param compactType {@link org.apache.hadoop.hbase.client.CompactType} * @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) void majorCompact(TableName tableName, byte[] columnFamily, CompactType compactType)
throws IOException, InterruptedException; throws IOException, InterruptedException;
@ -1880,7 +1881,7 @@ public interface Admin extends Abortable, Closeable {
/** /**
* Return the set of supported security capabilities. * 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; List<SecurityCapability> getSecurityCapabilities() throws IOException;
@ -2215,7 +2216,7 @@ public interface Admin extends Abortable, Closeable {
* Clear compacting queues on a regionserver. * Clear compacting queues on a regionserver.
* @param serverName the region server name * @param serverName the region server name
* @param queues the set of queue 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) void clearCompactionQueues(ServerName serverName, Set<String> queues)
throws IOException, InterruptedException; throws IOException, InterruptedException;

View File

@ -63,7 +63,7 @@ public class Append extends Mutation {
* <p> * <p>
* This range is used as [minStamp, maxStamp). * This range is used as [minStamp, maxStamp).
* @param minStamp minimum timestamp value, inclusive * @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) { public Append setTimeRange(long minStamp, long maxStamp) {
tr = TimeRange.between(minStamp, maxStamp); tr = TimeRange.between(minStamp, maxStamp);
@ -71,7 +71,7 @@ public class Append extends Mutation {
} }
/** /**
* Gets the TimeRange used for this append. n * Gets the TimeRange used for this append.
*/ */
public TimeRange getTimeRange() { public TimeRange getTimeRange() {
return this.tr; return this.tr;
@ -83,7 +83,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. * interested in the result can save network bandwidth setting this to false.
*/ */
@Override @Override
@ -122,7 +122,7 @@ public class Append extends Mutation {
* Create a Append operation for the specified row. * Create a Append operation for the specified row.
* <p> * <p>
* At least one column must be appended to. * 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) { public Append(final byte[] rowArray, final int rowOffset, final int rowLength) {
checkRow(rowArray, rowOffset, rowLength); checkRow(rowArray, rowOffset, rowLength);
@ -144,7 +144,7 @@ public class Append extends Mutation {
* Add the specified column and value to this Append operation. * Add the specified column and value to this Append operation.
* @param family family name * @param family family name
* @param qualifier column qualifier * @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) { public Append addColumn(byte[] family, byte[] qualifier, byte[] value) {
KeyValue kv = new KeyValue(this.row, family, qualifier, this.ts, KeyValue.Type.Put, value); KeyValue kv = new KeyValue(this.row, family, qualifier, this.ts, KeyValue.Type.Put, value);

View File

@ -211,7 +211,7 @@ public interface AsyncAdmin {
CompletableFuture<Void> enableTable(TableName tableName); 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); CompletableFuture<Void> disableTable(TableName tableName);
@ -1156,7 +1156,7 @@ public interface AsyncAdmin {
CompletableFuture<Void> stopMaster(); CompletableFuture<Void> stopMaster();
/** /**
* Stop the designated regionserver. n * Stop the designated regionserver.
*/ */
CompletableFuture<Void> stopRegionServer(ServerName serverName); CompletableFuture<Void> stopRegionServer(ServerName serverName);
@ -1365,8 +1365,8 @@ public interface AsyncAdmin {
CompletableFuture<Boolean> normalize(NormalizeTableFilterParams ntfp); CompletableFuture<Boolean> normalize(NormalizeTableFilterParams ntfp);
/** /**
* Turn the cleaner chore on/off. n * @return Previous cleaner state wrapped by a * Turn the cleaner chore on/off.
* {@link CompletableFuture} * @return Previous cleaner state wrapped by a {@link CompletableFuture}
*/ */
CompletableFuture<Boolean> cleanerChoreSwitch(boolean on); CompletableFuture<Boolean> cleanerChoreSwitch(boolean on);
@ -1385,8 +1385,8 @@ public interface AsyncAdmin {
CompletableFuture<Boolean> runCleanerChore(); CompletableFuture<Boolean> runCleanerChore();
/** /**
* Turn the catalog janitor on/off. n * @return the previous state wrapped by a * Turn the catalog janitor on/off.
* {@link CompletableFuture} * @return the previous state wrapped by a {@link CompletableFuture}
*/ */
CompletableFuture<Boolean> catalogJanitorSwitch(boolean on); CompletableFuture<Boolean> catalogJanitorSwitch(boolean on);

View File

@ -185,7 +185,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() { synchronized ChoreService getChoreService() {
if (isClosed()) { if (isClosed()) {

View File

@ -133,7 +133,7 @@ public interface ColumnFamilyDescriptor {
int getMinVersions(); int getMinVersions();
/** /**
* Get the mob compact partition policy for this family n * Get the mob compact partition policy for this family
*/ */
MobCompactPartitionPolicy getMobCompactPartitionPolicy(); MobCompactPartitionPolicy getMobCompactPartitionPolicy();

View File

@ -861,8 +861,8 @@ public class ColumnFamilyDescriptorBuilder {
/** /**
* Set whether the tags should be compressed along with DataBlockEncoding. When no * 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 * DataBlockEncoding is been used, this is having no effect.
* invocation) * @return this (for chained invocation)
*/ */
public ModifyableColumnFamilyDescriptor setCompressTags(boolean compressTags) { public ModifyableColumnFamilyDescriptor setCompressTags(boolean compressTags) {
return setValue(COMPRESS_TAGS_BYTES, String.valueOf(compressTags)); return setValue(COMPRESS_TAGS_BYTES, String.valueOf(compressTags));

View File

@ -97,7 +97,7 @@ public class Delete extends Mutation {
* <p> * <p>
* This timestamp is ONLY used for a delete row operation. If specifying families or columns, you * This timestamp is ONLY used for a delete row operation. If specifying families or columns, you
* must specify each timestamp individually. * 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) { public Delete(final byte[] row, final int rowOffset, final int rowLength) {
this(row, rowOffset, rowLength, HConstants.LATEST_TIMESTAMP); this(row, rowOffset, rowLength, HConstants.LATEST_TIMESTAMP);
@ -141,7 +141,7 @@ public class Delete extends Mutation {
/** /**
* Add an existing delete marker to this Delete object. * Add an existing delete marker to this Delete object.
* @param cell An existing cell of type "delete". * @param cell An existing cell of type "delete".
* @return this for invocation chaining n * @return this for invocation chaining
*/ */
@Override @Override
public Delete add(Cell cell) throws IOException { public Delete add(Cell cell) throws IOException {

View File

@ -86,7 +86,7 @@ public class Get extends Query implements Row {
} }
/** /**
* Copy-constructor n * Copy-constructor
*/ */
public Get(Get get) { public Get(Get get) {
this(get.getRow()); this(get.getRow());
@ -125,7 +125,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) { public Get(byte[] row, int rowOffset, int rowLength) {
Mutation.checkRow(row, rowOffset, rowLength); Mutation.checkRow(row, rowOffset, rowLength);
@ -133,7 +133,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) { public Get(ByteBuffer row) {
Mutation.checkRow(row); Mutation.checkRow(row);
@ -294,7 +294,7 @@ public class Get extends Query implements Row {
} }
/** /**
* Method for retrieving the get's row n * Method for retrieving the get's row
*/ */
@Override @Override
public byte[] getRow() { public byte[] getRow() {
@ -326,7 +326,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() { public TimeRange getTimeRange() {
return this.tr; return this.tr;
@ -357,7 +357,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() { public Map<byte[], NavigableSet<byte[]>> getFamilyMap() {
return this.familyMap; return this.familyMap;
@ -365,7 +365,7 @@ public class Get extends Query implements Row {
/** /**
* Compile the table and column family (i.e. schema) information into a String. Useful for parsing * 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 @Override
public Map<String, Object> getFingerprint() { public Map<String, Object> getFingerprint() {
@ -382,7 +382,7 @@ public class Get extends Query implements Row {
* Compile the details beyond the scope of getFingerprint (row, columns, timestamps, etc.) into a * 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 * Map along with the fingerprinted information. Useful for debugging, logging, and administration
* tools. * 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 @Override
public Map<String, Object> toMap(int maxCols) { public Map<String, Object> toMap(int maxCols) {

View File

@ -94,7 +94,8 @@ public class Increment extends Mutation {
/** /**
* Add the specified KeyValue to this operation. * 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 @Override
public Increment add(Cell cell) throws IOException { public Increment add(Cell cell) throws IOException {
@ -123,7 +124,7 @@ public class Increment extends Mutation {
} }
/** /**
* Gets the TimeRange used for this increment. n * Gets the TimeRange used for this increment.
*/ */
public TimeRange getTimeRange() { public TimeRange getTimeRange() {
return this.tr; return this.tr;
@ -141,7 +142,7 @@ public class Increment extends Mutation {
* This range is used as [minStamp, maxStamp). * This range is used as [minStamp, maxStamp).
* @param minStamp minimum timestamp value, inclusive * @param minStamp minimum timestamp value, inclusive
* @param maxStamp maximum timestamp value, exclusive * @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 { public Increment setTimeRange(long minStamp, long maxStamp) throws IOException {
tr = TimeRange.between(minStamp, maxStamp); tr = TimeRange.between(minStamp, maxStamp);
@ -211,8 +212,7 @@ public class Increment extends Mutation {
} }
/** /**
* n * */
*/
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();

View File

@ -179,7 +179,7 @@ class MutableRegionInfo implements RegionInfo {
} }
/** /**
* Get current table name of the region n * Get current table name of the region
*/ */
@Override @Override
public TableName getTable() { public TableName getTable() {
@ -231,7 +231,7 @@ class MutableRegionInfo implements RegionInfo {
/** /**
* Change the split status flag. * Change the split status flag.
* @param split set split status n * @param split set split status
*/ */
public MutableRegionInfo setSplit(boolean split) { public MutableRegionInfo setSplit(boolean split) {
this.split = 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. * The parent of a region split is offline while split daughters hold references to the parent.
* Offlined regions are closed. * Offlined regions are closed.
* @param offLine Set online/offline status. n * @param offLine Set online/offline status.
*/ */
public MutableRegionInfo setOffline(boolean offLine) { public MutableRegionInfo setOffline(boolean offLine) {
this.offLine = offLine; this.offLine = offLine;

View File

@ -205,7 +205,7 @@ public abstract class Mutation extends OperationWithAttributes
* Compile the details beyond the scope of getFingerprint (row, columns, timestamps, etc.) into a * 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 * Map along with the fingerprinted information. Useful for debugging, logging, and administration
* tools. * 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 @Override
public Map<String, Object> toMap(int maxCols) { public Map<String, Object> toMap(int maxCols) {
@ -268,7 +268,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) { public Mutation setDurability(Durability d) {
this.durability = d; this.durability = d;
@ -281,7 +281,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() { public NavigableMap<byte[], List<Cell>> getFamilyCellMap() {
return this.familyMap; return this.familyMap;
@ -296,7 +296,7 @@ public abstract class Mutation extends OperationWithAttributes
} }
/** /**
* Method for retrieving the delete's row n * Method for retrieving the delete's row
*/ */
@Override @Override
public byte[] getRow() { public byte[] getRow() {
@ -304,7 +304,7 @@ public abstract class Mutation extends OperationWithAttributes
} }
/** /**
* Method for retrieving the timestamp. n * Method for retrieving the timestamp.
*/ */
public long getTimestamp() { public long getTimestamp() {
return this.ts; return this.ts;
@ -340,7 +340,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) { public Mutation setCellVisibility(CellVisibility expression) {
this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY,
@ -356,8 +356,8 @@ public abstract class Mutation extends OperationWithAttributes
} }
/** /**
* Create a protocol buffer CellVisibility based on a client CellVisibility. n * @return a * Create a protocol buffer CellVisibility based on a client CellVisibility.
* protocol buffer CellVisibility * @return a protocol buffer CellVisibility
*/ */
static ClientProtos.CellVisibility toCellVisibility(CellVisibility cellVisibility) { static ClientProtos.CellVisibility toCellVisibility(CellVisibility cellVisibility) {
ClientProtos.CellVisibility.Builder builder = ClientProtos.CellVisibility.newBuilder(); ClientProtos.CellVisibility.Builder builder = ClientProtos.CellVisibility.newBuilder();
@ -366,8 +366,8 @@ public abstract class Mutation extends OperationWithAttributes
} }
/** /**
* Convert a protocol buffer CellVisibility to a client CellVisibility n * @return the converted * Convert a protocol buffer CellVisibility to a client CellVisibility
* client CellVisibility * @return the converted client CellVisibility
*/ */
private static CellVisibility toCellVisibility(ClientProtos.CellVisibility proto) { private static CellVisibility toCellVisibility(ClientProtos.CellVisibility proto) {
if (proto == null) return null; if (proto == null) return null;
@ -375,8 +375,8 @@ public abstract class Mutation extends OperationWithAttributes
} }
/** /**
* Convert a protocol buffer CellVisibility bytes to a client CellVisibility n * @return the * Convert a protocol buffer CellVisibility bytes to a client CellVisibility
* converted client CellVisibility n * @return the converted client CellVisibility
*/ */
private static CellVisibility toCellVisibility(byte[] protoBytes) private static CellVisibility toCellVisibility(byte[] protoBytes)
throws DeserializationException { throws DeserializationException {
@ -483,7 +483,7 @@ public abstract class Mutation extends OperationWithAttributes
/** /**
* Set the TTL desired for the result of the mutation, in milliseconds. * 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) { public Mutation setTTL(long ttl) {
setAttribute(OP_ATTRIBUTE_TTL, Bytes.toBytes(ttl)); setAttribute(OP_ATTRIBUTE_TTL, Bytes.toBytes(ttl));
@ -660,8 +660,9 @@ public abstract class Mutation extends OperationWithAttributes
} }
/** /**
* @param row Row to check nn * @throws IllegalArgumentException Thrown if <code>row</code> is * @param row Row to check
* empty or null or &gt; {@link HConstants#MAX_ROW_LENGTH} * @throws IllegalArgumentException Thrown if <code>row</code> is empty or null or &gt;
* {@link HConstants#MAX_ROW_LENGTH}
* @return <code>row</code> * @return <code>row</code>
*/ */
static byte[] checkRow(final byte[] row, final int offset, final int length) { static byte[] checkRow(final byte[] row, final int offset, final int length) {

View File

@ -94,7 +94,7 @@ public abstract class Operation {
/** /**
* Produces a string representation of this Operation. It defaults to a JSON representation, but * 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 * falls back to a string representation of the fingerprint and details in the case of a JSON
* encoding failure. n * encoding failure.
*/ */
@Override @Override
public String toString() { public String toString() {

View File

@ -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 * 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 * 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 * 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) { public OperationWithAttributes setId(String id) {
setAttribute(ID_ATRIBUTE, Bytes.toBytes(id)); setAttribute(ID_ATRIBUTE, Bytes.toBytes(id));

View File

@ -61,7 +61,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) { public Put(byte[] rowArray, int rowOffset, int rowLength) {
this(rowArray, rowOffset, rowLength, HConstants.LATEST_TIMESTAMP); this(rowArray, rowOffset, rowLength, HConstants.LATEST_TIMESTAMP);
@ -89,7 +89,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) { public Put(byte[] rowArray, int rowOffset, int rowLength, long ts) {
checkRow(rowArray, rowOffset, rowLength); checkRow(rowArray, rowOffset, rowLength);
@ -156,7 +156,7 @@ public class Put extends Mutation implements HeapSize {
* Add the specified column and value to this Put operation. * Add the specified column and value to this Put operation.
* @param family family name * @param family family name
* @param qualifier column qualifier * @param qualifier column qualifier
* @param value column value n * @param value column value
*/ */
public Put addColumn(byte[] family, byte[] qualifier, byte[] value) { public Put addColumn(byte[] family, byte[] qualifier, byte[] value) {
return addColumn(family, qualifier, this.ts, value); return addColumn(family, qualifier, this.ts, value);
@ -168,7 +168,7 @@ public class Put extends Mutation implements HeapSize {
* @param family family name * @param family family name
* @param qualifier column qualifier * @param qualifier column qualifier
* @param ts version timestamp * @param ts version timestamp
* @param value column value n * @param value column value
*/ */
public Put addColumn(byte[] family, byte[] qualifier, long ts, byte[] value) { public Put addColumn(byte[] family, byte[] qualifier, long ts, byte[] value) {
if (ts < 0) { if (ts < 0) {
@ -186,7 +186,7 @@ public class Put extends Mutation implements HeapSize {
* @param family family name * @param family family name
* @param qualifier column qualifier * @param qualifier column qualifier
* @param ts version timestamp * @param ts version timestamp
* @param value column value n * @param value column value
*/ */
public Put addColumn(byte[] family, ByteBuffer qualifier, long ts, ByteBuffer value) { public Put addColumn(byte[] family, ByteBuffer qualifier, long ts, ByteBuffer value) {
if (ts < 0) { if (ts < 0) {
@ -201,7 +201,8 @@ public class Put extends Mutation implements HeapSize {
/** /**
* Add the specified KeyValue to this Put operation. Operation assumes that the passed KeyValue is * 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. * 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 @Override
public Put add(Cell cell) throws IOException { public Put add(Cell cell) throws IOException {

View File

@ -47,9 +47,6 @@ public abstract class Query extends OperationWithAttributes {
protected Map<byte[], TimeRange> colFamTimeRangeMap = Maps.newTreeMap(Bytes.BYTES_COMPARATOR); protected Map<byte[], TimeRange> colFamTimeRangeMap = Maps.newTreeMap(Bytes.BYTES_COMPARATOR);
protected Boolean loadColumnFamiliesOnDemand = null; protected Boolean loadColumnFamiliesOnDemand = null;
/**
* n
*/
public Filter getFilter() { public Filter getFilter() {
return filter; 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) { public Query setAuthorizations(Authorizations authorizations) {
this.setAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY, 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 * 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 * {@link #setConsistency(Consistency)} passing {@link Consistency#TIMELINE} to read data from a
* specific replicaId. <br> * 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) { public Query setReplicaId(int Id) {
this.targetReplicaId = 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. * Column Family time ranges take precedence over the global time range.
* @param cf the column family for which you want to restrict * @param cf the column family for which you want to restrict
* @param minStamp minimum timestamp value, inclusive * @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) { public Query setColumnFamilyTimeRange(byte[] cf, long minStamp, long maxStamp) {

View File

@ -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) { public static byte[] getStartKeyForDisplay(RegionInfo ri, Configuration conf) {
boolean displayKey = conf.getBoolean(DISPLAY_KEYS_KEY, true); 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 * Get the region name for display. Optionally hide the start key.
* String * @return region name as String
*/ */
public static String getRegionNameAsStringForDisplay(RegionInfo ri, Configuration conf) { public static String getRegionNameAsStringForDisplay(RegionInfo ri, Configuration conf) {
return Bytes.toStringBinary(getRegionNameForDisplay(ri, 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) { public static byte[] getRegionNameForDisplay(RegionInfo ri, Configuration conf) {
boolean displayKey = conf.getBoolean(DISPLAY_KEYS_KEY, true); boolean displayKey = conf.getBoolean(DISPLAY_KEYS_KEY, true);

View File

@ -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) { public static void removeNonDefaultRegions(Collection<RegionInfo> regions) {
Iterator<RegionInfo> iterator = regions.iterator(); Iterator<RegionInfo> iterator = regions.iterator();

View File

@ -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 * Method for retrieving the row key that corresponds to the row from which this Result was
* created. n * created.
*/ */
public byte[] getRow() { public byte[] getRow() {
if (this.row == null) { 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 * 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 * 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 * 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 * @param family the family
* column did not exist in the result set * @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) { public List<Cell> getColumnCells(byte[] family, byte[] qualifier) {
List<Cell> result = new ArrayList<>(); 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 * @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) * selected in the query (Get/Scan)
*/ */
@ -677,8 +678,7 @@ public class Result implements CellScannable, CellScanner {
} }
/** /**
* n * */
*/
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); 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) { public static long getTotalSizeOfCells(Result result) {
long size = 0; 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 * Copy another Result into this one. Needed for the old Mapred framework
* @throws UnsupportedOperationException if invoked on instance of EMPTY_RESULT (which is supposed * @throws UnsupportedOperationException if invoked on instance of EMPTY_RESULT (which is supposed
* to be immutable). n * to be immutable).
*/ */
public void copyFrom(Result other) { public void copyFrom(Result other) {
checkReadonly(); checkReadonly();

View File

@ -86,7 +86,7 @@ public interface ResultScanner extends Closeable, Iterable<Result> {
* setting (or hbase.client.scanner.caching in hbase-site.xml). * setting (or hbase.client.scanner.caching in hbase-site.xml).
* @param nbRows number of rows to return * @param nbRows number of rows to return
* @return Between zero and nbRows rowResults. Scan is done if returned array is of zero-length * @return Between zero and nbRows rowResults. Scan is done if returned array is of zero-length
* (We never return null). n * (We never return null).
*/ */
default Result[] next(int nbRows) throws IOException { default Result[] next(int nbRows) throws IOException {
List<Result> resultSets = new ArrayList<>(nbRows); List<Result> resultSets = new ArrayList<>(nbRows);

View File

@ -38,8 +38,8 @@ public class RowMutations implements Row {
/** /**
* Create a {@link RowMutations} with the specified mutations. * Create a {@link RowMutations} with the specified mutations.
* @param mutations the mutations to send n * @throws IOException if any row in mutations is * @param mutations the mutations to send
* different to another * @throws IOException if any row in mutations is different to another
*/ */
public static RowMutations of(List<? extends Mutation> mutations) throws IOException { public static RowMutations of(List<? extends Mutation> mutations) throws IOException {
if (CollectionUtils.isEmpty(mutations)) { if (CollectionUtils.isEmpty(mutations)) {

View File

@ -259,7 +259,7 @@ public class Scan extends Query {
* Get all columns from the specified family. * Get all columns from the specified family.
* <p> * <p>
* Overrides previous calls to addColumn for this family. * Overrides previous calls to addColumn for this family.
* @param family family name n * @param family family name
*/ */
public Scan addFamily(byte[] family) { public Scan addFamily(byte[] family) {
familyMap.remove(family); familyMap.remove(family);
@ -272,7 +272,7 @@ public class Scan extends Query {
* <p> * <p>
* Overrides previous calls to addFamily for this family. * Overrides previous calls to addFamily for this family.
* @param family family name * @param family family name
* @param qualifier column qualifier n * @param qualifier column qualifier
*/ */
public Scan addColumn(byte[] family, byte[] qualifier) { public Scan addColumn(byte[] family, byte[] qualifier) {
NavigableSet<byte[]> set = familyMap.get(family); NavigableSet<byte[]> set = familyMap.get(family);
@ -294,7 +294,7 @@ public class Scan extends Query {
* @param minStamp minimum timestamp value, inclusive * @param minStamp minimum timestamp value, inclusive
* @param maxStamp maximum timestamp value, exclusive * @param maxStamp maximum timestamp value, exclusive
* @see #readAllVersions() * @see #readAllVersions()
* @see #readVersions(int) n * @see #readVersions(int)
*/ */
public Scan setTimeRange(long minStamp, long maxStamp) throws IOException { public Scan setTimeRange(long minStamp, long maxStamp) throws IOException {
tr = TimeRange.between(minStamp, maxStamp); tr = TimeRange.between(minStamp, maxStamp);
@ -307,7 +307,7 @@ public class Scan extends Query {
* number of versions beyond the defaut. * number of versions beyond the defaut.
* @param timestamp version timestamp * @param timestamp version timestamp
* @see #readAllVersions() * @see #readAllVersions()
* @see #readVersions(int) n * @see #readVersions(int)
*/ */
public Scan setTimestamp(long timestamp) { public Scan setTimestamp(long timestamp) {
try { try {
@ -336,9 +336,9 @@ public class Scan extends Query {
* {@link #setStartStopRowForPrefixScan(byte[])}.</strong> Doing so will make the scan result * {@link #setStartStopRowForPrefixScan(byte[])}.</strong> Doing so will make the scan result
* unexpected or even undefined. * unexpected or even undefined.
* </p> * </p>
* @param startRow row to start scanner at or after n * @throws IllegalArgumentException if * @param startRow row to start scanner at or after
* startRow does not meet criteria for a row key (when length exceeds * @throws IllegalArgumentException if startRow does not meet criteria for a row key (when length
* {@link HConstants#MAX_ROW_LENGTH}) * exceeds {@link HConstants#MAX_ROW_LENGTH})
*/ */
public Scan withStartRow(byte[] startRow) { public Scan withStartRow(byte[] startRow) {
return withStartRow(startRow, true); return withStartRow(startRow, true);
@ -355,9 +355,9 @@ public class Scan extends Query {
* unexpected or even undefined. * unexpected or even undefined.
* </p> * </p>
* @param startRow row to start scanner at or after * @param startRow row to start scanner at or after
* @param inclusive whether we should include the start row when scan n * @throws * @param inclusive whether we should include the start row when scan
* IllegalArgumentException if startRow does not meet criteria for a row key * @throws IllegalArgumentException if startRow does not meet criteria for a row key (when length
* (when length exceeds {@link HConstants#MAX_ROW_LENGTH}) * exceeds {@link HConstants#MAX_ROW_LENGTH})
*/ */
public Scan withStartRow(byte[] startRow, boolean inclusive) { public Scan withStartRow(byte[] startRow, boolean inclusive) {
if (Bytes.len(startRow) > HConstants.MAX_ROW_LENGTH) { if (Bytes.len(startRow) > HConstants.MAX_ROW_LENGTH) {
@ -378,9 +378,9 @@ public class Scan extends Query {
* {@link #setStartStopRowForPrefixScan(byte[])}.</strong> Doing so will make the scan result * {@link #setStartStopRowForPrefixScan(byte[])}.</strong> Doing so will make the scan result
* unexpected or even undefined. * unexpected or even undefined.
* </p> * </p>
* @param stopRow row to end at (exclusive) n * @throws IllegalArgumentException if stopRow does * @param stopRow row to end at (exclusive)
* not meet criteria for a row key (when length exceeds * @throws IllegalArgumentException if stopRow does not meet criteria for a row key (when length
* {@link HConstants#MAX_ROW_LENGTH}) * exceeds {@link HConstants#MAX_ROW_LENGTH})
*/ */
public Scan withStopRow(byte[] stopRow) { public Scan withStopRow(byte[] stopRow) {
return withStopRow(stopRow, false); return withStopRow(stopRow, false);
@ -397,9 +397,9 @@ public class Scan extends Query {
* unexpected or even undefined. * unexpected or even undefined.
* </p> * </p>
* @param stopRow row to end at * @param stopRow row to end at
* @param inclusive whether we should include the stop row when scan n * @throws * @param inclusive whether we should include the stop row when scan
* IllegalArgumentException if stopRow does not meet criteria for a row key (when * @throws IllegalArgumentException if stopRow does not meet criteria for a row key (when length
* length exceeds {@link HConstants#MAX_ROW_LENGTH}) * exceeds {@link HConstants#MAX_ROW_LENGTH})
*/ */
public Scan withStopRow(byte[] stopRow, boolean inclusive) { public Scan withStopRow(byte[] stopRow, boolean inclusive) {
if (Bytes.len(stopRow) > HConstants.MAX_ROW_LENGTH) { if (Bytes.len(stopRow) > HConstants.MAX_ROW_LENGTH) {
@ -427,11 +427,10 @@ public class Scan extends Query {
* <strong>This CANNOT be used in combination with withStartRow and/or withStopRow.</strong> Such * <strong>This CANNOT be used in combination with withStartRow and/or withStopRow.</strong> Such
* a combination will yield unexpected and even undefined results. * a combination will yield unexpected and even undefined results.
* </p> * </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.)
* * @deprecated since 2.5.0, will be removed in 4.0.0. The name of this method * @deprecated since 2.5.0, will be removed in 4.0.0. The name of this method is considered to be
* is considered to be confusing as it does not use a {@link Filter} but uses * confusing as it does not use a {@link Filter} but uses setting the startRow and
* setting the startRow and stopRow instead. Use * stopRow instead. Use {@link #setStartStopRowForPrefixScan(byte[])} instead.
* {@link #setStartStopRowForPrefixScan(byte[])} instead.
*/ */
@Deprecated @Deprecated
public Scan setRowPrefixFilter(byte[] rowPrefix) { public Scan setRowPrefixFilter(byte[] rowPrefix) {
@ -454,7 +453,7 @@ public class Scan extends Query {
* <strong>This CANNOT be used in combination with withStartRow and/or withStopRow.</strong> Such * <strong>This CANNOT be used in combination with withStartRow and/or withStopRow.</strong> Such
* a combination will yield unexpected and even undefined results. * a combination will yield unexpected and even undefined results.
* </p> * </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) { public Scan setStartStopRowForPrefixScan(byte[] rowPrefix) {
if (rowPrefix == null) { if (rowPrefix == null) {
@ -468,7 +467,7 @@ public class Scan extends Query {
} }
/** /**
* Get all available versions. n * Get all available versions.
*/ */
public Scan readAllVersions() { public Scan readAllVersions() {
this.maxVersions = Integer.MAX_VALUE; this.maxVersions = Integer.MAX_VALUE;
@ -477,7 +476,7 @@ public class Scan extends Query {
/** /**
* Get up to the specified number of versions of each column. * 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) { public Scan readVersions(int versions) {
this.maxVersions = versions; this.maxVersions = versions;
@ -555,7 +554,7 @@ public class Scan extends Query {
/** /**
* Setting the familyMap * 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) { public Scan setFamilyMap(Map<byte[], NavigableSet<byte[]>> familyMap) {
this.familyMap = familyMap; this.familyMap = familyMap;
@ -563,7 +562,7 @@ public class Scan extends Query {
} }
/** /**
* Getting the familyMap n * Getting the familyMap
*/ */
public Map<byte[], NavigableSet<byte[]>> getFamilyMap() { public Map<byte[], NavigableSet<byte[]>> getFamilyMap() {
return this.familyMap; return this.familyMap;
@ -638,16 +637,12 @@ public class Scan extends Query {
return this.caching; return this.caching;
} }
/** /** Returns TimeRange */
* n
*/
public TimeRange getTimeRange() { public TimeRange getTimeRange() {
return this.tr; return this.tr;
} }
/** /** Returns RowFilter */
* n
*/
@Override @Override
public Filter getFilter() { public Filter getFilter() {
return filter; return filter;
@ -682,7 +677,7 @@ public class Scan extends Query {
* Set whether this scan is a reversed one * Set whether this scan is a reversed one
* <p> * <p>
* This is false by default which means forward(normal) scan. * 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) { public Scan setReversed(boolean reversed) {
this.reversed = reversed; this.reversed = reversed;
@ -701,7 +696,8 @@ public class Scan extends Query {
* Setting whether the caller wants to see the partial results when server returns * 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 * 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 * 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) * @see #setBatch(int)
*/ */
public Scan setAllowPartialResults(final boolean allowPartialResults) { public Scan setAllowPartialResults(final boolean allowPartialResults) {
@ -725,7 +721,7 @@ public class Scan extends Query {
/** /**
* Compile the table and column family (i.e. schema) information into a String. Useful for parsing * 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 @Override
public Map<String, Object> getFingerprint() { public Map<String, Object> getFingerprint() {
@ -747,7 +743,7 @@ public class Scan extends Query {
* Compile the details beyond the scope of getFingerprint (row, columns, timestamps, etc.) into a * 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 * Map along with the fingerprinted information. Useful for debugging, logging, and administration
* tools. * 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 @Override
public Map<String, Object> toMap(int maxCols) { public Map<String, Object> toMap(int maxCols) {
@ -904,7 +900,7 @@ public class Scan extends Query {
* reaches this value. * reaches this value.
* <p> * <p>
* This condition will be tested at last, after all other conditions such as stopRow, filter, etc. * 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) { public Scan setLimit(int limit) {
this.limit = limit; this.limit = limit;
@ -913,7 +909,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 * 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() { public Scan setOneRowLimit() {
return setLimit(1).setReadType(ReadType.PREAD); return setLimit(1).setReadType(ReadType.PREAD);
@ -935,7 +931,7 @@ public class Scan extends Query {
* Set the read type for this scan. * Set the read type for this scan.
* <p> * <p>
* Notice that we may choose to use pread even if you specific {@link ReadType#STREAM} here. For * 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) { public Scan setReadType(ReadType readType) {
this.readType = readType; this.readType = readType;

View File

@ -116,7 +116,8 @@ public interface Table extends Closeable {
* @param results Empty Object[], same size as actions. Provides access to partial results, in * @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 * 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 * 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) default void batch(final List<? extends Row> actions, final Object[] results)
throws IOException, InterruptedException { throws IOException, InterruptedException {
@ -264,8 +265,8 @@ public interface Table extends Closeable {
* @apiNote In 3.0.0 version, the input list {@code deletes} will no longer be modified. Also, * @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 #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 * {@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} * currently, but this may change in the future. An {@link IllegalArgumentException} will
* will be thrown in this case. * be thrown in this case.
*/ */
default void delete(List<Delete> deletes) throws IOException { default void delete(List<Delete> deletes) throws IOException {
throw new NotImplementedException("Add an implementation!"); throw new NotImplementedException("Add an implementation!");

View File

@ -153,7 +153,7 @@ public interface TableDescriptor {
String getRegionSplitPolicyClassName(); String getRegionSplitPolicyClassName();
/** /**
* Get the name of the table n * Get the name of the table
*/ */
TableName getTableName(); TableName getTableName();

View File

@ -886,7 +886,7 @@ public class TableDescriptorBuilder {
} }
/** /**
* Get the name of the table n * Get the name of the table
*/ */
@Override @Override
public TableName getTableName() { public TableName getTableName() {
@ -1299,7 +1299,8 @@ public class TableDescriptorBuilder {
* org.apache.hadoop.hbase.coprocessor.RegionObserver or Endpoint. It won't check if the class * 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 * can be loaded or not. Whether a coprocessor is loadable or not will be determined when a
* region is opened. * 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 { public ModifyableTableDescriptor setCoprocessor(String className) throws IOException {
return setCoprocessor(CoprocessorDescriptorBuilder.newBuilder(className) return setCoprocessor(CoprocessorDescriptorBuilder.newBuilder(className)
@ -1347,8 +1348,8 @@ public class TableDescriptorBuilder {
* org.apache.hadoop.hbase.coprocessor.RegionObserver or Endpoint. It won't check if the class * 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 * can be loaded or not. Whether a coprocessor is loadable or not will be determined when a
* region is opened. * region is opened.
* @param specStr The Coprocessor specification all in in one String n * @return the modifyable * @param specStr The Coprocessor specification all in in one String
* TD * @return the modifyable TD
* @deprecated used by HTableDescriptor and admin.rb. As of release 2.0.0, this will be removed * @deprecated used by HTableDescriptor and admin.rb. As of release 2.0.0, this will be removed
* in HBase 3.0.0. * in HBase 3.0.0.
*/ */
@ -1461,8 +1462,8 @@ public class TableDescriptorBuilder {
/** /**
* @param bytes A pb serialized {@link ModifyableTableDescriptor} instance with pb magic prefix * @param bytes A pb serialized {@link ModifyableTableDescriptor} instance with pb magic prefix
* @return An instance of {@link ModifyableTableDescriptor} made from <code>bytes</code> n * @return An instance of {@link ModifyableTableDescriptor} made from <code>bytes</code>
* * @see #toByteArray() * @see #toByteArray()
*/ */
private static TableDescriptor parseFrom(final byte[] bytes) throws DeserializationException { private static TableDescriptor parseFrom(final byte[] bytes) throws DeserializationException {
if (!ProtobufUtil.isPBMagicPrefix(bytes)) { if (!ProtobufUtil.isPBMagicPrefix(bytes)) {

View File

@ -42,7 +42,7 @@ public class TableState {
/** /**
* Covert from PB version of State * Covert from PB version of State
* @param state convert from n * @param state convert from
*/ */
public static State convert(HBaseProtos.TableState.State state) { public static State convert(HBaseProtos.TableState.State state) {
State ret; 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() { public HBaseProtos.TableState.State convert() {
HBaseProtos.TableState.State state; HBaseProtos.TableState.State state;
@ -140,7 +140,7 @@ public class TableState {
} }
/** /**
* Table name for state n * Table name for state
*/ */
public TableName getTableName() { public TableName getTableName() {
return tableName; 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() { public HBaseProtos.TableState convert() {
return HBaseProtos.TableState.newBuilder().setState(this.state.convert()).build(); return HBaseProtos.TableState.newBuilder().setState(this.state.convert()).build();
@ -177,7 +177,7 @@ public class TableState {
/** /**
* Covert from PB version of TableState * Covert from PB version of TableState
* @param tableName table this state of * @param tableName table this state of
* @param tableState convert from n * @param tableState convert from
*/ */
public static TableState convert(TableName tableName, HBaseProtos.TableState tableState) { public static TableState convert(TableName tableName, HBaseProtos.TableState tableState) {
TableState.State state = State.convert(tableState.getState()); TableState.State state = State.convert(tableState.getState());

View File

@ -33,7 +33,7 @@ public class ServerStatistics {
/** /**
* Good enough attempt. Last writer wins. It doesn't really matter which one gets to update, as * 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) { public void update(byte[] region, RegionLoadStats currentStats) {
RegionStatistics regionStat = this.stats.get(region); RegionStatistics regionStat = this.stats.get(region);

View File

@ -35,8 +35,8 @@ public class ServerSideScanMetrics {
private final Map<String, AtomicLong> counters = new HashMap<>(); private final Map<String, AtomicLong> counters = new HashMap<>();
/** /**
* Create a new counter with the specified name n * @return {@link AtomicLong} instance for the * Create a new counter with the specified name
* counter with counterName * @return {@link AtomicLong} instance for the counter with counterName
*/ */
protected AtomicLong createCounter(String counterName) { protected AtomicLong createCounter(String counterName) {
AtomicLong c = new AtomicLong(0); AtomicLong c = new AtomicLong(0);
@ -59,9 +59,6 @@ public class ServerSideScanMetrics {
*/ */
public final AtomicLong countOfRowsScanned = createCounter(COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME); public final AtomicLong countOfRowsScanned = createCounter(COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME);
/**
* nn
*/
public void setCounter(String counterName, long value) { public void setCounter(String counterName, long value) {
AtomicLong c = this.counters.get(counterName); AtomicLong c = this.counters.get(counterName);
if (c != null) { if (c != null) {
@ -69,23 +66,16 @@ public class ServerSideScanMetrics {
} }
} }
/** /** Returns true if a counter exists with the counterName */
* n * @return true if a counter exists with the counterName
*/
public boolean hasCounter(String counterName) { public boolean hasCounter(String counterName) {
return this.counters.containsKey(counterName); return this.counters.containsKey(counterName);
} }
/** /** Returns {@link AtomicLong} instance for this counter name, null if counter does not exist. */
* n * @return {@link AtomicLong} instance for this counter name, null if counter does not exist.
*/
public AtomicLong getCounter(String counterName) { public AtomicLong getCounter(String counterName) {
return this.counters.get(counterName); return this.counters.get(counterName);
} }
/**
* nn
*/
public void addToCounter(String counterName, long delta) { public void addToCounter(String counterName, long delta) {
AtomicLong c = this.counters.get(counterName); AtomicLong c = this.counters.get(counterName);
if (c != null) { if (c != null) {

View File

@ -52,36 +52,27 @@ import org.apache.hbase.thirdparty.com.google.protobuf.Message;
public abstract class ColumnInterpreter<T, S, P extends Message, Q extends Message, public abstract class ColumnInterpreter<T, S, P extends Message, Q extends Message,
R extends Message> { R extends Message> {
/** /** Returns value of type T */
* nnn * @return value of type T n
*/
public abstract T getValue(byte[] colFamily, byte[] colQualifier, Cell c) throws IOException; public abstract T getValue(byte[] colFamily, byte[] colQualifier, Cell c) throws IOException;
/** /** Returns sum or non null value among (if either of them is null); otherwise returns a null. */
* nn * @return sum or non null value among (if either of them is null); otherwise returns a null.
*/
public abstract S add(S l1, S l2); 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 getMaxValue();
public abstract T getMinValue(); public abstract T getMinValue();
/** /** Returns multiplication */
* nnn
*/
public abstract S multiply(S o1, S o2); public abstract S multiply(S o1, S o2);
/** /** Returns increment */
* nn
*/
public abstract S increment(S o); 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); public abstract S castToReturnType(T o);
@ -96,7 +87,7 @@ public abstract class ColumnInterpreter<T, S, P extends Message, Q extends Messa
/** /**
* used for computing average of &lt;S&gt; data values. Not providing the divide method that takes * used for computing average of &lt;S&gt; data values. Not providing the divide method that takes
* two &lt;S&gt; values as it is not needed as of now. nnn * two &lt;S&gt; values as it is not needed as of now.
*/ */
public abstract double divideForAvg(S o, Long l); public abstract double divideForAvg(S o, Long l);
@ -112,37 +103,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 * 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); public abstract void initialize(P msg);
/** /**
* This method gets the PB message corresponding to the cell type n * @return the PB message for * This method gets the PB message corresponding to the cell type
* the cell-type instance * @return the PB message for the cell-type instance
*/ */
public abstract Q getProtoForCellType(T t); public abstract Q getProtoForCellType(T t);
/** /**
* This method gets the PB message corresponding to the cell type n * @return the cell-type * This method gets the PB message corresponding to the cell type
* instance from the PB message * @return the cell-type instance from the PB message
*/ */
public abstract T getCellValueFromProto(Q q); public abstract T getCellValueFromProto(Q q);
/** /**
* This method gets the PB message corresponding to the promoted type n * @return the PB message * This method gets the PB message corresponding to the promoted type
* for the promoted-type instance * @return the PB message for the promoted-type instance
*/ */
public abstract R getProtoForPromotedType(S s); public abstract R getProtoForPromotedType(S s);
/** /**
* This method gets the promoted type from the proto message n * @return the promoted-type * This method gets the promoted type from the proto message
* instance from the PB message * @return the promoted-type instance from the PB message
*/ */
public abstract S getPromotedValueFromProto(R r); 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 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); public abstract T castToCellType(S response);
} }

View File

@ -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) { public CoprocessorException(Class<?> clazz, String s) {
super("Coprocessor [" + clazz.getName() + "]: " + s); super("Coprocessor [" + clazz.getName() + "]: " + s);

View File

@ -150,7 +150,7 @@ public final class ClientExceptionsUtil {
/** /**
* Translates exception for preemptive fast fail checks. * Translates exception for preemptive fast fail checks.
* @param t exception to check * @param t exception to check
* @return translated exception n * @return translated exception
*/ */
public static Throwable translatePFFE(Throwable t) throws IOException { public static Throwable translatePFFE(Throwable t) throws IOException {
if (t instanceof NoSuchMethodError) { if (t instanceof NoSuchMethodError) {

View File

@ -35,15 +35,13 @@ public class FailedSanityCheckException extends org.apache.hadoop.hbase.DoNotRet
} }
/** /**
* n * */
*/
public FailedSanityCheckException(String message) { public FailedSanityCheckException(String message) {
super(message); super(message);
} }
/** /**
* nn * */
*/
public FailedSanityCheckException(String message, Throwable cause) { public FailedSanityCheckException(String message, Throwable cause) {
super(message, cause); super(message, cause);
} }

View File

@ -68,9 +68,7 @@ public class ColumnValueFilter extends FilterBase {
this.comparator = Preconditions.checkNotNull(comparator, "Comparator should not be null"); this.comparator = Preconditions.checkNotNull(comparator, "Comparator should not be null");
} }
/** /** Returns operator */
* n
*/
public CompareOperator getCompareOperator() { public CompareOperator getCompareOperator() {
return op; return op;
} }

View File

@ -216,8 +216,9 @@ public abstract class Filter {
/** /**
* Concrete implementers can signal a failure condition in their code by throwing an * 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 * {@link IOException}.
* serialized are equal to the corresponding fields in other. Used for testing. * @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); abstract boolean areSerializedFieldsEqual(Filter other);

View File

@ -134,9 +134,9 @@ public abstract class FilterBase extends Filter {
} }
/** /**
* Default implementation so that writers of custom filters aren't forced to implement. n * 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 * @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. * corresponding fields in other. Used for testing.
*/ */
@Override @Override
boolean areSerializedFieldsEqual(Filter other) { boolean areSerializedFieldsEqual(Filter other) {

View File

@ -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 * 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) { public FilterList(final Filter... filters) {
this(Operator.MUST_PASS_ALL, Arrays.asList(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() { public Operator getOperator() {
return operator; return operator;
} }
/** /**
* Get the filters. n * Get the filters.
*/ */
public List<Filter> getFilters() { public List<Filter> getFilters() {
return filterListBase.getFilters(); return filterListBase.getFilters();

View File

@ -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 current child, we should set the traverse result (transformed cell) of previous node(s) as
* the initial value. (HBASE-18879). * the initial value. (HBASE-18879).
* @param c The cell in question. * @param c The cell in question.
* @return the transformed cell. n * @return the transformed cell.
*/ */
@Override @Override
public Cell transformCell(Cell c) throws IOException { public Cell transformCell(Cell c) throws IOException {

View File

@ -116,7 +116,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 * 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) { private byte[] preprocessMask(byte[] mask) {
if (!UNSAFE_UNALIGNED) { if (!UNSAFE_UNALIGNED) {
@ -588,8 +589,8 @@ public class FuzzyRowFilter extends FilterBase {
/** /**
* For forward scanner, next cell hint should not contain any trailing zeroes unless they are part * 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 * of fuzzyKeyMeta hint = '\x01\x01\x01\x00\x00' will skip valid row '\x01\x01\x01'
* toInc - position of incremented byte * @param toInc - position of incremented byte
* @return trimmed version of result * @return trimmed version of result
*/ */

View File

@ -37,7 +37,7 @@ public class RandomRowFilter extends FilterBase {
protected boolean filterOutRow; 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) { public RandomRowFilter(float chance) {
this.chance = chance; this.chance = chance;
@ -49,7 +49,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) { public void setChance(float chance) {
this.chance = chance; this.chance = chance;

View File

@ -71,7 +71,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, protected SingleColumnValueExcludeFilter(final byte[] family, final byte[] qualifier,
final CompareOperator op, ByteArrayComparable comparator, final boolean filterIfMissing, final CompareOperator op, ByteArrayComparable comparator, final boolean filterIfMissing,

View File

@ -111,7 +111,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, protected SingleColumnValueFilter(final byte[] family, final byte[] qualifier,
final CompareOperator op, org.apache.hadoop.hbase.filter.ByteArrayComparable comparator, final CompareOperator op, org.apache.hadoop.hbase.filter.ByteArrayComparable comparator,

View File

@ -54,7 +54,7 @@ public class TimestampsFilter extends FilterBase {
long minTimestamp = Long.MAX_VALUE; 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) { public TimestampsFilter(List<Long> timestamps) {
this(timestamps, false); this(timestamps, false);

View File

@ -104,9 +104,10 @@ class CellBlockBuilder {
/** /**
* Puts CellScanner Cells into a cell block using passed in <code>codec</code> and/or * 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 * <code>compressor</code>.
* passed-in Cells encoded using passed in <code>codec</code> and/or <code>compressor</code>; the * @return Null or byte buffer filled with a cellblock filled with passed-in Cells encoded using
* returned buffer has been flipped and is ready for reading. Use limit to find total size. n * 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, public ByteBuffer buildCellBlock(final Codec codec, final CompressionCodec compressor,
final CellScanner cellScanner) throws IOException { final CellScanner cellScanner) throws IOException {

View File

@ -34,8 +34,7 @@ public class LeaseException extends DoNotRetryIOException {
} }
/** /**
* n * */
*/
public LeaseException(String message) { public LeaseException(String message) {
super(message); super(message);
} }

View File

@ -33,8 +33,7 @@ public class FailedLogCloseException extends IOException {
} }
/** /**
* n * */
*/
public FailedLogCloseException(String msg) { public FailedLogCloseException(String msg) {
super(msg); super(msg);
} }

View File

@ -32,8 +32,7 @@ public class FailedSyncBeforeLogCloseException extends FailedLogCloseException {
} }
/** /**
* n * */
*/
public FailedSyncBeforeLogCloseException(String msg) { public FailedSyncBeforeLogCloseException(String msg) {
super(msg); super(msg);
} }

View File

@ -50,7 +50,7 @@ public abstract class AbstractHBaseSaslRpcClient {
* @param token token to use if needed by the authentication method * @param token token to use if needed by the authentication method
* @param serverAddr the address of the hbase service * @param serverAddr the address of the hbase service
* @param securityInfo the security details for the remote 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, protected AbstractHBaseSaslRpcClient(Configuration conf,
SaslClientAuthenticationProvider provider, Token<? extends TokenIdentifier> token, SaslClientAuthenticationProvider provider, Token<? extends TokenIdentifier> token,
@ -66,7 +66,7 @@ public abstract class AbstractHBaseSaslRpcClient {
* @param serverAddr the address of the hbase service * @param serverAddr the address of the hbase service
* @param securityInfo the security details for the remote hbase service * @param securityInfo the security details for the remote hbase service
* @param fallbackAllowed does the client allow fallback to simple authentication * @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, protected AbstractHBaseSaslRpcClient(Configuration conf,
SaslClientAuthenticationProvider provider, Token<? extends TokenIdentifier> token, SaslClientAuthenticationProvider provider, Token<? extends TokenIdentifier> token,

View File

@ -62,7 +62,7 @@ public final class EncryptionUtil {
* @param conf configuration * @param conf configuration
* @param key the raw key bytes * @param key the raw key bytes
* @param algorithm the algorithm to use with this key material * @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) public static byte[] wrapKey(Configuration conf, byte[] key, String algorithm)
throws IOException { throws IOException {
@ -115,7 +115,7 @@ public final class EncryptionUtil {
* @param conf configuration * @param conf configuration
* @param subject subject key alias * @param subject subject key alias
* @param value the encrypted key bytes * @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) public static Key unwrapKey(Configuration conf, String subject, byte[] value)
throws IOException, KeyException { throws IOException, KeyException {

View File

@ -86,7 +86,7 @@ public class HBaseSaslRpcClient extends AbstractHBaseSaslRpcClient {
* Do client side SASL authentication with server via the given InputStream and OutputStream * Do client side SASL authentication with server via the given InputStream and OutputStream
* @param inS InputStream to use * @param inS InputStream to use
* @param outS OutputStream 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 { public boolean saslConnect(InputStream inS, OutputStream outS) throws IOException {
DataInputStream inStream = new DataInputStream(new BufferedInputStream(inS)); 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. * 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 { public InputStream getInputStream() throws IOException {
if (!saslClient.isComplete()) { 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. * 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 { public OutputStream getOutputStream() throws IOException {
if (!saslClient.isComplete()) { if (!saslClient.isComplete()) {

View File

@ -45,7 +45,7 @@ public class AccessControlClient {
/** /**
* Return true if authorization is supported and enabled * Return true if authorization is supported and enabled
* @param connection The connection to use * @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 { public static boolean isAuthorizationEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities() return connection.getAdmin().getSecurityCapabilities()
@ -55,7 +55,7 @@ public class AccessControlClient {
/** /**
* Return true if cell authorization is supported and enabled * Return true if cell authorization is supported and enabled
* @param connection The connection to use * @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 { public static boolean isCellAuthorizationEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities() 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, * 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, public static void grant(Connection connection, final String userName,
final Permission.Action... actions) throws Throwable { final Permission.Action... actions) throws Throwable {
@ -162,7 +162,7 @@ public class AccessControlClient {
/** /**
* Revokes the permission on the table * 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, public static void revoke(Connection connection, final TableName tableName, final String username,
final byte[] family, final byte[] qualifier, final Permission.Action... actions) 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. * 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, public static void revoke(Connection connection, final String namespace, final String userName,
final Permission.Action... actions) throws Throwable { 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. * along with the list of superusers would be returned. Else, no rows get returned.
* @param connection The Connection instance to use * @param connection The Connection instance to use
* @param tableRegex The regular expression string to match against * @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) public static List<UserPermission> getUserPermissions(Connection connection, String tableRegex)
throws Throwable { throws Throwable {

View File

@ -450,8 +450,8 @@ public class AccessControlUtil {
* It's also called by the shell, in case you want to find references. * It's also called by the shell, in case you want to find references.
* @param protocol the AccessControlService protocol proxy * @param protocol the AccessControlService protocol proxy
* @param userShortName the short name of the user to grant permissions * @param userShortName the short name of the user to grant permissions
* @param actions the permissions to be granted n * @deprecated Use * @param actions the permissions to be granted
* {@link Admin#grant(UserPermission, boolean)} instead. * @deprecated Use {@link Admin#grant(UserPermission, boolean)} instead.
*/ */
@Deprecated @Deprecated
public static void grant(RpcController controller, public static void grant(RpcController controller,
@ -478,8 +478,8 @@ public class AccessControlUtil {
* @param tableName optional table name * @param tableName optional table name
* @param f optional column family * @param f optional column family
* @param q optional qualifier * @param q optional qualifier
* @param actions the permissions to be granted n * @deprecated Use * @param actions the permissions to be granted
* {@link Admin#grant(UserPermission, boolean)} instead. * @deprecated Use {@link Admin#grant(UserPermission, boolean)} instead.
*/ */
@Deprecated @Deprecated
public static void grant(RpcController controller, public static void grant(RpcController controller,
@ -504,8 +504,8 @@ public class AccessControlUtil {
* @param controller RpcController * @param controller RpcController
* @param protocol the AccessControlService protocol proxy * @param protocol the AccessControlService protocol proxy
* @param namespace the short name of the user to grant permissions * @param namespace the short name of the user to grant permissions
* @param actions the permissions to be granted n * @deprecated Use * @param actions the permissions to be granted
* {@link Admin#grant(UserPermission, boolean)} instead. * @deprecated Use {@link Admin#grant(UserPermission, boolean)} instead.
*/ */
@Deprecated @Deprecated
public static void grant(RpcController controller, public static void grant(RpcController controller,
@ -621,9 +621,8 @@ public class AccessControlUtil {
* A utility used to get user's global permissions based on the specified user name. * A utility used to get user's global permissions based on the specified user name.
* @param controller RpcController * @param controller RpcController
* @param protocol the AccessControlService protocol proxy * @param protocol the AccessControlService protocol proxy
* @param userName User name, if empty then all user permissions will be retrieved. n * @param userName User name, if empty then all user permissions will be retrieved.
* * @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} * @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
* instead.
*/ */
@Deprecated @Deprecated
public static List<UserPermission> getUserPermissions(RpcController controller, public static List<UserPermission> getUserPermissions(RpcController controller,
@ -651,8 +650,8 @@ public class AccessControlUtil {
* It's also called by the shell, in case you want to find references. * It's also called by the shell, in case you want to find references.
* @param controller RpcController * @param controller RpcController
* @param protocol the AccessControlService protocol proxy * @param protocol the AccessControlService protocol proxy
* @param t optional table name n * @deprecated Use * @param t optional table name
* {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead. * @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
*/ */
@Deprecated @Deprecated
public static List<UserPermission> getUserPermissions(RpcController controller, public static List<UserPermission> getUserPermissions(RpcController controller,
@ -668,9 +667,8 @@ public class AccessControlUtil {
* @param t optional table name * @param t optional table name
* @param columnFamily Column family * @param columnFamily Column family
* @param columnQualifier Column qualifier * @param columnQualifier Column qualifier
* @param userName User name, if empty then all user permissions will be retrieved. n * @param userName User name, if empty then all user permissions will be retrieved.
* * @deprecated Use * @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
* {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
*/ */
@Deprecated @Deprecated
public static List<UserPermission> getUserPermissions(RpcController controller, public static List<UserPermission> getUserPermissions(RpcController controller,
@ -708,8 +706,8 @@ public class AccessControlUtil {
* It's also called by the shell, in case you want to find references. * It's also called by the shell, in case you want to find references.
* @param controller RpcController * @param controller RpcController
* @param protocol the AccessControlService protocol proxy * @param protocol the AccessControlService protocol proxy
* @param namespace name of the namespace n * @deprecated Use * @param namespace name of the namespace
* {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead. * @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
*/ */
@Deprecated @Deprecated
public static List<UserPermission> getUserPermissions(RpcController controller, public static List<UserPermission> getUserPermissions(RpcController controller,
@ -722,9 +720,8 @@ public class AccessControlUtil {
* @param controller RpcController * @param controller RpcController
* @param protocol the AccessControlService protocol proxy * @param protocol the AccessControlService protocol proxy
* @param namespace name of the namespace * @param namespace name of the namespace
* @param userName User name, if empty then all user permissions will be retrieved. n * @param userName User name, if empty then all user permissions will be retrieved.
* * @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} * @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead.
* instead.
*/ */
@Deprecated @Deprecated
public static List<UserPermission> getUserPermissions(RpcController controller, public static List<UserPermission> getUserPermissions(RpcController controller,
@ -762,8 +759,8 @@ public class AccessControlUtil {
* will not be considered if columnFamily is passed as null or empty. * will not be considered if columnFamily is passed as null or empty.
* @param userName User name, it shouldn't be null or empty. * @param userName User name, it shouldn't be null or empty.
* @param actions Actions * @param actions Actions
* @return true if access allowed, otherwise false n * @deprecated Use * @return true if access allowed, otherwise false
* {@link Admin#hasUserPermissions(String, List)} instead. * @deprecated Use {@link Admin#hasUserPermissions(String, List)} instead.
*/ */
@Deprecated @Deprecated
public static boolean hasPermission(RpcController controller, public static boolean hasPermission(RpcController controller,

View File

@ -55,7 +55,7 @@ public class VisibilityClient {
/** /**
* Return true if cell visibility features are supported and enabled * Return true if cell visibility features are supported and enabled
* @param connection The connection to use * @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 { public static boolean isCellVisibilityEnabled(Connection connection) throws IOException {
return connection.getAdmin().getSecurityCapabilities() return connection.getAdmin().getSecurityCapabilities()
@ -63,7 +63,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) public static VisibilityLabelsResponse addLabel(Connection connection, final String label)
throws Throwable { throws Throwable {
@ -71,7 +71,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) public static VisibilityLabelsResponse addLabels(Connection connection, final String[] labels)
throws Throwable { throws Throwable {
@ -109,7 +109,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, public static VisibilityLabelsResponse setAuths(Connection connection, final String[] auths,
final String user) throws Throwable { final String user) throws Throwable {
@ -154,7 +154,7 @@ public class VisibilityClient {
* Retrieve the list of visibility labels defined in the system. * Retrieve the list of visibility labels defined in the system.
* @param connection The Connection instance to use. * @param connection The Connection instance to use.
* @param regex The regular expression to filter which labels are returned. * @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) public static ListLabelsResponse listLabels(Connection connection, final String regex)
throws Throwable { throws Throwable {
@ -190,7 +190,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, public static VisibilityLabelsResponse clearAuths(Connection connection, final String[] auths,
final String user) throws Throwable { final String user) throws Throwable {

View File

@ -562,7 +562,7 @@ public final class ProtobufUtil {
/** /**
* Convert a protocol buffer Get to a client Get * Convert a protocol buffer Get to a client Get
* @param proto the protocol buffer Get to convert * @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 { public static Get toGet(final ClientProtos.Get proto) throws IOException {
if (proto == null) return null; if (proto == null) return null;
@ -647,7 +647,7 @@ public final class ProtobufUtil {
/** /**
* Convert a protocol buffer Mutate to a Put. * Convert a protocol buffer Mutate to a Put.
* @param proto The protocol buffer MutationProto to convert * @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 { public static Put toPut(final MutationProto proto) throws IOException {
return toPut(proto, null); return toPut(proto, null);
@ -657,7 +657,7 @@ public final class ProtobufUtil {
* Convert a protocol buffer Mutate to a Put. * Convert a protocol buffer Mutate to a Put.
* @param proto The protocol buffer MutationProto to convert * @param proto The protocol buffer MutationProto to convert
* @param cellScanner If non-null, the Cell data that goes with this proto. * @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) public static Put toPut(final MutationProto proto, final CellScanner cellScanner)
throws IOException { throws IOException {
@ -741,7 +741,7 @@ public final class ProtobufUtil {
/** /**
* Convert a protocol buffer Mutate to a Delete * Convert a protocol buffer Mutate to a Delete
* @param proto the protocol buffer Mutate to convert * @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 { public static Delete toDelete(final MutationProto proto) throws IOException {
return toDelete(proto, null); return toDelete(proto, null);
@ -751,7 +751,7 @@ public final class ProtobufUtil {
* Convert a protocol buffer Mutate to a Delete * Convert a protocol buffer Mutate to a Delete
* @param proto the protocol buffer Mutate to convert * @param proto the protocol buffer Mutate to convert
* @param cellScanner if non-null, the data that goes with this delete. * @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) public static Delete toDelete(final MutationProto proto, final CellScanner cellScanner)
throws IOException { throws IOException {
@ -920,7 +920,7 @@ public final class ProtobufUtil {
/** /**
* Convert a MutateRequest to Mutation * Convert a MutateRequest to Mutation
* @param proto the protocol buffer Mutate to convert * @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 { public static Mutation toMutation(final MutationProto proto) throws IOException {
MutationType type = proto.getMutateType(); MutationType type = proto.getMutateType();
@ -968,7 +968,7 @@ public final class ProtobufUtil {
/** /**
* Convert a client Scan to a protocol buffer Scan * Convert a client Scan to a protocol buffer Scan
* @param scan the client Scan to convert * @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 { public static ClientProtos.Scan toScan(final Scan scan) throws IOException {
ClientProtos.Scan.Builder scanBuilder = ClientProtos.Scan.newBuilder(); ClientProtos.Scan.Builder scanBuilder = ClientProtos.Scan.newBuilder();
@ -1062,7 +1062,7 @@ public final class ProtobufUtil {
/** /**
* Convert a protocol buffer Scan to a client Scan * Convert a protocol buffer Scan to a client Scan
* @param proto the protocol buffer Scan to convert * @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 { public static Scan toScan(final ClientProtos.Scan proto) throws IOException {
byte[] startRow = HConstants.EMPTY_START_ROW; byte[] startRow = HConstants.EMPTY_START_ROW;
@ -1182,7 +1182,7 @@ public final class ProtobufUtil {
/** /**
* Create a protocol buffer Get based on a client Get. * Create a protocol buffer Get based on a client Get.
* @param get the 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 { public static ClientProtos.Get toGet(final Get get) throws IOException {
ClientProtos.Get.Builder builder = ClientProtos.Get.newBuilder(); ClientProtos.Get.Builder builder = ClientProtos.Get.newBuilder();
@ -1248,7 +1248,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, public static MutationProto toMutation(final MutationType type, final Mutation mutation,
final long nonce) throws IOException { final long nonce) throws IOException {
@ -1297,8 +1298,8 @@ public final class ProtobufUtil {
/** /**
* Create a protocol buffer MutationProto based on a client Mutation. Does NOT include data. * 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 * Understanding is that the Cell will be transported other than via protobuf.
* protobuf'd Mutation n * @return a protobuf'd Mutation
*/ */
public static MutationProto toMutationNoData(final MutationType type, final Mutation mutation, public static MutationProto toMutationNoData(final MutationType type, final Mutation mutation,
final MutationProto.Builder builder) throws IOException { final MutationProto.Builder builder) throws IOException {
@ -1307,8 +1308,8 @@ public final class ProtobufUtil {
/** /**
* Create a protocol buffer MutationProto based on a client Mutation. Does NOT include data. * 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 * Understanding is that the Cell will be transported other than via protobuf.
* protobuf'd Mutation n * @return a protobuf'd Mutation
*/ */
public static MutationProto toMutationNoData(final MutationType type, final Mutation mutation) public static MutationProto toMutationNoData(final MutationType type, final Mutation mutation)
throws IOException { throws IOException {
@ -1334,8 +1335,8 @@ public final class ProtobufUtil {
/** /**
* Code shared by {@link #toMutation(MutationType, Mutation)} and * Code shared by {@link #toMutation(MutationType, Mutation)} and
* {@link #toMutationNoData(MutationType, Mutation)} nn * @return A partly-filled out protobuf'd * {@link #toMutationNoData(MutationType, Mutation)}
* Mutation. * @return A partly-filled out protobuf'd Mutation.
*/ */
private static MutationProto.Builder getMutationBuilderAndSetCommonFields(final MutationType type, private static MutationProto.Builder getMutationBuilderAndSetCommonFields(final MutationType type,
final Mutation mutation, MutationProto.Builder builder) { final Mutation mutation, MutationProto.Builder builder) {
@ -1468,7 +1469,7 @@ public final class ProtobufUtil {
* Convert a protocol buffer Result to a client Result * Convert a protocol buffer Result to a client Result
* @param proto the protocol buffer Result to convert * @param proto the protocol buffer Result to convert
* @param scanner Optional cell scanner. * @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) public static Result toResult(final ClientProtos.Result proto, final CellScanner scanner)
throws IOException { throws IOException {
@ -1583,8 +1584,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a delete KeyValue type to protocol buffer DeleteType. n * @return protocol buffer * Convert a delete KeyValue type to protocol buffer DeleteType.
* DeleteType n * @return protocol buffer DeleteType
*/ */
public static DeleteType toDeleteType(KeyValue.Type type) throws IOException { public static DeleteType toDeleteType(KeyValue.Type type) throws IOException {
switch (type) { switch (type) {
@ -1604,7 +1605,7 @@ public final class ProtobufUtil {
/** /**
* Convert a protocol buffer DeleteType to delete KeyValue type. * Convert a protocol buffer DeleteType to delete KeyValue type.
* @param type The DeleteType * @param type The DeleteType
* @return The type. n * @return The type.
*/ */
public static KeyValue.Type fromDeleteType(DeleteType type) throws IOException { public static KeyValue.Type fromDeleteType(DeleteType type) throws IOException {
switch (type) { switch (type) {
@ -1690,7 +1691,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, public static void closeRegion(final RpcController controller,
final AdminService.BlockingInterface admin, final ServerName server, final byte[] regionName) final AdminService.BlockingInterface admin, final ServerName server, final byte[] regionName)
@ -1705,7 +1706,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, public static void warmupRegion(final RpcController controller,
final AdminService.BlockingInterface admin, final AdminService.BlockingInterface admin,
@ -1722,7 +1723,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, public static void openRegion(final RpcController controller,
final AdminService.BlockingInterface admin, ServerName server, final AdminService.BlockingInterface admin, ServerName server,
@ -1736,8 +1737,8 @@ public final class ProtobufUtil {
} }
/** /**
* A helper to get the all the online regions on a region server using admin protocol. n * @return * A helper to get the all the online regions on a region server using admin protocol.
* a list of online region info n * @return a list of online region info
*/ */
public static List<org.apache.hadoop.hbase.client.RegionInfo> public static List<org.apache.hadoop.hbase.client.RegionInfo>
getOnlineRegions(final AdminService.BlockingInterface admin) throws IOException { getOnlineRegions(final AdminService.BlockingInterface admin) throws IOException {
@ -2069,7 +2070,8 @@ public final class ProtobufUtil {
/** /**
* Return short version of Message toString'd, shorter than TextFormat#shortDebugString. Tries to * 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 * 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) { public static String getShortTextFormat(Message m) {
if (m == null) return "null"; if (m == null) return "null";
@ -2216,8 +2218,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a protocol buffer CellVisibility to a client CellVisibility n * @return the converted * Convert a protocol buffer CellVisibility to a client CellVisibility
* client CellVisibility * @return the converted client CellVisibility
*/ */
public static CellVisibility toCellVisibility(ClientProtos.CellVisibility proto) { public static CellVisibility toCellVisibility(ClientProtos.CellVisibility proto) {
if (proto == null) return null; if (proto == null) return null;
@ -2225,8 +2227,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a protocol buffer CellVisibility bytes to a client CellVisibility n * @return the * Convert a protocol buffer CellVisibility bytes to a client CellVisibility
* converted client CellVisibility n * @return the converted client CellVisibility
*/ */
public static CellVisibility toCellVisibility(byte[] protoBytes) throws DeserializationException { public static CellVisibility toCellVisibility(byte[] protoBytes) throws DeserializationException {
if (protoBytes == null) return null; if (protoBytes == null) return null;
@ -2242,8 +2244,8 @@ public final class ProtobufUtil {
} }
/** /**
* Create a protocol buffer CellVisibility based on a client CellVisibility. n * @return a * Create a protocol buffer CellVisibility based on a client CellVisibility.
* protocol buffer CellVisibility * @return a protocol buffer CellVisibility
*/ */
public static ClientProtos.CellVisibility toCellVisibility(CellVisibility cellVisibility) { public static ClientProtos.CellVisibility toCellVisibility(CellVisibility cellVisibility) {
ClientProtos.CellVisibility.Builder builder = ClientProtos.CellVisibility.newBuilder(); ClientProtos.CellVisibility.Builder builder = ClientProtos.CellVisibility.newBuilder();
@ -2252,8 +2254,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a protocol buffer Authorizations to a client Authorizations n * @return the converted * Convert a protocol buffer Authorizations to a client Authorizations
* client Authorizations * @return the converted client Authorizations
*/ */
public static Authorizations toAuthorizations(ClientProtos.Authorizations proto) { public static Authorizations toAuthorizations(ClientProtos.Authorizations proto) {
if (proto == null) return null; if (proto == null) return null;
@ -2261,8 +2263,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a protocol buffer Authorizations bytes to a client Authorizations n * @return the * Convert a protocol buffer Authorizations bytes to a client Authorizations
* converted client Authorizations n * @return the converted client Authorizations
*/ */
public static Authorizations toAuthorizations(byte[] protoBytes) throws DeserializationException { public static Authorizations toAuthorizations(byte[] protoBytes) throws DeserializationException {
if (protoBytes == null) return null; if (protoBytes == null) return null;
@ -2278,8 +2280,8 @@ public final class ProtobufUtil {
} }
/** /**
* Create a protocol buffer Authorizations based on a client Authorizations. n * @return a * Create a protocol buffer Authorizations based on a client Authorizations.
* protocol buffer Authorizations * @return a protocol buffer Authorizations
*/ */
public static ClientProtos.Authorizations toAuthorizations(Authorizations authorizations) { public static ClientProtos.Authorizations toAuthorizations(Authorizations authorizations) {
ClientProtos.Authorizations.Builder builder = ClientProtos.Authorizations.newBuilder(); ClientProtos.Authorizations.Builder builder = ClientProtos.Authorizations.newBuilder();
@ -2290,8 +2292,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a protocol buffer TimeUnit to a client TimeUnit n * @return the converted client * Convert a protocol buffer TimeUnit to a client TimeUnit
* TimeUnit * @return the converted client TimeUnit
*/ */
public static TimeUnit toTimeUnit(final HBaseProtos.TimeUnit proto) { public static TimeUnit toTimeUnit(final HBaseProtos.TimeUnit proto) {
switch (proto) { switch (proto) {
@ -2314,8 +2316,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a client TimeUnit to a protocol buffer TimeUnit n * @return the converted protocol * Convert a client TimeUnit to a protocol buffer TimeUnit
* buffer TimeUnit * @return the converted protocol buffer TimeUnit
*/ */
public static HBaseProtos.TimeUnit toProtoTimeUnit(final TimeUnit timeUnit) { public static HBaseProtos.TimeUnit toProtoTimeUnit(final TimeUnit timeUnit) {
switch (timeUnit) { switch (timeUnit) {
@ -2338,8 +2340,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a protocol buffer ThrottleType to a client ThrottleType n * @return the converted * Convert a protocol buffer ThrottleType to a client ThrottleType
* client ThrottleType * @return the converted client ThrottleType
*/ */
public static ThrottleType toThrottleType(final QuotaProtos.ThrottleType proto) { public static ThrottleType toThrottleType(final QuotaProtos.ThrottleType proto) {
switch (proto) { switch (proto) {
@ -2367,8 +2369,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a client ThrottleType to a protocol buffer ThrottleType n * @return the converted * Convert a client ThrottleType to a protocol buffer ThrottleType
* protocol buffer ThrottleType * @return the converted protocol buffer ThrottleType
*/ */
public static QuotaProtos.ThrottleType toProtoThrottleType(final ThrottleType type) { public static QuotaProtos.ThrottleType toProtoThrottleType(final ThrottleType type) {
switch (type) { switch (type) {
@ -2396,8 +2398,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a protocol buffer QuotaScope to a client QuotaScope n * @return the converted client * Convert a protocol buffer QuotaScope to a client QuotaScope
* QuotaScope * @return the converted client QuotaScope
*/ */
public static QuotaScope toQuotaScope(final QuotaProtos.QuotaScope proto) { public static QuotaScope toQuotaScope(final QuotaProtos.QuotaScope proto) {
switch (proto) { switch (proto) {
@ -2410,8 +2412,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a client QuotaScope to a protocol buffer QuotaScope n * @return the converted protocol * Convert a client QuotaScope to a protocol buffer QuotaScope
* buffer QuotaScope * @return the converted protocol buffer QuotaScope
*/ */
public static QuotaProtos.QuotaScope toProtoQuotaScope(final QuotaScope scope) { public static QuotaProtos.QuotaScope toProtoQuotaScope(final QuotaScope scope) {
switch (scope) { switch (scope) {
@ -2424,8 +2426,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a protocol buffer QuotaType to a client QuotaType n * @return the converted client * Convert a protocol buffer QuotaType to a client QuotaType
* QuotaType * @return the converted client QuotaType
*/ */
public static QuotaType toQuotaScope(final QuotaProtos.QuotaType proto) { public static QuotaType toQuotaScope(final QuotaProtos.QuotaType proto) {
switch (proto) { switch (proto) {
@ -2438,8 +2440,8 @@ public final class ProtobufUtil {
} }
/** /**
* Convert a client QuotaType to a protocol buffer QuotaType n * @return the converted protocol * Convert a client QuotaType to a protocol buffer QuotaType
* buffer QuotaType * @return the converted protocol buffer QuotaType
*/ */
public static QuotaProtos.QuotaType toProtoQuotaScope(final QuotaType type) { public static QuotaProtos.QuotaType toProtoQuotaScope(final QuotaType type) {
switch (type) { switch (type) {
@ -2566,7 +2568,7 @@ public final class ProtobufUtil {
* This version of protobuf's mergeDelimitedFrom avoid the hard-coded 64MB limit for decoding * This version of protobuf's mergeDelimitedFrom avoid the hard-coded 64MB limit for decoding
* buffers * buffers
* @param builder current message builder * @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) public static void mergeDelimitedFrom(Message.Builder builder, InputStream in)
throws IOException { throws IOException {
@ -2588,7 +2590,7 @@ public final class ProtobufUtil {
* where the message size is known * where the message size is known
* @param builder current message builder * @param builder current message builder
* @param in InputStream containing protobuf data * @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) public static void mergeFrom(Message.Builder builder, InputStream in, int size)
throws IOException { throws IOException {
@ -2602,7 +2604,7 @@ public final class ProtobufUtil {
* This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers * This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers
* where the message size is not known * where the message size is not known
* @param builder current message builder * @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 { public static void mergeFrom(Message.Builder builder, InputStream in) throws IOException {
final CodedInputStream codedInput = CodedInputStream.newInstance(in); final CodedInputStream codedInput = CodedInputStream.newInstance(in);
@ -2615,7 +2617,7 @@ public final class ProtobufUtil {
* This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when * This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when
* working with ByteStrings * working with ByteStrings
* @param builder current message builder * @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 { public static void mergeFrom(Message.Builder builder, ByteString bs) throws IOException {
final CodedInputStream codedInput = bs.newCodedInput(); final CodedInputStream codedInput = bs.newCodedInput();
@ -2628,7 +2630,7 @@ public final class ProtobufUtil {
* This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when * This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when
* working with byte arrays * working with byte arrays
* @param builder current message builder * @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 { public static void mergeFrom(Message.Builder builder, byte[] b) throws IOException {
final CodedInputStream codedInput = CodedInputStream.newInstance(b); final CodedInputStream codedInput = CodedInputStream.newInstance(b);
@ -2641,7 +2643,7 @@ public final class ProtobufUtil {
* This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when * This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when
* working with byte arrays * working with byte arrays
* @param builder current message builder * @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) public static void mergeFrom(Message.Builder builder, byte[] b, int offset, int length)
throws IOException { throws IOException {
@ -2821,7 +2823,7 @@ public final class ProtobufUtil {
/** /**
* Creates {@link CompactionState} from {@link GetRegionInfoResponse.CompactionState} state * 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) { public static CompactionState createCompactionState(GetRegionInfoResponse.CompactionState state) {
return CompactionState.valueOf(state.toString()); return CompactionState.valueOf(state.toString());
@ -2833,7 +2835,7 @@ public final class ProtobufUtil {
/** /**
* Creates {@link CompactionState} from {@link RegionLoad.CompactionState} state * Creates {@link CompactionState} from {@link RegionLoad.CompactionState} state
* @param state the protobuf CompactionState n * @param state the protobuf CompactionState
*/ */
public static CompactionState public static CompactionState
createCompactionStateForRegionLoad(RegionLoad.CompactionState state) { createCompactionStateForRegionLoad(RegionLoad.CompactionState state) {
@ -2938,9 +2940,7 @@ public final class ProtobufUtil {
stats.getCompactionPressure()); stats.getCompactionPressure());
} }
/** /** Returns A String version of the passed in <code>msg</code> */
* n * @return A String version of the passed in <code>msg</code>
*/
public static String toText(Message msg) { public static String toText(Message msg) {
return TextFormat.shortDebugString(msg); return TextFormat.shortDebugString(msg);
} }
@ -2950,7 +2950,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 { public static <T> T call(Callable<T> callable) throws IOException {
try { try {
@ -3061,7 +3061,7 @@ public final class ProtobufUtil {
* magic and that is then followed by a protobuf that has a serialized * magic and that is then followed by a protobuf that has a serialized
* {@link ServerName} in it. * {@link ServerName} in it.
* @return Returns null if <code>data</code> is null else converts passed data to a ServerName * @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 { public static ServerName parseServerNameFrom(final byte[] data) throws DeserializationException {
if (data == null || data.length <= 0) return null; if (data == null || data.length <= 0) return null;

View File

@ -195,7 +195,7 @@ public final class RequestConverter {
/** /**
* Create a protocol buffer MutateRequest for a conditioned put/delete/increment/append * 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, public static MutateRequest buildMutateRequest(final byte[] regionName, final byte[] row,
final byte[] family, final byte[] qualifier, final CompareOperator op, final byte[] value, final byte[] family, final byte[] qualifier, final CompareOperator op, final byte[] value,
@ -215,7 +215,7 @@ public final class RequestConverter {
/** /**
* Create a protocol buffer MultiRequest for conditioned row mutations * 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, public static ClientProtos.MultiRequest buildMultiRequest(final byte[] regionName,
final byte[] row, final byte[] family, final byte[] qualifier, final CompareOperator op, final byte[] row, final byte[] family, final byte[] qualifier, final CompareOperator op,
@ -272,7 +272,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) public static MutateRequest buildMutateRequest(final byte[] regionName, final Put put)
throws IOException { throws IOException {
@ -284,7 +285,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, public static MutateRequest buildMutateRequest(final byte[] regionName, final Append append,
long nonceGroup, long nonce) throws IOException { long nonceGroup, long nonce) throws IOException {
@ -300,7 +302,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, public static MutateRequest buildMutateRequest(final byte[] regionName, final Increment increment,
final long nonceGroup, final long nonce) throws IOException { final long nonceGroup, final long nonce) throws IOException {
@ -316,7 +319,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) public static MutateRequest buildMutateRequest(final byte[] regionName, final Delete delete)
throws IOException { throws IOException {
@ -336,7 +340,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, public static ScanRequest buildScanRequest(byte[] regionName, Scan scan, int numberOfRows,
boolean closeScanner) throws IOException { boolean closeScanner) throws IOException {
@ -356,7 +361,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, public static ScanRequest buildScanRequest(long scannerId, int numberOfRows, boolean closeScanner,
boolean trackMetrics) { boolean trackMetrics) {
@ -371,7 +377,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, public static ScanRequest buildScanRequest(long scannerId, int numberOfRows, boolean closeScanner,
long nextCallSeq, boolean trackMetrics, boolean renew, int limitOfRows) { long nextCallSeq, boolean trackMetrics, boolean renew, int limitOfRows) {
@ -391,7 +398,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( public static BulkLoadHFileRequest buildBulkLoadHFileRequest(
final List<Pair<byte[], String>> familyPaths, final byte[] regionName, boolean assignSeqNum, final List<Pair<byte[], String>> familyPaths, final byte[] regionName, boolean assignSeqNum,
@ -457,7 +465,7 @@ public final class RequestConverter {
* @param mutationBuilder mutationBuilder to be used to build mutation. * @param mutationBuilder mutationBuilder to be used to build mutation.
* @param nonceGroup nonceGroup to be applied. * @param nonceGroup nonceGroup to be applied.
* @param indexMap Map of created RegionAction to the original index for a * @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, public static void buildNoDataRegionActions(final byte[] regionName,
final Iterable<Action> actions, final List<CellScannable> cells, final Iterable<Action> actions, final List<CellScannable> cells,
@ -825,7 +833,8 @@ public final class RequestConverter {
/** /**
* Create a CompactRegionRequest for a given region name * Create a CompactRegionRequest for a given region name
* @param regionName the name of the region to get info * @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, public static CompactRegionRequest buildCompactRegionRequest(byte[] regionName, boolean major,
byte[] columnFamily) { byte[] columnFamily) {
@ -883,7 +892,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, public static AddColumnRequest buildAddColumnRequest(final TableName tableName,
final ColumnFamilyDescriptor column, final long nonceGroup, final long nonce) { final ColumnFamilyDescriptor column, final long nonceGroup, final long nonce) {
@ -896,7 +906,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, public static DeleteColumnRequest buildDeleteColumnRequest(final TableName tableName,
final byte[] columnName, final long nonceGroup, final long nonce) { final byte[] columnName, final long nonceGroup, final long nonce) {
@ -909,7 +920,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, public static ModifyColumnRequest buildModifyColumnRequest(final TableName tableName,
final ColumnFamilyDescriptor column, final long nonceGroup, final long nonce) { final ColumnFamilyDescriptor column, final long nonceGroup, final long nonce) {
@ -935,7 +947,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, public static MoveRegionRequest buildMoveRegionRequest(byte[] encodedRegionName,
ServerName destServerName) { ServerName destServerName) {
@ -976,7 +989,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) { public static AssignRegionRequest buildAssignRegionRequest(final byte[] regionName) {
AssignRegionRequest.Builder builder = AssignRegionRequest.newBuilder(); AssignRegionRequest.Builder builder = AssignRegionRequest.newBuilder();
@ -985,7 +999,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) { public static UnassignRegionRequest buildUnassignRegionRequest(final byte[] regionName) {
UnassignRegionRequest.Builder builder = UnassignRegionRequest.newBuilder(); UnassignRegionRequest.Builder builder = UnassignRegionRequest.newBuilder();
@ -994,7 +1009,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) { public static OfflineRegionRequest buildOfflineRegionRequest(final byte[] regionName) {
OfflineRegionRequest.Builder builder = OfflineRegionRequest.newBuilder(); OfflineRegionRequest.Builder builder = OfflineRegionRequest.newBuilder();
@ -1003,7 +1019,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, public static DeleteTableRequest buildDeleteTableRequest(final TableName tableName,
final long nonceGroup, final long nonce) { final long nonceGroup, final long nonce) {
@ -1031,7 +1048,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, public static EnableTableRequest buildEnableTableRequest(final TableName tableName,
final long nonceGroup, final long nonce) { final long nonceGroup, final long nonce) {
@ -1043,7 +1061,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, public static DisableTableRequest buildDisableTableRequest(final TableName tableName,
final long nonceGroup, final long nonce) { final long nonceGroup, final long nonce) {
@ -1055,7 +1074,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, public static CreateTableRequest buildCreateTableRequest(final TableDescriptor tableDescriptor,
final byte[][] splitKeys, final long nonceGroup, final long nonce) { final byte[][] splitKeys, final long nonceGroup, final long nonce) {
@ -1072,7 +1092,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, public static ModifyTableRequest buildModifyTableRequest(final TableName tableName,
final TableDescriptor tableDesc, final long nonceGroup, final long nonce) { final TableDescriptor tableDesc, final long nonceGroup, final long nonce) {
@ -1096,7 +1117,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 public static GetTableDescriptorsRequest
buildGetTableDescriptorsRequest(final List<TableName> tableNames) { buildGetTableDescriptorsRequest(final List<TableName> tableNames) {
@ -1193,7 +1215,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, public static SetBalancerRunningRequest buildSetBalancerRunningRequest(boolean on,
boolean synchronous) { boolean synchronous) {
@ -1278,8 +1301,8 @@ public final class RequestConverter {
} }
/** /**
* Creates a request for querying the master the last flushed sequence Id for a region n * @return * Creates a request for querying the master the last flushed sequence Id for a region
* A {@link GetLastFlushedSequenceIdRequest} * @return A {@link GetLastFlushedSequenceIdRequest}
*/ */
public static GetLastFlushedSequenceIdRequest public static GetLastFlushedSequenceIdRequest
buildGetLastFlushedSequenceIdRequest(byte[] regionName) { buildGetLastFlushedSequenceIdRequest(byte[] regionName) {
@ -1330,7 +1353,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) { public static SetNormalizerRunningRequest buildSetNormalizerRunningRequest(boolean on) {
return SetNormalizerRunningRequest.newBuilder().setOn(on).build(); return SetNormalizerRunningRequest.newBuilder().setOn(on).build();
@ -1438,7 +1462,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 public static CreateNamespaceRequest
buildCreateNamespaceRequest(final NamespaceDescriptor descriptor) { buildCreateNamespaceRequest(final NamespaceDescriptor descriptor) {
@ -1448,7 +1473,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 public static ModifyNamespaceRequest
buildModifyNamespaceRequest(final NamespaceDescriptor descriptor) { buildModifyNamespaceRequest(final NamespaceDescriptor descriptor) {
@ -1458,7 +1484,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) { public static DeleteNamespaceRequest buildDeleteNamespaceRequest(final String name) {
DeleteNamespaceRequest.Builder builder = DeleteNamespaceRequest.newBuilder(); DeleteNamespaceRequest.Builder builder = DeleteNamespaceRequest.newBuilder();
@ -1467,8 +1494,8 @@ public final class RequestConverter {
} }
/** /**
* Creates a protocol buffer GetNamespaceDescriptorRequest n * @return a * Creates a protocol buffer GetNamespaceDescriptorRequest
* GetNamespaceDescriptorRequest * @return a GetNamespaceDescriptorRequest
*/ */
public static GetNamespaceDescriptorRequest public static GetNamespaceDescriptorRequest
buildGetNamespaceDescriptorRequest(final String name) { buildGetNamespaceDescriptorRequest(final String name) {
@ -1592,7 +1619,7 @@ public final class RequestConverter {
/** /**
* Creates IsSnapshotCleanupEnabledRequest to determine if auto snapshot cleanup based on TTL * Creates IsSnapshotCleanupEnabledRequest to determine if auto snapshot cleanup based on TTL
* expiration is turned on n * expiration is turned on
*/ */
public static IsSnapshotCleanupEnabledRequest buildIsSnapshotCleanupEnabledRequest() { public static IsSnapshotCleanupEnabledRequest buildIsSnapshotCleanupEnabledRequest() {
return IsSnapshotCleanupEnabledRequest.newBuilder().build(); return IsSnapshotCleanupEnabledRequest.newBuilder().build();

View File

@ -90,7 +90,7 @@ public final class ResponseConverter {
* @param request the original protocol buffer MultiRequest * @param request the original protocol buffer MultiRequest
* @param response the protocol buffer MultiResponse to convert * @param response the protocol buffer MultiResponse to convert
* @param cells Cells to go with the passed in <code>proto</code>. Can be null. * @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, public static org.apache.hadoop.hbase.client.MultiResponse getResults(final MultiRequest request,
final MultiResponse response, final CellScanner cells) throws IOException { 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 indexMap Used to support RowMutations/CheckAndMutate in batch
* @param response the protocol buffer MultiResponse to convert * @param response the protocol buffer MultiResponse to convert
* @param cells Cells to go with the passed in <code>proto</code>. Can be null. * @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, public static org.apache.hadoop.hbase.client.MultiResponse getResults(final MultiRequest request,
final Map<Integer, Integer> indexMap, final MultiResponse response, final CellScanner cells) final Map<Integer, Integer> indexMap, final MultiResponse response, final CellScanner cells)
@ -247,7 +247,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) { public static ResultOrException.Builder buildActionResult(final Throwable t) {
ResultOrException.Builder builder = ResultOrException.newBuilder(); ResultOrException.Builder builder = ResultOrException.newBuilder();
@ -256,7 +257,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) { public static ResultOrException.Builder buildActionResult(final ClientProtos.Result r) {
ResultOrException.Builder builder = ResultOrException.newBuilder(); ResultOrException.Builder builder = ResultOrException.newBuilder();
@ -264,9 +266,7 @@ public final class ResponseConverter {
return builder; return builder;
} }
/** /** Returns NameValuePair of the exception name to stringified version os exception. */
* n * @return NameValuePair of the exception name to stringified version os exception.
*/
public static NameBytesPair buildException(final Throwable t) { public static NameBytesPair buildException(final Throwable t) {
NameBytesPair.Builder parameterBuilder = NameBytesPair.newBuilder(); NameBytesPair.Builder parameterBuilder = NameBytesPair.newBuilder();
parameterBuilder.setName(t.getClass().getName()); parameterBuilder.setName(t.getClass().getName());
@ -307,7 +307,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, public static GetServerInfoResponse buildGetServerInfoResponse(final ServerName serverName,
final int webuiPort) { final int webuiPort) {
@ -322,7 +323,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 public static GetOnlineRegionResponse
buildGetOnlineRegionResponse(final List<RegionInfo> regions) { buildGetOnlineRegionResponse(final List<RegionInfo> regions) {
@ -405,7 +407,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) public static Result[] getResults(CellScanner cellScanner, ScanResponse response)
throws IOException { throws IOException {

View File

@ -91,7 +91,7 @@ public class Writables {
* @return The passed Writable after its readFields has been called fed by the passed * @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 or IllegalArgumentException if passed null or an empty
* <code>bytes</code> array. * <code>bytes</code> array.
* @throws IOException e n * @throws IOException e
*/ */
public static Writable getWritable(final byte[] bytes, final Writable w) throws IOException { public static Writable getWritable(final byte[] bytes, final Writable w) throws IOException {
return getWritable(bytes, 0, bytes.length, w); 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 * @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 or IllegalArgumentException if passed null or an empty
* <code>bytes</code> array. * <code>bytes</code> array.
* @throws IOException e n * @throws IOException e
*/ */
public static Writable getWritable(final byte[] bytes, final int offset, final int length, public static Writable getWritable(final byte[] bytes, final int offset, final int length,
final Writable w) throws IOException { final Writable w) throws IOException {

View File

@ -144,7 +144,7 @@ public class ZNodePaths {
/** /**
* Parses the meta replicaId from the passed path. * 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) { public int getMetaReplicaIdFromPath(String path) {
// Extract the znode from path. The prefix is of the following format. // Extract the znode from path. The prefix is of the following format.
@ -155,7 +155,7 @@ public class ZNodePaths {
/** /**
* Parse the meta replicaId from the passed znode * 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) { public int getMetaReplicaIdFromZNode(String znode) {
return znode.equals(metaZNodePrefix) return znode.equals(metaZNodePrefix)

View File

@ -42,7 +42,7 @@ public class TestDeleteTimeStamp {
private static final byte[] QUALIFIER = Bytes.toBytes("testQualifier"); 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 @Test
public void testTimeStamp() { public void testTimeStamp() {

View File

@ -100,7 +100,8 @@ public final class AuthUtil {
/** /**
* For kerberized cluster, return login user (from kinit or from keytab if specified). For * For kerberized cluster, return login user (from kinit or from keytab if specified). For
* non-kerberized cluster, return system user. * 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 @InterfaceAudience.Private
public static User loginClient(Configuration conf) throws IOException { public static User loginClient(Configuration conf) throws IOException {
@ -160,7 +161,8 @@ public final class AuthUtil {
* <p> * <p>
* NOT recommend to use to method unless you're sure what you're doing, it is for canary only. * NOT recommend to use to method unless you're sure what you're doing, it is for canary only.
* Please use User#loginClient. * 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 { private static User loginClientAsService(Configuration conf) throws IOException {
UserProvider provider = UserProvider.instantiate(conf); UserProvider provider = UserProvider.instantiate(conf);

View File

@ -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 * 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) { public void setKey(ByteBuffer key, int offset, int length) {
setKey(key, offset, length, ByteBufferUtils.toShort(key, offset)); setKey(key, offset, length, ByteBufferUtils.toShort(key, offset));

View File

@ -48,7 +48,7 @@ public interface CellBuilder {
Cell build(); Cell build();
/** /**
* Remove all internal elements from builder. n * Remove all internal elements from builder.
*/ */
CellBuilder clear(); CellBuilder clear();
} }

View File

@ -661,9 +661,8 @@ public class CellComparatorImpl implements CellComparator {
/** /**
* Compares the row part of the cell with a simple plain byte[] like the stopRow in Scan. This * 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 * 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 * {{@link MetaCellComparator#META_COMPARATOR} should be used the cell to be compared the kv
* kv serialized byte[] to be compared with n * the offset in the byte[] n * the length in the * serialized byte[] to be compared with the offset in the byte[] the length in the byte[]
* byte[]
* @return 0 if both cell and the byte[] are equal, 1 if the cell is bigger than byte[], -1 * @return 0 if both cell and the byte[] are equal, 1 if the cell is bigger than byte[], -1
* otherwise * otherwise
*/ */

View File

@ -77,7 +77,8 @@ public final class CellUtil {
/** /**
* Makes a column in family:qualifier form from separate byte arrays. * Makes a column in family:qualifier form from separate byte arrays.
* <p> * <p>
* Not recommended for usage as this is old-style API. nn * @return family:qualifier * Not recommended for usage as this is old-style API.
* @return family:qualifier
*/ */
public static byte[] makeColumn(byte[] family, byte[] qualifier) { public static byte[] makeColumn(byte[] family, byte[] qualifier) {
return Bytes.add(family, COLUMN_FAMILY_DELIM_ARRAY, qualifier); return Bytes.add(family, COLUMN_FAMILY_DELIM_ARRAY, qualifier);
@ -292,9 +293,7 @@ public final class CellUtil {
return destinationOffset + vlen; return destinationOffset + vlen;
} }
/** /** Returns CellScanner interface over <code>cellIterables</code> */
* n * @return CellScanner interface over <code>cellIterables</code>
*/
public static CellScanner public static CellScanner
createCellScanner(final List<? extends CellScannable> cellScannerables) { createCellScanner(final List<? extends CellScannable> cellScannerables) {
return new CellScanner() { return new CellScanner() {
@ -320,17 +319,15 @@ public final class CellUtil {
}; };
} }
/** /** Returns CellScanner interface over <code>cellIterable</code> */
* n * @return CellScanner interface over <code>cellIterable</code>
*/
public static CellScanner createCellScanner(final Iterable<Cell> cellIterable) { public static CellScanner createCellScanner(final Iterable<Cell> cellIterable) {
if (cellIterable == null) return null; if (cellIterable == null) return null;
return createCellScanner(cellIterable.iterator()); return createCellScanner(cellIterable.iterator());
} }
/** /**
* n * @return CellScanner interface over <code>cellIterable</code> or null if <code>cells</code> * Returns CellScanner interface over <code>cellIterable</code> or null if <code>cells</code> is
* is null * null
*/ */
public static CellScanner createCellScanner(final Iterator<Cell> cells) { public static CellScanner createCellScanner(final Iterator<Cell> cells) {
if (cells == null) return null; if (cells == null) return null;
@ -352,9 +349,7 @@ public final class CellUtil {
}; };
} }
/** /** Returns CellScanner interface over <code>cellArray</code> */
* n * @return CellScanner interface over <code>cellArray</code>
*/
public static CellScanner createCellScanner(final Cell[] cellArray) { public static CellScanner createCellScanner(final Cell[] cellArray) {
return new CellScanner() { return new CellScanner() {
private final Cell[] cells = cellArray; private final Cell[] cells = cellArray;

View File

@ -145,7 +145,7 @@ public class CompoundConfiguration extends Configuration {
/** /**
* Add Bytes map to config list. This map is generally created by HTableDescriptor or * 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 * 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 * @return this, for builder pattern
*/ */
public CompoundConfiguration addBytesMap(final Map<Bytes, Bytes> map) { public CompoundConfiguration addBytesMap(final Map<Bytes, Bytes> map) {

View File

@ -41,7 +41,7 @@ public interface ExtendedCell extends RawCell, HeapSize {
* &lt;tags&gt;</code> * &lt;tags&gt;</code>
* @param out Stream to which cell has to be written * @param out Stream to which cell has to be written
* @param withTags Whether to write tags. * @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. // TODO remove the boolean param once HBASE-16706 is done.
default int write(OutputStream out, boolean withTags) throws IOException { default int write(OutputStream out, boolean withTags) throws IOException {

View File

@ -182,7 +182,7 @@ public class HBaseConfiguration extends Configuration {
* @param conf configuration instance for accessing the passwords * @param conf configuration instance for accessing the passwords
* @param alias the name of the password element * @param alias the name of the password element
* @param defPass the default password * @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) public static String getPassword(Configuration conf, String alias, String defPass)
throws IOException { throws IOException {

View File

@ -1840,8 +1840,8 @@ public class KeyValue implements ExtendedCell, Cloneable {
* Compare columnFamily, qualifier, timestamp, and key type (everything except the row). This * 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 * 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 * 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 * we don't validate that assumption here. the length of the common prefix of the two key-values
* key-values being compared, including row length and row * being compared, including row length and row
*/ */
private int compareWithoutRow(int commonPrefix, byte[] left, int loffset, int llength, private int compareWithoutRow(int commonPrefix, byte[] left, int loffset, int llength,
byte[] right, int roffset, int rlength, short rowlength) { byte[] right, int roffset, int rlength, short rowlength) {

View File

@ -55,8 +55,8 @@ public class KeyValueTestUtil {
/** /**
* Checks whether KeyValues from kvCollection2 are contained in kvCollection1. The comparison is * 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 * made without distinguishing MVCC version of the KeyValues
* kvCollection2 are contained in kvCollection1 * @return true if KeyValues from kvCollection2 are contained in kvCollection1
*/ */
public static boolean containsIgnoreMvccVersion(Collection<? extends Cell> kvCollection1, public static boolean containsIgnoreMvccVersion(Collection<? extends Cell> kvCollection1,
Collection<? extends Cell> kvCollection2) { Collection<? extends Cell> kvCollection2) {

View File

@ -58,8 +58,8 @@ public class KeyValueUtil {
/** /**
* Returns number of bytes this cell's key part would have been used if serialized as in * 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 * {@link KeyValue}. Key includes rowkey, family, qualifier, timestamp and type.
* key length * @return the key length
*/ */
public static int keyLength(final Cell cell) { public static int keyLength(final Cell cell) {
return keyLength(cell.getRowLength(), cell.getFamilyLength(), cell.getQualifierLength()); 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 * The position will be set to the beginning of the new ByteBuffer
* containing the key part of the cell * @return the Bytebuffer containing the key part of the cell
*/ */
public static ByteBuffer copyKeyToNewByteBuffer(final Cell cell) { public static ByteBuffer copyKeyToNewByteBuffer(final Cell cell) {
byte[] bytes = new byte[keyLength(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 * Copies the key to a new KeyValue
* the incoming cell * @return the KeyValue that consists only the key part of the incoming cell
*/ */
public static KeyValue toNewKeyCell(final Cell cell) { public static KeyValue toNewKeyCell(final Cell cell) {
byte[] bytes = new byte[keyLength(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 * 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, public static KeyValue nextShallowCopy(final ByteBuffer bb, final boolean includesMvccVersion,
boolean includesTags) { boolean includesTags) {
@ -236,7 +236,8 @@ public class KeyValueUtil {
/** /**
* Decrement the timestamp. For tests (currently wasteful) Remember timestamps are sorted reverse * 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) { public static KeyValue previousKey(final KeyValue in) {
return createFirstOnRow(CellUtil.cloneRow(in), CellUtil.cloneFamily(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 * 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 * 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 * * reseeking. Should NEVER be returned to a client. row key row offset row length family name
* family name n * family offset n * family length n * column qualifier n * qualifier offset n * * family offset family length column qualifier qualifier offset qualifier length
* qualifier length
* @return Last possible key on passed row, family, qualifier. * @return Last possible key on passed row, family, qualifier.
*/ */
public static KeyValue createLastOnRow(final byte[] row, final int roffset, final int rlength, public static KeyValue createLastOnRow(final byte[] row, final int roffset, final int rlength,
@ -408,11 +408,11 @@ public class KeyValueUtil {
/*************** misc **********************************/ /*************** misc **********************************/
/** /**
* n * @return <code>cell</code> if it is an object of class {@link KeyValue} else we will return * @return <code>cell</code> if it is an object of class {@link KeyValue} else we will return a
* a new {@link KeyValue} instance made from <code>cell</code> Note: Even if the cell is an object * new {@link KeyValue} instance made from <code>cell</code> Note: Even if the cell is an
* of any of the subclass of {@link KeyValue}, we will create a new {@link KeyValue} object * object of any of the subclass of {@link KeyValue}, we will create a new
* wrapping same buffer. This API is used only with MR based tools which expect the type to be * {@link KeyValue} object wrapping same buffer. This API is used only with MR based tools
* exactly KeyValue. That is the reason for doing this way. * which expect the type to be exactly KeyValue. That is the reason for doing this way.
* @deprecated without any replacement. * @deprecated without any replacement.
*/ */
@Deprecated @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 * Write out a KeyValue in the manner in which we used to when KeyValue was a Writable.
* * @return Length written on stream n * @see #create(DataInput) for the inverse function * @return Length written on stream
* @see #create(DataInput) for the inverse function
*/ */
public static long write(final KeyValue kv, final DataOutput out) throws IOException { 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 // 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 in inputStream to read.
* @param withTags whether the keyvalue should include tags are not * @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 * @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) public static KeyValue createKeyValueFromInputStream(InputStream in, boolean withTags)
throws IOException { 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 * Returns a KeyValue made of a byte array that holds the key-only part. Needed to convert hfile
* hfile index members to KeyValues. * index members to KeyValues.
*/ */
public static KeyValue createKeyValueFromKey(final byte[] b) { public static KeyValue createKeyValueFromKey(final byte[] b) {
return createKeyValueFromKey(b, 0, b.length); return createKeyValueFromKey(b, 0, b.length);
} }
/** /**
* n * @return A KeyValue made of a byte buffer that holds the key-only part. Needed to convert * Return a KeyValue made of a byte buffer that holds the key-only part. Needed to convert hfile
* hfile index members to KeyValues. * index members to KeyValues.
*/ */
public static KeyValue createKeyValueFromKey(final ByteBuffer bb) { public static KeyValue createKeyValueFromKey(final ByteBuffer bb) {
return createKeyValueFromKey(bb.array(), bb.arrayOffset(), bb.limit()); 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 * Return a KeyValue made of a byte array that holds the key-only part. Needed to convert hfile
* hfile index members to KeyValues. * index members to KeyValues.
*/ */
public static KeyValue createKeyValueFromKey(final byte[] b, final int o, final int l) { public static KeyValue createKeyValueFromKey(final byte[] b, final int o, final int l) {
byte[] newb = new byte[l + KeyValue.ROW_OFFSET]; 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 * Where to read bytes from. Creates a byte array to hold the KeyValue backing bytes copied from
* from the steam. * the steam.
* @return KeyValue created by deserializing from <code>in</code> OR if we find a length of zero, * @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 { public static KeyValue create(final DataInput in) throws IOException {
return create(in.readInt(), in); return create(in.readInt(), in);
} }
/** /**
* Create a KeyValue reading <code>length</code> from <code>in</code> nn * @return Created * Create a KeyValue reading <code>length</code> from <code>in</code>
* KeyValue OR if we find a length of zero, we will return null which can be useful marking a * @return Created KeyValue OR if we find a length of zero, we will return null which can be
* stream as done. n * useful marking a stream as done.
*/ */
public static KeyValue create(int length, final DataInput in) throws IOException { public static KeyValue create(int length, final DataInput in) throws IOException {

View File

@ -1046,7 +1046,7 @@ public final class PrivateCellUtil {
* Writes the row from the given cell to the output stream excluding the common prefix * 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 out The dataoutputstream to which the data has to be written
* @param cell The cell whose contents 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, public static void writeRowSkippingBytes(DataOutputStream out, Cell cell, short rlength,
int commonPrefix) throws IOException { int commonPrefix) throws IOException {
@ -1234,7 +1234,6 @@ public final class PrivateCellUtil {
/** /**
* Compares only the key portion of a cell. It does not include the sequence id/mvcc of the cell * 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 &gt; than right lesser than 0 if left &lt; than right * @return an int greater than 0 if left &gt; than right lesser than 0 if left &lt; than right
* equal to 0 if left is equal to right * equal to 0 if left is equal to right
*/ */
@ -2195,7 +2194,7 @@ public final class PrivateCellUtil {
/** /**
* Writes the Cell's key part as it would have serialized in a KeyValue. The format is &lt;2 bytes * Writes the Cell's key part as it would have serialized in a KeyValue. The format is &lt;2 bytes
* rk len&gt;&lt;rk&gt;&lt;1 byte cf len&gt;&lt;cf&gt;&lt;qualifier&gt;&lt;8 bytes * rk len&gt;&lt;rk&gt;&lt;1 byte cf len&gt;&lt;cf&gt;&lt;qualifier&gt;&lt;8 bytes
* timestamp&gt;&lt;1 byte type&gt; nnn * timestamp&gt;&lt;1 byte type&gt;
*/ */
public static void writeFlatKey(Cell cell, DataOutput out) throws IOException { public static void writeFlatKey(Cell cell, DataOutput out) throws IOException {
short rowLen = cell.getRowLength(); short rowLen = cell.getRowLength();
@ -2227,7 +2226,7 @@ public final class PrivateCellUtil {
/** /**
* Deep clones the given cell if the cell supports deep cloning * Deep clones the given cell if the cell supports deep cloning
* @param cell the cell to be cloned * @param cell the cell to be cloned
* @return the cloned cell n * @return the cloned cell
*/ */
public static Cell deepClone(Cell cell) throws CloneNotSupportedException { public static Cell deepClone(Cell cell) throws CloneNotSupportedException {
if (cell instanceof ExtendedCell) { if (cell instanceof ExtendedCell) {
@ -2241,7 +2240,7 @@ public final class PrivateCellUtil {
* @param cell the cell to be written * @param cell the cell to be written
* @param out the outputstream * @param out the outputstream
* @param withTags if tags are to be written or not * @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 { public static int writeCell(Cell cell, OutputStream out, boolean withTags) throws IOException {
if (cell instanceof ExtendedCell) { if (cell instanceof ExtendedCell) {
@ -2316,8 +2315,8 @@ public final class PrivateCellUtil {
/** /**
* Sets the given seqId to the cell. Marked as audience Private as of 1.2.0. Setting a Cell * 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 * sequenceid is an internal implementation detail not for general public use.
* IOException when the passed cell is not of type {@link ExtendedCell} * @throws IOException when the passed cell is not of type {@link ExtendedCell}
*/ */
public static void setSequenceId(Cell cell, long seqId) throws IOException { public static void setSequenceId(Cell cell, long seqId) throws IOException {
if (cell instanceof ExtendedCell) { if (cell instanceof ExtendedCell) {
@ -2329,8 +2328,8 @@ public final class PrivateCellUtil {
} }
/** /**
* Sets the given timestamp to the cell. nn * @throws IOException when the passed cell is not of * Sets the given timestamp to the cell.
* type {@link ExtendedCell} * @throws IOException when the passed cell is not of type {@link ExtendedCell}
*/ */
public static void setTimestamp(Cell cell, long ts) throws IOException { public static void setTimestamp(Cell cell, long ts) throws IOException {
if (cell instanceof ExtendedCell) { if (cell instanceof ExtendedCell) {
@ -2386,7 +2385,7 @@ public final class PrivateCellUtil {
* Writes the row from the given cell to the output stream * Writes the row from the given cell to the output stream
* @param out The outputstream to which the data has to be written * @param out The outputstream to which the data has to be written
* @param cell The cell whose contents 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 { public static void writeRow(OutputStream out, Cell cell, short rlength) throws IOException {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2401,7 +2400,7 @@ public final class PrivateCellUtil {
* Writes the family from the given cell to the output stream * Writes the family from the given cell to the output stream
* @param out The outputstream to which the data has to be written * @param out The outputstream to which the data has to be written
* @param cell The cell whose contents 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 { public static void writeFamily(OutputStream out, Cell cell, byte flength) throws IOException {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2416,7 +2415,7 @@ public final class PrivateCellUtil {
* Writes the qualifier from the given cell to the output stream * Writes the qualifier from the given cell to the output stream
* @param out The outputstream to which the data has to be written * @param out The outputstream to which the data has to be written
* @param cell The cell whose contents 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 { public static void writeQualifier(OutputStream out, Cell cell, int qlength) throws IOException {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2432,7 +2431,7 @@ public final class PrivateCellUtil {
* Writes the qualifier from the given cell to the output stream excluding the common prefix * 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 out The dataoutputstream to which the data has to be written
* @param cell The cell whose contents 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, public static void writeQualifierSkippingBytes(DataOutputStream out, Cell cell, int qlength,
int commonPrefix) throws IOException { int commonPrefix) throws IOException {
@ -2451,7 +2450,7 @@ public final class PrivateCellUtil {
* Writes the value from the given cell to the output stream * Writes the value from the given cell to the output stream
* @param out The outputstream to which the data has to be written * @param out The outputstream to which the data has to be written
* @param cell The cell whose contents 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 { public static void writeValue(OutputStream out, Cell cell, int vlength) throws IOException {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2466,7 +2465,7 @@ public final class PrivateCellUtil {
* Writes the tag from the given cell to the output stream * Writes the tag from the given cell to the output stream
* @param out The outputstream to which the data has to be written * @param out The outputstream to which the data has to be written
* @param cell The cell whose contents 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 { public static void writeTags(OutputStream out, Cell cell, int tagsLength) throws IOException {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2499,7 +2498,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) { public static int getRowAsInt(Cell cell) {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2510,7 +2510,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) { public static long getValueAsLong(Cell cell) {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2521,7 +2522,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) { public static int getValueAsInt(Cell cell) {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2532,7 +2534,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) { public static double getValueAsDouble(Cell cell) {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2543,7 +2546,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) { public static BigDecimal getValueAsBigDecimal(Cell cell) {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2764,8 +2768,9 @@ public final class PrivateCellUtil {
/** /**
* Estimate based on keyvalue's serialization format in the RPC layer. Note that there is an extra * 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 * 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 * cell's are serialized in a contiguous format (For eg in RPCs).
* <code>cell</code> size in bytes plus an extra SIZEOF_INT indicating the actual cell length. * @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) { public static int estimatedSerializedSizeOf(final Cell cell) {
return cell.getSerializedSize() + Bytes.SIZEOF_INT; return cell.getSerializedSize() + Bytes.SIZEOF_INT;
@ -2785,9 +2790,9 @@ public final class PrivateCellUtil {
/** /**
* This method exists just to encapsulate how we serialize keys. To be replaced by a factory that * 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 * 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 * and further, how to serialize the key for inclusion in hfile index. TODO.
* portion of the Cell serialized in the old-school KeyValue way or null if passed a null * @return The key portion of the Cell serialized in the old-school KeyValue way or null if passed
* <code>cell</code> * a null <code>cell</code>
*/ */
public static byte[] getCellKeySerializedAsKeyValueKey(final Cell cell) { public static byte[] getCellKeySerializedAsKeyValueKey(final Cell cell) {
if (cell == null) return null; if (cell == null) return null;
@ -2797,8 +2802,8 @@ public final class PrivateCellUtil {
} }
/** /**
* Create a Cell that is smaller than all other possible Cells for the given Cell's row. n * 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. * @return First possible Cell on passed Cell's row.
*/ */
public static Cell createFirstOnRow(final Cell cell) { public static Cell createFirstOnRow(final Cell cell) {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2862,8 +2867,8 @@ public final class PrivateCellUtil {
/** /**
* Create a Cell that is smaller than all other possible Cells for the given Cell's rk:cf and * 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 * passed qualifier.
* 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) { public static Cell createFirstOnRowCol(final Cell cell, byte[] qArray, int qoffest, int qlength) {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2883,7 +2888,7 @@ public final class PrivateCellUtil {
* Creates the first cell with the row/family/qualifier of this cell and the given timestamp. Uses * 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 * 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. * 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) { public static Cell createFirstOnRowColTS(Cell cell, long ts) {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2901,8 +2906,8 @@ public final class PrivateCellUtil {
} }
/** /**
* Create a Cell that is larger than all other possible Cells for the given Cell's row. n * 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. * @return Last possible Cell on passed Cell's row.
*/ */
public static Cell createLastOnRow(final Cell cell) { public static Cell createLastOnRow(final Cell cell) {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {
@ -2919,7 +2924,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 * 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 * 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) { public static Cell createLastOnRowCol(final Cell cell) {
if (cell instanceof ByteBufferExtendedCell) { if (cell instanceof ByteBufferExtendedCell) {

View File

@ -95,7 +95,7 @@ public abstract class BaseDecoder implements Codec.Decoder {
/** /**
* Extract a Cell. * Extract a Cell.
* @return a parsed Cell or throws an Exception. EOFException or a generic IOException maybe * @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 @NonNull
protected abstract Cell parseCell() throws IOException; protected abstract Cell parseCell() throws IOException;

View File

@ -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 { 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 // TODO add BB backed os check and do for write. Pass Cell

View File

@ -65,7 +65,7 @@ public class CellCodecWithTags 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 { private void write(final byte[] bytes, final int offset, final int length) throws IOException {
this.out.write(Bytes.toBytes(length)); this.out.write(Bytes.toBytes(length));

View File

@ -82,7 +82,7 @@ public class ByteBufferOutputStream extends OutputStream implements ByteBufferWr
} }
/** /**
* This flips the underlying BB so be sure to use it _last_! n * This flips the underlying BB so be sure to use it _last_!
*/ */
public ByteBuffer getByteBuffer() { public ByteBuffer getByteBuffer() {
curBuf.flip(); curBuf.flip();

View File

@ -38,14 +38,14 @@ public interface CellOutputStream {
* Implementation must copy the entire state of the Cell. If the written Cell is modified * Implementation must copy the entire state of the Cell. If the written Cell is modified
* immediately after the write method returns, the modifications must have absolutely no effect on * immediately after the write method returns, the modifications must have absolutely no effect on
* the copy of the Cell that was added in the write. * the copy of the Cell that was added in the write.
* @param cell Cell to write out n * @param cell Cell to write out
*/ */
void write(Cell cell) throws IOException; void write(Cell cell) throws IOException;
/** /**
* Let the implementation decide what to do. Usually means writing accumulated data into a byte[] * Let the implementation decide what to do. Usually means writing accumulated data into a byte[]
* that can then be read from the implementation to be sent to disk, put in the block cache, or * that can then be read from the implementation to be sent to disk, put in the block cache, or
* sent over the network. n * sent over the network.
*/ */
void flush() throws IOException; void flush() throws IOException;
} }

View File

@ -154,8 +154,9 @@ public class ImmutableBytesWritable implements WritableComparable<ImmutableBytes
} }
/** /**
* Compares the bytes in this object to the specified byte array n * @return Positive if left is * Compares the bytes in this object to the specified byte array
* bigger than right, 0 if they are equal, and negative if left is smaller than right. * @return Positive if left is bigger than right, 0 if they are equal, and negative if left is
* smaller than right.
*/ */
public int compareTo(final byte[] that) { public int compareTo(final byte[] that) {
return WritableComparator.compareBytes(this.bytes, this.offset, this.length, that, 0, return WritableComparator.compareBytes(this.bytes, this.offset, this.length, that, 0,

View File

@ -57,7 +57,7 @@ public class TagCompressionContext {
* @param out Stream to which the compressed tags to be written * @param out Stream to which the compressed tags to be written
* @param in Source where tags are available * @param in Source where tags are available
* @param offset Offset for the tags bytes * @param offset Offset for the tags bytes
* @param length Length of all tag bytes n * @param length Length of all tag bytes
*/ */
public void compressTags(OutputStream out, byte[] in, int offset, int length) throws IOException { public void compressTags(OutputStream out, byte[] in, int offset, int length) throws IOException {
int pos = offset; int pos = offset;
@ -76,7 +76,7 @@ public class TagCompressionContext {
* @param out Stream to which the compressed tags to be written * @param out Stream to which the compressed tags to be written
* @param in Source buffer where tags are available * @param in Source buffer where tags are available
* @param offset Offset for the tags byte buffer * @param offset Offset for the tags byte buffer
* @param length Length of all tag bytes n * @param length Length of all tag bytes
*/ */
public void compressTags(OutputStream out, ByteBuffer in, int offset, int length) public void compressTags(OutputStream out, ByteBuffer in, int offset, int length)
throws IOException { throws IOException {
@ -101,7 +101,7 @@ public class TagCompressionContext {
* @param src Stream where the compressed tags are available * @param src Stream where the compressed tags are available
* @param dest Destination array where to write the uncompressed tags * @param dest Destination array where to write the uncompressed tags
* @param offset Offset in destination where tags to be written * @param offset Offset in destination where tags to be written
* @param length Length of all tag bytes n * @param length Length of all tag bytes
*/ */
public void uncompressTags(InputStream src, byte[] dest, int offset, int length) public void uncompressTags(InputStream src, byte[] dest, int offset, int length)
throws IOException { throws IOException {
@ -133,7 +133,7 @@ public class TagCompressionContext {
* @param dest Destination array where to write the uncompressed tags * @param dest Destination array where to write the uncompressed tags
* @param offset Offset in destination where tags to be written * @param offset Offset in destination where tags to be written
* @param length Length of all tag bytes * @param length Length of all tag bytes
* @return bytes count read from source to uncompress all tags. n * @return bytes count read from source to uncompress all tags.
*/ */
public int uncompressTags(ByteBuff src, byte[] dest, int offset, int length) throws IOException { public int uncompressTags(ByteBuff src, byte[] dest, int offset, int length) throws IOException {
int srcBeginPos = src.position(); int srcBeginPos = src.position();

View File

@ -86,7 +86,7 @@ public abstract class Cipher {
* @param out the output stream to wrap * @param out the output stream to wrap
* @param context the encryption context * @param context the encryption context
* @param iv initialization vector * @param iv initialization vector
* @return the encrypting wrapper n * @return the encrypting wrapper
*/ */
public abstract OutputStream createEncryptionStream(OutputStream out, Context context, byte[] iv) public abstract OutputStream createEncryptionStream(OutputStream out, Context context, byte[] iv)
throws IOException; throws IOException;
@ -95,7 +95,7 @@ public abstract class Cipher {
* Create an encrypting output stream given an initialized encryptor * Create an encrypting output stream given an initialized encryptor
* @param out the output stream to wrap * @param out the output stream to wrap
* @param encryptor the encryptor * @param encryptor the encryptor
* @return the encrypting wrapper n * @return the encrypting wrapper
*/ */
public abstract OutputStream createEncryptionStream(OutputStream out, Encryptor encryptor) public abstract OutputStream createEncryptionStream(OutputStream out, Encryptor encryptor)
throws IOException; throws IOException;
@ -105,7 +105,7 @@ public abstract class Cipher {
* @param in the input stream to wrap * @param in the input stream to wrap
* @param context the encryption context * @param context the encryption context
* @param iv initialization vector * @param iv initialization vector
* @return the decrypting wrapper n * @return the decrypting wrapper
*/ */
public abstract InputStream createDecryptionStream(InputStream in, Context context, byte[] iv) public abstract InputStream createDecryptionStream(InputStream in, Context context, byte[] iv)
throws IOException; throws IOException;
@ -114,7 +114,7 @@ public abstract class Cipher {
* Create a decrypting output stream given an initialized decryptor * Create a decrypting output stream given an initialized decryptor
* @param in the input stream to wrap * @param in the input stream to wrap
* @param decryptor the decryptor * @param decryptor the decryptor
* @return the decrypting wrapper n * @return the decrypting wrapper
*/ */
public abstract InputStream createDecryptionStream(InputStream in, Decryptor decryptor) public abstract InputStream createDecryptionStream(InputStream in, Decryptor decryptor)
throws IOException; throws IOException;

View File

@ -28,7 +28,7 @@ import org.apache.yetus.audience.InterfaceAudience;
public interface Decryptor { public interface Decryptor {
/** /**
* Set the secret key n * Set the secret key
*/ */
public void setKey(Key key); public void setKey(Key key);
@ -45,12 +45,12 @@ public interface Decryptor {
public int getBlockSize(); public int getBlockSize();
/** /**
* Set the initialization vector n * Set the initialization vector
*/ */
public void setIv(byte[] iv); public void setIv(byte[] iv);
/** /**
* Create a stream for decryption n * Create a stream for decryption
*/ */
public InputStream createDecryptionStream(InputStream in); public InputStream createDecryptionStream(InputStream in);

View File

@ -318,7 +318,7 @@ public final class Encryption {
* <p> * <p>
* The encryptor's state will be finalized. It should be reinitialized or returned to the pool. * The encryptor's state will be finalized. It should be reinitialized or returned to the pool.
* @param out ciphertext * @param out ciphertext
* @param src plaintext nnnn * @param src plaintext
*/ */
public static void encrypt(OutputStream out, byte[] src, int offset, int length, Encryptor e) public static void encrypt(OutputStream out, byte[] src, int offset, int length, Encryptor e)
throws IOException { throws IOException {
@ -333,7 +333,7 @@ public final class Encryption {
/** /**
* Encrypt a block of plaintext * Encrypt a block of plaintext
* @param out ciphertext * @param out ciphertext
* @param src plaintext nnnnn * @param src plaintext
*/ */
public static void encrypt(OutputStream out, byte[] src, int offset, int length, Context context, public static void encrypt(OutputStream out, byte[] src, int offset, int length, Context context,
byte[] iv) throws IOException { byte[] iv) throws IOException {
@ -349,7 +349,7 @@ public final class Encryption {
* <p> * <p>
* The encryptor's state will be finalized. It should be reinitialized or returned to the pool. * The encryptor's state will be finalized. It should be reinitialized or returned to the pool.
* @param out ciphertext * @param out ciphertext
* @param in plaintext nn * @param in plaintext
*/ */
public static void encrypt(OutputStream out, InputStream in, Encryptor e) throws IOException { public static void encrypt(OutputStream out, InputStream in, Encryptor e) throws IOException {
OutputStream cout = e.createEncryptionStream(out); OutputStream cout = e.createEncryptionStream(out);
@ -363,7 +363,7 @@ public final class Encryption {
/** /**
* Encrypt a stream of plaintext given a context and IV * Encrypt a stream of plaintext given a context and IV
* @param out ciphertext * @param out ciphertext
* @param in plaintet nnn * @param in plaintet
*/ */
public static void encrypt(OutputStream out, InputStream in, Context context, byte[] iv) public static void encrypt(OutputStream out, InputStream in, Context context, byte[] iv)
throws IOException { throws IOException {
@ -378,7 +378,6 @@ public final class Encryption {
* Decrypt a block of ciphertext read in from a stream with the given cipher and context * Decrypt a block of ciphertext read in from a stream with the given cipher and context
* <p> * <p>
* The decryptor's state will be finalized. It should be reinitialized or returned to the pool. * The decryptor's state will be finalized. It should be reinitialized or returned to the pool.
* nnnnnn
*/ */
public static void decrypt(byte[] dest, int destOffset, InputStream in, int destSize, Decryptor d) public static void decrypt(byte[] dest, int destOffset, InputStream in, int destSize, Decryptor d)
throws IOException { throws IOException {
@ -391,7 +390,7 @@ public final class Encryption {
} }
/** /**
* Decrypt a block of ciphertext from a stream given a context and IV nnnnnnn * Decrypt a block of ciphertext from a stream given a context and IV
*/ */
public static void decrypt(byte[] dest, int destOffset, InputStream in, int destSize, public static void decrypt(byte[] dest, int destOffset, InputStream in, int destSize,
Context context, byte[] iv) throws IOException { Context context, byte[] iv) throws IOException {
@ -402,7 +401,7 @@ public final class Encryption {
} }
/** /**
* Decrypt a stream of ciphertext given a decryptor nnnnn * Decrypt a stream of ciphertext given a decryptor
*/ */
public static void decrypt(OutputStream out, InputStream in, int outLen, Decryptor d) public static void decrypt(OutputStream out, InputStream in, int outLen, Decryptor d)
throws IOException { throws IOException {
@ -425,7 +424,7 @@ public final class Encryption {
} }
/** /**
* Decrypt a stream of ciphertext given a context and IV nnnnnn * Decrypt a stream of ciphertext given a context and IV
*/ */
public static void decrypt(OutputStream out, InputStream in, int outLen, Context context, public static void decrypt(OutputStream out, InputStream in, int outLen, Context context,
byte[] iv) throws IOException { byte[] iv) throws IOException {
@ -436,7 +435,8 @@ public final class Encryption {
} }
/** /**
* Resolves a key for the given subject nn * @return a key for the given subject * Resolves a key for the given subject
* @return a key for the given subject
* @throws IOException if the key is not found * @throws IOException if the key is not found
*/ */
public static Key getSecretKeyForSubject(String subject, Configuration conf) throws IOException { public static Key getSecretKeyForSubject(String subject, Configuration conf) throws IOException {
@ -460,7 +460,7 @@ public final class Encryption {
* @param in plaintext * @param in plaintext
* @param conf configuration * @param conf configuration
* @param cipher the encryption algorithm * @param cipher the encryption algorithm
* @param iv the initialization vector, can be null n * @param iv the initialization vector, can be null
*/ */
public static void encryptWithSubjectKey(OutputStream out, InputStream in, String subject, public static void encryptWithSubjectKey(OutputStream out, InputStream in, String subject,
Configuration conf, Cipher cipher, byte[] iv) throws IOException { Configuration conf, Cipher cipher, byte[] iv) throws IOException {
@ -482,7 +482,7 @@ public final class Encryption {
* @param subject the subject's key alias * @param subject the subject's key alias
* @param conf configuration * @param conf configuration
* @param cipher the encryption algorithm * @param cipher the encryption algorithm
* @param iv the initialization vector, can be null n * @param iv the initialization vector, can be null
*/ */
public static void decryptWithSubjectKey(OutputStream out, InputStream in, int outLen, public static void decryptWithSubjectKey(OutputStream out, InputStream in, int outLen,
String subject, Configuration conf, Cipher cipher, byte[] iv) throws IOException { String subject, Configuration conf, Cipher cipher, byte[] iv) throws IOException {

View File

@ -28,7 +28,7 @@ import org.apache.yetus.audience.InterfaceAudience;
public interface Encryptor { public interface Encryptor {
/** /**
* Set the secret key n * Set the secret key
*/ */
public void setKey(Key key); public void setKey(Key key);
@ -50,12 +50,12 @@ public interface Encryptor {
public byte[] getIv(); public byte[] getIv();
/** /**
* Set the initialization vector n * Set the initialization vector
*/ */
public void setIv(byte[] iv); public void setIv(byte[] iv);
/** /**
* Create a stream for encryption n * Create a stream for encryption
*/ */
public OutputStream createEncryptionStream(OutputStream out); public OutputStream createEncryptionStream(OutputStream out);

View File

@ -31,13 +31,13 @@ public interface KeyProvider {
public static final String PASSWORDFILE = "passwordfile"; public static final String PASSWORDFILE = "passwordfile";
/** /**
* Initialize the key provider n * Initialize the key provider
*/ */
public void init(String params); public void init(String params);
/** /**
* Retrieve the key for a given key aliase n * @return the keys corresponding to the supplied * Retrieve the key for a given key aliase
* alias, or null if a key is not found * @return the keys corresponding to the supplied alias, or null if a key is not found
*/ */
public Key getKey(String alias); public Key getKey(String alias);

View File

@ -90,9 +90,8 @@ public interface DataBlockEncoder {
EncodedSeeker createSeeker(HFileBlockDecodingContext decodingCtx); EncodedSeeker createSeeker(HFileBlockDecodingContext decodingCtx);
/** /**
* Creates a encoder specific encoding context n * store configuration n * encoding strategy used * Creates a encoder specific encoding context store configuration encoding strategy used header
* n * header bytes to be written, put a dummy header here if the header is unknown n * HFile meta * bytes to be written, put a dummy header here if the header is unknown HFile meta data
* data
* @return a newly created encoding context * @return a newly created encoding context
*/ */
HFileBlockEncodingContext newDataBlockEncodingContext(Configuration conf, HFileBlockEncodingContext newDataBlockEncodingContext(Configuration conf,
@ -100,7 +99,7 @@ public interface DataBlockEncoder {
/** /**
* Creates an encoder specific decoding context, which will prepare the data before actual * Creates an encoder specific decoding context, which will prepare the data before actual
* decoding n * store configuration n * HFile meta data * decoding store configuration HFile meta data
* @return a newly created decoding context * @return a newly created decoding context
*/ */
HFileBlockDecodingContext newDataBlockDecodingContext(Configuration conf, HFileContext meta); HFileBlockDecodingContext newDataBlockDecodingContext(Configuration conf, HFileContext meta);

View File

@ -99,7 +99,7 @@ public enum DataBlockEncoding {
/** /**
* Writes id bytes to the given array starting from offset. * Writes id bytes to the given array starting from offset.
* @param dest output array * @param dest output array
* @param offset starting offset of the output array n * @param offset starting offset of the output array
*/ */
// System.arraycopy is static native. Nothing we can do this until we have minimum JDK 9. // System.arraycopy is static native. Nothing we can do this until we have minimum JDK 9.
@SuppressWarnings("UnsafeFinalization") @SuppressWarnings("UnsafeFinalization")

View File

@ -181,7 +181,7 @@ public class EncodedDataBlock {
* @param inputBuffer Array to be compressed. * @param inputBuffer Array to be compressed.
* @param offset Offset to beginning of the data. * @param offset Offset to beginning of the data.
* @param length Length to be compressed. * @param length Length to be compressed.
* @return Size of compressed data in bytes. n * @return Size of compressed data in bytes.
*/ */
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "NP_NULL_ON_SOME_PATH_EXCEPTION", @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "NP_NULL_ON_SOME_PATH_EXCEPTION",
justification = "No sure what findbugs wants but looks to me like no NPE") justification = "No sure what findbugs wants but looks to me like no NPE")

View File

@ -32,9 +32,9 @@ public interface HFileBlockDecodingContext {
/** /**
* Perform all actions that need to be done before the encoder's real decoding process. * Perform all actions that need to be done before the encoder's real decoding process.
* Decompression needs to be done if {@link HFileContext#getCompression()} returns a valid * Decompression needs to be done if {@link HFileContext#getCompression()} returns a valid
* compression algorithm. n * numBytes after block and encoding headers n * numBytes without * compression algorithm. numBytes after block and encoding headers numBytes without header
* header required to store the block after decompressing (not decoding) n * ByteBuffer pointed * required to store the block after decompressing (not decoding) ByteBuffer pointed after the
* after the header but before the data n * on disk data to be decoded * header but before the data on disk data to be decoded
*/ */
void prepareDecoding(int onDiskSizeWithoutHeader, int uncompressedSizeWithoutHeader, void prepareDecoding(int onDiskSizeWithoutHeader, int uncompressedSizeWithoutHeader,
ByteBuff blockBufferWithoutHeader, ByteBuff onDiskBlock) throws IOException; ByteBuff blockBufferWithoutHeader, ByteBuff onDiskBlock) throws IOException;

View File

@ -91,7 +91,7 @@ public enum IndexBlockEncoding {
/** /**
* Writes id bytes to the given array starting from offset. * Writes id bytes to the given array starting from offset.
* @param dest output array * @param dest output array
* @param offset starting offset of the output array n * @param offset starting offset of the output array
*/ */
public void writeIdInBytes(byte[] dest, int offset) throws IOException { public void writeIdInBytes(byte[] dest, int offset) throws IOException {
System.arraycopy(idInBytes, 0, dest, offset, ID_SIZE); System.arraycopy(idInBytes, 0, dest, offset, ID_SIZE);

View File

@ -93,7 +93,8 @@ public class ThrottledInputStream extends InputStream {
/** /**
* Read bytes starting from the specified position. This requires rawStream is an instance of * Read bytes starting from the specified position. This requires rawStream is an instance of
* {@link PositionedReadable}. nnnn * @return the number of bytes read * {@link PositionedReadable}.
* @return the number of bytes read
*/ */
public int read(long position, byte[] buffer, int offset, int length) throws IOException { public int read(long position, byte[] buffer, int offset, int length) throws IOException {
if (!(rawStream instanceof PositionedReadable)) { if (!(rawStream instanceof PositionedReadable)) {

View File

@ -80,7 +80,7 @@ public interface Dictionary {
* @param data the data to be written in byte[] * @param data the data to be written in byte[]
* @param offset the offset * @param offset the offset
* @param length length to be written * @param length length to be written
* @param dict the dictionary whose contents are to written n * @param dict the dictionary whose contents are to written
*/ */
public static void write(OutputStream out, byte[] data, int offset, int length, Dictionary dict) public static void write(OutputStream out, byte[] data, int offset, int length, Dictionary dict)
throws IOException { throws IOException {
@ -103,7 +103,7 @@ public interface Dictionary {
* @param data the data to be written in ByteBuffer * @param data the data to be written in ByteBuffer
* @param offset the offset * @param offset the offset
* @param length length to be written * @param length length to be written
* @param dict the dictionary whose contents are to written n * @param dict the dictionary whose contents are to written
*/ */
public static void write(OutputStream out, ByteBuffer data, int offset, int length, public static void write(OutputStream out, ByteBuffer data, int offset, int length,
Dictionary dict) throws IOException { Dictionary dict) throws IOException {

View File

@ -118,8 +118,8 @@ public class StreamUtils {
} }
/** /**
* Reads a varInt value stored in an array. n * Input array where the varInt is available n * * Reads a varInt value stored in an array. Input array where the varInt is available Offset in
* Offset in the input array where varInt is available * the input array where varInt is available
* @return A pair of integers in which first value is the actual decoded varInt value and second * @return A pair of integers in which first value is the actual decoded varInt value and second
* value as number of bytes taken by this varInt for it's storage in the input array. * value as number of bytes taken by this varInt for it's storage in the input array.
* @throws IOException When varint is malformed and not able to be read correctly * @throws IOException When varint is malformed and not able to be read correctly

View File

@ -85,7 +85,8 @@ public abstract class ByteBuff implements HBaseReferenceCounted {
public abstract int position(); public abstract int position();
/** /**
* Sets this ByteBuff's position to the given value. n * @return this object * Sets this ByteBuff's position to the given value.
* @return this object
*/ */
public abstract ByteBuff position(int position); public abstract ByteBuff position(int position);
@ -184,7 +185,7 @@ public abstract class ByteBuff implements HBaseReferenceCounted {
public abstract byte get(); public abstract byte get();
/** /**
* Fetches the byte at the given index. Does not change position of the underlying ByteBuffers n * Fetches the byte at the given index. Does not change position of the underlying ByteBuffers
* @return the byte at the given index * @return the byte at the given index
*/ */
public abstract byte get(int index); public abstract byte get(int index);
@ -244,7 +245,8 @@ public abstract class ByteBuff implements HBaseReferenceCounted {
public abstract ByteBuff put(byte[] src, int offset, int length); public abstract ByteBuff put(byte[] src, int offset, int length);
/** /**
* Copies from the given byte[] to this ByteBuff n * @return this ByteBuff * Copies from the given byte[] to this ByteBuff
* @return this ByteBuff
* @param src source byte array * @param src source byte array
* @return this ByteBuff * @return this ByteBuff
*/ */
@ -269,14 +271,15 @@ public abstract class ByteBuff implements HBaseReferenceCounted {
* Fetches the short value at the given index. Does not change position of the underlying * Fetches the short value at the given index. Does not change position of the underlying
* ByteBuffers. The caller is sure that the index will be after the current position of this * ByteBuffers. The caller is sure that the index will be after the current position of this
* ByteBuff. So even if the current short does not fit in the current item we can safely move to * ByteBuff. So even if the current short does not fit in the current item we can safely move to
* the next item and fetch the remaining bytes forming the short n * @return the short value at * the next item and fetch the remaining bytes forming the short
* the given index * @return the short value at the given index
*/ */
public abstract short getShort(int index); public abstract short getShort(int index);
/** /**
* Fetches the short value at the given offset from current position. Does not change position of * Fetches the short value at the given offset from current position. Does not change position of
* the underlying ByteBuffers. n * @return the short value at the given index. * the underlying ByteBuffers.
* @return the short value at the given index.
*/ */
public abstract short getShortAfterPosition(int offset); public abstract short getShortAfterPosition(int offset);
@ -319,13 +322,15 @@ public abstract class ByteBuff implements HBaseReferenceCounted {
* Fetches the long at the given index. Does not change position of the underlying ByteBuffers. * Fetches the long at the given index. Does not change position of the underlying ByteBuffers.
* The caller is sure that the index will be after the current position of this ByteBuff. So even * The caller is sure that the index will be after the current position of this ByteBuff. So even
* if the current long does not fit in the current item we can safely move to the next item and * if the current long does not fit in the current item we can safely move to the next item and
* fetch the remaining bytes forming the long n * @return the long value at the given index * fetch the remaining bytes forming the long
* @return the long value at the given index
*/ */
public abstract long getLong(int index); public abstract long getLong(int index);
/** /**
* Fetches the long value at the given offset from current position. Does not change position of * Fetches the long value at the given offset from current position. Does not change position of
* the underlying ByteBuffers. n * @return the long value at the given index. * the underlying ByteBuffers.
* @return the long value at the given index.
*/ */
public abstract long getLongAfterPosition(int offset); public abstract long getLongAfterPosition(int offset);

View File

@ -149,8 +149,8 @@ public class MultiByteBuff extends ByteBuff {
} }
/** /**
* Fetches the byte at the given index. Does not change position of the underlying ByteBuffers n * Fetches the byte at the given index. Does not change position of the underlying ByteBuffers
* * @return the byte at the given index * @return the byte at the given index
*/ */
@Override @Override
public byte get(int index) { public byte get(int index) {
@ -201,8 +201,8 @@ public class MultiByteBuff extends ByteBuff {
} }
/** /**
* Fetches the int at the given index. Does not change position of the underlying ByteBuffers n * Fetches the int at the given index. Does not change position of the underlying ByteBuffers
* * @return the int value at the given index * @return the int value at the given index
*/ */
@Override @Override
public int getInt(int index) { public int getInt(int index) {
@ -235,8 +235,8 @@ public class MultiByteBuff extends ByteBuff {
} }
/** /**
* Fetches the short at the given index. Does not change position of the underlying ByteBuffers n * Fetches the short at the given index. Does not change position of the underlying ByteBuffers
* * @return the short value at the given index * @return the short value at the given index
*/ */
@Override @Override
public short getShort(int index) { public short getShort(int index) {
@ -347,8 +347,8 @@ public class MultiByteBuff extends ByteBuff {
} }
/** /**
* Fetches the long at the given index. Does not change position of the underlying ByteBuffers n * Fetches the long at the given index. Does not change position of the underlying ByteBuffers
* * @return the long value at the given index * @return the long value at the given index
*/ */
@Override @Override
public long getLong(int index) { public long getLong(int index) {
@ -388,7 +388,8 @@ public class MultiByteBuff extends ByteBuff {
} }
/** /**
* Sets this MBB's position to the given value. n * @return this object * Sets this MBB's position to the given value.
* @return this object
*/ */
@Override @Override
public MultiByteBuff position(int position) { public MultiByteBuff position(int position) {
@ -569,7 +570,7 @@ public class MultiByteBuff extends ByteBuff {
/** /**
* Copies the content from this MBB's current position to the byte array and fills it. Also * Copies the content from this MBB's current position to the byte array and fills it. Also
* advances the position of the MBB by the length of the byte[]. n * advances the position of the MBB by the length of the byte[].
*/ */
@Override @Override
public void get(byte[] dst) { public void get(byte[] dst) {
@ -615,7 +616,8 @@ public class MultiByteBuff extends ByteBuff {
} }
/** /**
* Marks the limit of this MBB. n * @return This MBB * Marks the limit of this MBB.
* @return This MBB
*/ */
@Override @Override
public MultiByteBuff limit(int limit) { public MultiByteBuff limit(int limit) {
@ -686,8 +688,8 @@ public class MultiByteBuff extends ByteBuff {
} }
/** /**
* Writes a byte to this MBB at the current position and increments the position n * @return this * Writes a byte to this MBB at the current position and increments the position
* object * @return this object
*/ */
@Override @Override
public MultiByteBuff put(byte b) { public MultiByteBuff put(byte b) {
@ -960,7 +962,7 @@ public class MultiByteBuff extends ByteBuff {
} }
/** /**
* Jumps the current position of this MBB by specified length. n * Jumps the current position of this MBB by specified length.
*/ */
@Override @Override
public MultiByteBuff skip(int length) { public MultiByteBuff skip(int length) {
@ -982,7 +984,7 @@ public class MultiByteBuff extends ByteBuff {
} }
/** /**
* Jumps back the current position of this MBB by specified length. n * Jumps back the current position of this MBB by specified length.
*/ */
@Override @Override
public MultiByteBuff moveBack(int length) { public MultiByteBuff moveBack(int length) {
@ -1109,8 +1111,8 @@ public class MultiByteBuff extends ByteBuff {
} }
/** /**
* Copy the content from this MBB to a byte[] based on the given offset and length n * the * Copy the content from this MBB to a byte[] based on the given offset and length the position
* position from where the copy should start n * the length upto which the copy has to be done * from where the copy should start the length upto which the copy has to be done
* @return byte[] with the copied contents from this MBB. * @return byte[] with the copied contents from this MBB.
*/ */
@Override @Override

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