HBASE-18599 Add missing @Deprecated annotations

Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
Lars Francke 2017-08-15 09:36:51 +02:00 committed by Michael Stack
parent f1376213ac
commit 9de5fd5bb5
6 changed files with 65 additions and 17 deletions

View File

@ -100,14 +100,18 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
public static final String NEW_VERSION_BEHAVIOR = ColumnFamilyDescriptorBuilder.NEW_VERSION_BEHAVIOR;
public static final boolean DEFAULT_NEW_VERSION_BEHAVIOR = ColumnFamilyDescriptorBuilder.DEFAULT_NEW_VERSION_BEHAVIOR;
protected final ModifyableColumnFamilyDescriptor delegatee;
/**
* Construct a column descriptor specifying only the family name
* The other attributes are defaulted.
*
* @param familyName Column family name. Must be 'printable' -- digit or
* letter -- and may not contain a <code>:</code>
* @deprecated use {@link ColumnFamilyDescriptorBuilder#of(String)}
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18433">HBASE-18433</a>).
* Use {@link ColumnFamilyDescriptorBuilder#of(String)}.
*/
@Deprecated
public HColumnDescriptor(final String familyName) {
this(Bytes.toBytes(familyName));
}
@ -118,8 +122,11 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
*
* @param familyName Column family name. Must be 'printable' -- digit or
* letter -- and may not contain a <code>:</code>
* @deprecated use {@link ColumnFamilyDescriptorBuilder#of(byte[])}
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18433">HBASE-18433</a>).
* Use {@link ColumnFamilyDescriptorBuilder#of(byte[])}.
*/
@Deprecated
public HColumnDescriptor(final byte [] familyName) {
this(new ModifyableColumnFamilyDescriptor(familyName));
}
@ -128,9 +135,13 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
* Constructor.
* Makes a deep copy of the supplied descriptor.
* Can make a modifiable descriptor from an UnmodifyableHColumnDescriptor.
*
* @param desc The descriptor.
* @deprecated use {@link ColumnFamilyDescriptorBuilder#copy(ColumnFamilyDescriptor)}
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18433">HBASE-18433</a>).
* Use {@link ColumnFamilyDescriptorBuilder#copy(ColumnFamilyDescriptor)}.
*/
@Deprecated
public HColumnDescriptor(HColumnDescriptor desc) {
this(desc, true);
}

View File

@ -44,7 +44,7 @@ import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.ModifyableCo
* if the table is read only, the maximum size of the memstore,
* when the region split should occur, coprocessors associated with it etc...
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
* use {@link TableDescriptorBuilder} to build {@link HTableDescriptor}.
* Use {@link TableDescriptorBuilder} to build {@link HTableDescriptor}.
*/
@Deprecated
@InterfaceAudience.Public
@ -602,9 +602,13 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
* HTableDescriptor contains mapping of family name to HColumnDescriptors.
* This returns all the keys of the family map which represents the column
* family names of the table.
*
* @return Immutable sorted set of the keys of the families.
* @deprecated Use {@link #getColumnFamilyNames()}.
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18008">HBASE-18008</a>).
* Use {@link #getColumnFamilyNames()}.
*/
@Deprecated
public Set<byte[]> getFamiliesKeys() {
return delegatee.getColumnFamilyNames();
}

View File

@ -833,8 +833,11 @@ public interface Admin extends Abortable, Closeable {
* @param regionname region name to close
* @param serverName Deprecated. Not used.
* @throws IOException if a remote or network exception occurs
* @deprecated Since 2.0. Will be removed in 3.0. Use {@link #unassign(byte[], boolean)} instead.
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18231">HBASE-18231</a>).
* Use {@link #unassign(byte[], boolean)}.
*/
@Deprecated
void closeRegion(final String regionname, final String serverName) throws IOException;
/**
@ -843,8 +846,11 @@ public interface Admin extends Abortable, Closeable {
* @param regionname region name to close
* @param serverName Deprecated. Not used.
* @throws IOException if a remote or network exception occurs
* @deprecated Since 2.0. Will be removed in 3.0. Use {@link #unassign(byte[], boolean)} instead.
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18231">HBASE-18231</a>).
* Use {@link #unassign(byte[], boolean)}.
*/
@Deprecated
void closeRegion(final byte[] regionname, final String serverName) throws IOException;
/**
@ -857,8 +863,11 @@ public interface Admin extends Abortable, Closeable {
* @param serverName Deprecated. Not used.
* @return Deprecated. Returns true always.
* @throws IOException if a remote or network exception occurs
* @deprecated Since 2.0. Will be removed in 3.0. Use {@link #unassign(byte[], boolean)} instead.
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18231">HBASE-18231</a>).
* Use {@link #unassign(byte[], boolean)}.
*/
@Deprecated
boolean closeRegionWithEncodedRegionName(final String encodedRegionName, final String serverName)
throws IOException;
@ -866,8 +875,11 @@ public interface Admin extends Abortable, Closeable {
* Used {@link #unassign(byte[], boolean)} to unassign the region. For expert-admins.
*
* @param sn Deprecated. Not used.
* @deprecated Since 2.0. Will be removed in 3.0. Use {@link #unassign(byte[], boolean)} instead.
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18231">HBASE-18231</a>).
* Use {@link #unassign(byte[], boolean)}.
*/
@Deprecated
void closeRegion(final ServerName sn, final HRegionInfo hri) throws IOException;
/**
@ -1175,9 +1187,11 @@ public interface Admin extends Abortable, Closeable {
*
* @param regionName region to split
* @throws IOException if a remote or network exception occurs
* @deprecated Since 2.0. Will be removed in 3.0. Use
* {@link #splitRegionAsync(byte[], byte[])} instead.
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18229">HBASE-18229</a>).
* Use {@link #splitRegionAsync(byte[], byte[])}.
*/
@Deprecated
void splitRegion(final byte[] regionName) throws IOException;
/**
@ -1196,9 +1210,11 @@ public interface Admin extends Abortable, Closeable {
* @param regionName region to split
* @param splitPoint the explicit position to split on
* @throws IOException if a remote or network exception occurs
* @deprecated Since 2.0. Will be removed in 3.0. Use
* {@link #splitRegionAsync(byte[], byte[])} instead.
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18229">HBASE-18229</a>).
* Use {@link #splitRegionAsync(byte[], byte[])}.
*/
@Deprecated
void splitRegion(final byte[] regionName, final byte[] splitPoint)
throws IOException;

View File

@ -296,8 +296,11 @@ public interface AsyncAdmin {
* @param regionName region name to close
* @param serverName Deprecated. Not used anymore after deprecation.
* @return Deprecated. Always returns true now.
* @deprecated Since 2.0. Will be removed in 3.0. Use {@link #unassign(byte[], boolean)} instead.
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-18231">HBASE-18231</a>).
* Use {@link #unassign(byte[], boolean)}.
*/
@Deprecated
CompletableFuture<Boolean> closeRegion(byte[] regionName, Optional<ServerName> serverName);
/**

View File

@ -49,9 +49,20 @@ public class ServerSideScanMetrics {
public static final String COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME = "ROWS_SCANNED";
public static final String COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME = "ROWS_FILTERED";
/** @deprecated Use {@link #COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME} instead */
/**
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-17886">HBASE-17886</a>).
* Use {@link #COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME}.
*/
@Deprecated
public static final String COUNT_OF_ROWS_SCANNED_KEY = COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME;
/** @deprecated Use {@link #COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME} instead */
/**
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-17886">HBASE-17886</a>).
* Use {@link #COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME}.
*/
@Deprecated
public static final String COUNT_OF_ROWS_FILTERED_KEY = COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME;
/**

View File

@ -1437,8 +1437,11 @@ public interface RegionObserver extends Coprocessor {
* @param stagingFamilyPaths pairs of { CF, HFile path } submitted for bulk load
* @param hasLoaded whether the bulkLoad was successful
* @return the new value of hasLoaded
* @deprecated Use {@link #postBulkLoadHFile(ObserverContext, List, Map, boolean)}
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
* (<a href="https://issues.apache.org/jira/browse/HBASE-17123">HBASE-17123</a>).
* Use {@link #postBulkLoadHFile(ObserverContext, List, Map, boolean)}.
*/
@Deprecated
default boolean postBulkLoadHFile(final ObserverContext<RegionCoprocessorEnvironment> ctx,
List<Pair<byte[], String>> stagingFamilyPaths, boolean hasLoaded) throws IOException {
return hasLoaded;