HBASE-22344 Documented the deprecation of public and limited private APIs (#208)

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
Jan Hentschel 2019-06-17 22:02:23 +02:00
parent 02f9c8b3b4
commit 3f62e481e2
No known key found for this signature in database
GPG Key ID: 5CD818B19CC299A3
27 changed files with 232 additions and 62 deletions

View File

@ -162,7 +162,10 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
* name: i.e. 'printable' and ends in a ':' (Null passes are allowed because * name: i.e. 'printable' and ends in a ':' (Null passes are allowed because
* <code>b</code> can be null when deserializing). Cannot start with a '.' * <code>b</code> can be null when deserializing). Cannot start with a '.'
* either. Also Family can not be an empty value or equal "recovered.edits". * either. Also Family can not be an empty value or equal "recovered.edits".
* @deprecated Use {@link ColumnFamilyDescriptorBuilder#isLegalColumnFamilyName(byte[])}. * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@link ColumnFamilyDescriptorBuilder#isLegalColumnFamilyName(byte[])} instead.
* @see ColumnFamilyDescriptorBuilder#isLegalColumnFamilyName(byte[])
* @see <a href="https://issues.apache.org/jira/browse/HBASE-18008">HBASE-18008</a>
*/ */
@Deprecated @Deprecated
public static byte [] isLegalFamilyName(final byte [] b) { public static byte [] isLegalFamilyName(final byte [] b) {

View File

@ -551,9 +551,11 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
/** /**
* Returns an unmodifiable collection of all the {@link HColumnDescriptor} * Returns an unmodifiable collection of all the {@link HColumnDescriptor}
* of all the column families of the table. * of all the column families of the table.
* @deprecated Use {@link #getColumnFamilies}. * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #getColumnFamilies()} instead.
* @return Immutable collection of {@link HColumnDescriptor} of all the * @return Immutable collection of {@link HColumnDescriptor} of all the
* column families. * column families.
* @see #getColumnFamilies()
* @see <a href="https://issues.apache.org/jira/browse/HBASE-18008">HBASE-18008</a>
*/ */
@Deprecated @Deprecated
public Collection<HColumnDescriptor> getFamilies() { public Collection<HColumnDescriptor> getFamilies() {
@ -660,8 +662,9 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
* of the table. * of the table.
* *
* @return Array of all the HColumnDescriptors of the current table * @return Array of all the HColumnDescriptors of the current table
* * @deprecated since 2.0.0 and will be removed in 3.0.0.
* @see #getFamilies() * @see #getFamilies()
* @see <a href="https://issues.apache.org/jira/browse/HBASE-18008">HBASE-18008</a>
*/ */
@Deprecated @Deprecated
@Override @Override
@ -677,7 +680,10 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
* @param column Column family name * @param column Column family name
* @return Column descriptor for the passed family name or the family on * @return Column descriptor for the passed family name or the family on
* passed in column. * passed in column.
* @deprecated Use {@link #getColumnFamily(byte[])}. * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #getColumnFamily(byte[])}
* instead.
* @see #getColumnFamily(byte[])
* @see <a href="https://issues.apache.org/jira/browse/HBASE-18008">HBASE-18008</a>
*/ */
@Deprecated @Deprecated
public HColumnDescriptor getFamily(final byte[] column) { public HColumnDescriptor getFamily(final byte[] column) {
@ -800,12 +806,20 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
public static final HTableDescriptor NAMESPACE_TABLEDESC public static final HTableDescriptor NAMESPACE_TABLEDESC
= new HTableDescriptor(TableDescriptorBuilder.NAMESPACE_TABLEDESC); = new HTableDescriptor(TableDescriptorBuilder.NAMESPACE_TABLEDESC);
/**
* @deprecated since 0.94.1
* @see <a href="https://issues.apache.org/jira/browse/HBASE-6188">HBASE-6188</a>
*/
@Deprecated @Deprecated
public HTableDescriptor setOwner(User owner) { public HTableDescriptor setOwner(User owner) {
getDelegateeForModification().setOwner(owner); getDelegateeForModification().setOwner(owner);
return this; return this;
} }
/**
* @deprecated since 0.94.1
* @see <a href="https://issues.apache.org/jira/browse/HBASE-6188">HBASE-6188</a>
*/
// used by admin.rb:alter(table_name,*args) to update owner. // used by admin.rb:alter(table_name,*args) to update owner.
@Deprecated @Deprecated
public HTableDescriptor setOwnerString(String ownerString) { public HTableDescriptor setOwnerString(String ownerString) {
@ -813,6 +827,10 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
return this; return this;
} }
/**
* @deprecated since 0.94.1
* @see <a href="https://issues.apache.org/jira/browse/HBASE-6188">HBASE-6188</a>
*/
@Override @Override
@Deprecated @Deprecated
public String getOwnerString() { public String getOwnerString() {

View File

@ -1726,9 +1726,11 @@ public interface Admin extends Abortable, Closeable {
* Do not use. Usually it is ignored but if not, it can do more damage than good. See hbck2. * Do not use. Usually it is ignored but if not, it can do more damage than good. See hbck2.
* @param procId ID of the procedure to abort * @param procId ID of the procedure to abort
* @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted? * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted?
* @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does not exist * @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does
* @throws IOException * not exist
* @deprecated Since 2.1.1 -- to be removed. * @throws IOException if a remote or network exception occurs
* @deprecated since 2.1.1 and will be removed in 4.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-21223">HBASE-21223</a>
*/ */
@Deprecated @Deprecated
boolean abortProcedure( boolean abortProcedure(
@ -1746,8 +1748,9 @@ public interface Admin extends Abortable, Closeable {
* @param procId ID of the procedure to abort * @param procId ID of the procedure to abort
* @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted? * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted?
* @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does not exist * @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does not exist
* @throws IOException * @throws IOException if a remote or network exception occurs
* @deprecated Since 2.1.1 -- to be removed. * @deprecated since 2.1.1 and will be removed in 4.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-21223">HBASE-21223</a>
*/ */
@Deprecated @Deprecated
Future<Boolean> abortProcedureAsync( Future<Boolean> abortProcedureAsync(

View File

@ -864,7 +864,8 @@ public interface AsyncAdmin {
* @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted? * @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted?
* @return true if aborted, false if procedure already completed or does not exist. the value is * @return true if aborted, false if procedure already completed or does not exist. the value is
* wrapped by {@link CompletableFuture} * wrapped by {@link CompletableFuture}
* @deprecated Since 2.1.1 -- to be removed. * @deprecated since 2.1.1 and will be removed in 4.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-21223">HBASE-21223</a>
*/ */
@Deprecated @Deprecated
CompletableFuture<Boolean> abortProcedure(long procId, boolean mayInterruptIfRunning); CompletableFuture<Boolean> abortProcedure(long procId, boolean mayInterruptIfRunning);

View File

@ -196,7 +196,9 @@ public class Scan extends Query {
public Scan() {} public Scan() {}
/** /**
* @deprecated use {@code new Scan().withStartRow(startRow).setFilter(filter)} instead. * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@code new Scan().withStartRow(startRow).setFilter(filter)} instead.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17320">HBASE-17320</a>
*/ */
@Deprecated @Deprecated
public Scan(byte[] startRow, Filter filter) { public Scan(byte[] startRow, Filter filter) {
@ -210,7 +212,9 @@ public class Scan extends Query {
* If the specified row does not exist, the Scanner will start from the next closest row after the * If the specified row does not exist, the Scanner will start from the next closest row after the
* specified row. * specified row.
* @param startRow row to start scanner at or after * @param startRow row to start scanner at or after
* @deprecated use {@code new Scan().withStartRow(startRow)} instead. * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@code new Scan().withStartRow(startRow)} instead.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17320">HBASE-17320</a>
*/ */
@Deprecated @Deprecated
public Scan(byte[] startRow) { public Scan(byte[] startRow) {
@ -221,7 +225,9 @@ public class Scan extends Query {
* Create a Scan operation for the range of rows specified. * Create a Scan operation for the range of rows specified.
* @param startRow row to start scanner at or after (inclusive) * @param startRow row to start scanner at or after (inclusive)
* @param stopRow row to stop scanner before (exclusive) * @param stopRow row to stop scanner before (exclusive)
* @deprecated use {@code new Scan().withStartRow(startRow).withStopRow(stopRow)} instead. * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@code new Scan().withStartRow(startRow).withStopRow(stopRow)} instead.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17320">HBASE-17320</a>
*/ */
@Deprecated @Deprecated
public Scan(byte[] startRow, byte[] stopRow) { public Scan(byte[] startRow, byte[] stopRow) {
@ -423,8 +429,11 @@ public class Scan extends Query {
* @return this * @return this
* @throws IllegalArgumentException if startRow does not meet criteria for a row key (when length * @throws IllegalArgumentException if startRow does not meet criteria for a row key (when length
* exceeds {@link HConstants#MAX_ROW_LENGTH}) * exceeds {@link HConstants#MAX_ROW_LENGTH})
* @deprecated use {@link #withStartRow(byte[])} instead. This method may change the inclusive of * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #withStartRow(byte[])}
* the stop row to keep compatible with the old behavior. * instead. This method may change the inclusive of the stop row to keep compatible with the old
* behavior.
* @see #withStartRow(byte[])
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17320">HBASE-17320</a>
*/ */
@Deprecated @Deprecated
public Scan setStartRow(byte[] startRow) { public Scan setStartRow(byte[] startRow) {
@ -483,8 +492,11 @@ public class Scan extends Query {
* @return this * @return this
* @throws IllegalArgumentException if stopRow does not meet criteria for a row key (when length * @throws IllegalArgumentException if stopRow does not meet criteria for a row key (when length
* exceeds {@link HConstants#MAX_ROW_LENGTH}) * exceeds {@link HConstants#MAX_ROW_LENGTH})
* @deprecated use {@link #withStopRow(byte[])} instead. This method may change the inclusive of * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #withStopRow(byte[])} instead.
* the stop row to keep compatible with the old behavior. * This method may change the inclusive of the stop row to keep compatible with the old
* behavior.
* @see #withStopRow(byte[])
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17320">HBASE-17320</a>
*/ */
@Deprecated @Deprecated
public Scan setStopRow(byte[] stopRow) { public Scan setStopRow(byte[] stopRow) {
@ -601,8 +613,10 @@ public class Scan extends Query {
/** /**
* Get all available versions. * Get all available versions.
* @return this * @return this
* @deprecated It is easy to misunderstand with column family's max versions, so use * @deprecated since 2.0.0 and will be removed in 3.0.0. It is easy to misunderstand with column
* {@link #readAllVersions()} instead. * family's max versions, so use {@link #readAllVersions()} instead.
* @see #readAllVersions()
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17125">HBASE-17125</a>
*/ */
@Deprecated @Deprecated
public Scan setMaxVersions() { public Scan setMaxVersions() {
@ -613,8 +627,10 @@ 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 maxVersions maximum versions for each column * @param maxVersions maximum versions for each column
* @return this * @return this
* @deprecated It is easy to misunderstand with column family's max versions, so use * @deprecated since 2.0.0 and will be removed in 3.0.0. It is easy to misunderstand with column
* {@link #readVersions(int)} instead. * family's max versions, so use {@link #readVersions(int)} instead.
* @see #readVersions(int)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17125">HBASE-17125</a>
*/ */
@Deprecated @Deprecated
public Scan setMaxVersions(int maxVersions) { public Scan setMaxVersions(int maxVersions) {
@ -1037,12 +1053,13 @@ public class Scan extends Query {
* better performance for small scan. [HBASE-9488]. Generally, if the scan range is within one * better performance for small scan. [HBASE-9488]. Generally, if the scan range is within one
* data block(64KB), it could be considered as a small scan. * data block(64KB), it could be considered as a small scan.
* @param small * @param small
* @deprecated since 2.0.0. Use {@link #setLimit(int)} and {@link #setReadType(ReadType)} instead. * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #setLimit(int)} and
* And for the one rpc optimization, now we will also fetch data when openScanner, and * {@link #setReadType(ReadType)} instead. And for the one rpc optimization, now we will also
* if the number of rows reaches the limit then we will close the scanner * fetch data when openScanner, and if the number of rows reaches the limit then we will close
* automatically which means we will fall back to one rpc. * the scanner automatically which means we will fall back to one rpc.
* @see #setLimit(int) * @see #setLimit(int)
* @see #setReadType(ReadType) * @see #setReadType(ReadType)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17045">HBASE-17045</a>
*/ */
@Deprecated @Deprecated
public Scan setSmall(boolean small) { public Scan setSmall(boolean small) {
@ -1054,7 +1071,9 @@ public class Scan extends Query {
/** /**
* Get whether this scan is a small scan * Get whether this scan is a small scan
* @return true if small scan * @return true if small scan
* @deprecated since 2.0.0. See the comment of {@link #setSmall(boolean)} * @deprecated since 2.0.0 and will be removed in 3.0.0. See the comment of
* {@link #setSmall(boolean)}
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17045">HBASE-17045</a>
*/ */
@Deprecated @Deprecated
public boolean isSmall() { public boolean isSmall() {

View File

@ -37,7 +37,10 @@ public class SnapshotDescription {
} }
/** /**
* @deprecated Use the version with the TableName instance instead * @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
* instance instead.
* @see #SnapshotDescription(String, TableName)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
*/ */
@Deprecated @Deprecated
public SnapshotDescription(String name, String table) { public SnapshotDescription(String name, String table) {
@ -49,7 +52,10 @@ public class SnapshotDescription {
} }
/** /**
* @deprecated Use the version with the TableName instance instead * @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
* instance instead.
* @see #SnapshotDescription(String, TableName, SnapshotType)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
*/ */
@Deprecated @Deprecated
public SnapshotDescription(String name, String table, SnapshotType type) { public SnapshotDescription(String name, String table, SnapshotType type) {
@ -61,7 +67,10 @@ public class SnapshotDescription {
} }
/** /**
* @deprecated Use the version with the TableName instance instead * @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
* instance instead.
* @see #SnapshotDescription(String, TableName, SnapshotType, String)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
*/ */
@Deprecated @Deprecated
public SnapshotDescription(String name, String table, SnapshotType type, String owner) { public SnapshotDescription(String name, String table, SnapshotType type, String owner) {
@ -73,7 +82,10 @@ public class SnapshotDescription {
} }
/** /**
* @deprecated Use the version with the TableName instance instead * @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
* instance instead.
* @see #SnapshotDescription(String, TableName, SnapshotType, String, long, int)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
*/ */
@Deprecated @Deprecated
public SnapshotDescription(String name, String table, SnapshotType type, String owner, public SnapshotDescription(String name, String table, SnapshotType type, String owner,
@ -96,7 +108,11 @@ public class SnapshotDescription {
} }
/** /**
* @deprecated Use getTableName() or getTableNameAsString() instead. * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #getTableName()} or
* {@link #getTableNameAsString()} instead.
* @see #getTableName()
* @see #getTableNameAsString()
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
*/ */
@Deprecated @Deprecated
public String getTable() { public String getTable() {

View File

@ -191,6 +191,10 @@ public interface TableDescriptor {
*/ */
TableName getTableName(); TableName getTableName();
/**
* @deprecated since 2.0.0 and will be removed in 3.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
*/
@Deprecated @Deprecated
String getOwnerString(); String getOwnerString();

View File

@ -452,12 +452,20 @@ public class TableDescriptorBuilder {
return this; return this;
} }
/**
* @deprecated since 2.0.0 and will be removed in 3.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
*/
@Deprecated @Deprecated
public TableDescriptorBuilder setOwner(User owner) { public TableDescriptorBuilder setOwner(User owner) {
desc.setOwner(owner); desc.setOwner(owner);
return this; return this;
} }
/**
* @deprecated since 2.0.0 and will be removed in 3.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
*/
@Deprecated @Deprecated
public TableDescriptorBuilder setOwnerString(String ownerString) { public TableDescriptorBuilder setOwnerString(String ownerString) {
desc.setOwnerString(ownerString); desc.setOwnerString(ownerString);
@ -1453,17 +1461,29 @@ public class TableDescriptorBuilder {
} }
} }
/**
* @deprecated since 2.0.0 and will be removed in 3.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
*/
@Deprecated @Deprecated
public ModifyableTableDescriptor setOwner(User owner) { public ModifyableTableDescriptor setOwner(User owner) {
return setOwnerString(owner != null ? owner.getShortName() : null); return setOwnerString(owner != null ? owner.getShortName() : null);
} }
/**
* @deprecated since 2.0.0 and will be removed in 3.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
*/
// used by admin.rb:alter(table_name,*args) to update owner. // used by admin.rb:alter(table_name,*args) to update owner.
@Deprecated @Deprecated
public ModifyableTableDescriptor setOwnerString(String ownerString) { public ModifyableTableDescriptor setOwnerString(String ownerString) {
return setValue(OWNER_KEY, ownerString); return setValue(OWNER_KEY, ownerString);
} }
/**
* @deprecated since 2.0.0 and will be removed in 3.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
*/
@Override @Override
@Deprecated @Deprecated
public String getOwnerString() { public String getOwnerString() {

View File

@ -43,7 +43,8 @@ import org.apache.hbase.thirdparty.com.google.protobuf.UnsafeByteOperations;
* caveat, this filter is only useful for special cases * caveat, this filter is only useful for special cases
* like org.apache.hadoop.hbase.mapreduce.RowCounter. * like org.apache.hadoop.hbase.mapreduce.RowCounter.
* <p> * <p>
* @deprecated Deprecated in 2.0. See HBASE-13347 * @deprecated Deprecated in 2.0.0 and will be removed in 3.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-13347">HBASE-13347</a>
*/ */
@InterfaceAudience.Public @InterfaceAudience.Public
@Deprecated @Deprecated

View File

@ -39,7 +39,9 @@ public class HBaseConfiguration extends Configuration {
/** /**
* Instantiating HBaseConfiguration() is deprecated. Please use * Instantiating HBaseConfiguration() is deprecated. Please use
* HBaseConfiguration#create() to construct a plain Configuration * HBaseConfiguration#create() to construct a plain Configuration
* @deprecated Please use create() instead. * @deprecated since 0.90.0. Please use {@link #create()} instead.
* @see #create()
* @see <a href="https://issues.apache.org/jira/browse/HBASE-2036">HBASE-2036</a>
*/ */
@Deprecated @Deprecated
public HBaseConfiguration() { public HBaseConfiguration() {
@ -53,7 +55,9 @@ public class HBaseConfiguration extends Configuration {
/** /**
* Instantiating HBaseConfiguration() is deprecated. Please use * Instantiating HBaseConfiguration() is deprecated. Please use
* HBaseConfiguration#create(conf) to construct a plain Configuration * HBaseConfiguration#create(conf) to construct a plain Configuration
* @deprecated Please user create(conf) instead. * @deprecated since 0.90.0. Please use {@link #create(Configuration)} instead.
* @see #create(Configuration)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-2036">HBASE-2036</a>
*/ */
@Deprecated @Deprecated
public HBaseConfiguration(final Configuration c) { public HBaseConfiguration(final Configuration c) {

View File

@ -117,7 +117,9 @@ implements WritableComparable<ImmutableBytesWritable> {
/** /**
* @return the number of valid bytes in the buffer * @return the number of valid bytes in the buffer
* @deprecated use {@link #getLength()} instead * @deprecated since 0.98.5. Use {@link #getLength()} instead
* @see #getLength()
* @see <a href="https://issues.apache.org/jira/browse/HBASE-11561">HBASE-11561</a>
*/ */
@Deprecated @Deprecated
public int getSize() { public int getSize() {

View File

@ -226,7 +226,9 @@ public class Bytes implements Comparable<Bytes> {
/** /**
* @return the number of valid bytes in the buffer * @return the number of valid bytes in the buffer
* @deprecated use {@link #getLength()} instead * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #getLength()} instead.
* @see #getLength()
* @see <a href="https://issues.apache.org/jira/browse/HBASE-11862">HBASE-11862</a>
*/ */
@Deprecated @Deprecated
public int getSize() { public int getSize() {
@ -1319,7 +1321,9 @@ public class Bytes implements Comparable<Bytes> {
* @param offset Offset into array at which vint begins. * @param offset Offset into array at which vint begins.
* @throws java.io.IOException e * @throws java.io.IOException e
* @return deserialized long from buffer. * @return deserialized long from buffer.
* @deprecated Use {@link #readAsVLong(byte[],int)} instead. * @deprecated since 0.98.12. Use {@link #readAsVLong(byte[],int)} instead.
* @see #readAsVLong(byte[], int)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-6919">HBASE-6919</a>
*/ */
@Deprecated @Deprecated
public static long readVLong(final byte [] buffer, final int offset) public static long readVLong(final byte [] buffer, final int offset)
@ -2102,7 +2106,10 @@ public class Bytes implements Comparable<Bytes> {
* arr[-1] = -Inf and arr[N] = Inf for an N-element array. The above * arr[-1] = -Inf and arr[N] = Inf for an N-element array. The above
* means that this function can return 2N + 1 different values * means that this function can return 2N + 1 different values
* ranging from -(N + 1) to N - 1. * ranging from -(N + 1) to N - 1.
* @deprecated {@link Bytes#binarySearch(byte[][], byte[], int, int)} * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@link #binarySearch(byte[][], byte[], int, int)} instead.
* @see #binarySearch(byte[][], byte[], int, int)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-13450">HBASE-13450</a>
*/ */
@Deprecated @Deprecated
public static int binarySearch(byte [][]arr, byte []key, int offset, public static int binarySearch(byte [][]arr, byte []key, int offset,
@ -2160,7 +2167,10 @@ public class Bytes implements Comparable<Bytes> {
* means that this function can return 2N + 1 different values * means that this function can return 2N + 1 different values
* ranging from -(N + 1) to N - 1. * ranging from -(N + 1) to N - 1.
* @return the index of the block * @return the index of the block
* @deprecated Use {@link Bytes#binarySearch(Cell[], Cell, CellComparator)} * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@link #binarySearch(Cell[], Cell, CellComparator)} instead.
* @see #binarySearch(Cell[], Cell, CellComparator)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-13450">HBASE-13450</a>
*/ */
@Deprecated @Deprecated
public static int binarySearch(byte[][] arr, Cell key, RawComparator<Cell> comparator) { public static int binarySearch(byte[][] arr, Cell key, RawComparator<Cell> comparator) {

View File

@ -25,7 +25,10 @@ import org.apache.yetus.audience.InterfaceAudience;
/** /**
* High scalable counter. Thread safe. * High scalable counter. Thread safe.
* @deprecated use {@link java.util.concurrent.atomic.LongAdder} instead. * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@link java.util.concurrent.atomic.LongAdder} instead.
* @see java.util.concurrent.atomic.LongAdder
* @see <a href="https://issues.apache.org/jira/browse/HBASE-7612">HBASE-7612</a>
*/ */
@InterfaceAudience.Public @InterfaceAudience.Public
@Deprecated @Deprecated

View File

@ -57,8 +57,10 @@ public class TableOutputFormat extends FileOutputFormat<ImmutableBytesWritable,
/** /**
* Instantiate a TableRecordWriter with the HBase HClient for writing. * Instantiate a TableRecordWriter with the HBase HClient for writing.
* *
* @deprecated Please use {@code #TableRecordWriter(JobConf)} This version does not clean up * @deprecated since 2.0.0 and will be removed in 3.0.0. Please use
* connections and will leak connections (removed in 2.0) * {@code #TableRecordWriter(JobConf)} instead. This version does not clean up connections and
* will leak connections (removed in 2.0).
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16774">HBASE-16774</a>
*/ */
@Deprecated @Deprecated
public TableRecordWriter(final BufferedMutator mutator) throws IOException { public TableRecordWriter(final BufferedMutator mutator) throws IOException {

View File

@ -87,6 +87,8 @@ public class CellCreator {
* @param visExpression visibility expression to be associated with cell * @param visExpression visibility expression to be associated with cell
* @return created Cell * @return created Cell
* @throws IOException * @throws IOException
* @deprecated since 0.98.9
* @see <a href="https://issues.apache.org/jira/browse/HBASE-10560">HBASE-10560</a>
*/ */
@Deprecated @Deprecated
public Cell create(byte[] row, int roffset, int rlength, byte[] family, int foffset, int flength, public Cell create(byte[] row, int roffset, int rlength, byte[] family, int foffset, int flength,

View File

@ -118,7 +118,10 @@ public class HFileOutputFormat2
/** /**
* The modification for the returned HTD doesn't affect the inner TD. * The modification for the returned HTD doesn't affect the inner TD.
* @return A clone of inner table descriptor * @return A clone of inner table descriptor
* @deprecated use {@link #getTableDescriptor} * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #getTableDescriptor()}
* instead.
* @see #getTableDescriptor()
* @see <a href="https://issues.apache.org/jira/browse/HBASE-18241">HBASE-18241</a>
*/ */
@Deprecated @Deprecated
public HTableDescriptor getHTableDescriptor() { public HTableDescriptor getHTableDescriptor() {

View File

@ -49,8 +49,17 @@ public class SimpleTotalOrderPartitioner<VALUE> extends Partitioner<ImmutableByt
implements Configurable { implements Configurable {
private final static Logger LOG = LoggerFactory.getLogger(SimpleTotalOrderPartitioner.class); private final static Logger LOG = LoggerFactory.getLogger(SimpleTotalOrderPartitioner.class);
/**
* @deprecated since 0.90.0
* @see <a href="https://issues.apache.org/jira/browse/HBASE-1923">HBASE-1923</a>
*/
@Deprecated @Deprecated
public static final String START = "hbase.simpletotalorder.start"; public static final String START = "hbase.simpletotalorder.start";
/**
* @deprecated since 0.90.0
* @see <a href="https://issues.apache.org/jira/browse/HBASE-1923">HBASE-1923</a>
*/
@Deprecated @Deprecated
public static final String END = "hbase.simpletotalorder.end"; public static final String END = "hbase.simpletotalorder.end";

View File

@ -552,7 +552,10 @@ public class TableMapReduceUtil {
* @param job The job that requires the permission. * @param job The job that requires the permission.
* @param quorumAddress string that contains the 3 required configuratins * @param quorumAddress string that contains the 3 required configuratins
* @throws IOException When the authentication token cannot be obtained. * @throws IOException When the authentication token cannot be obtained.
* @deprecated Since 1.2.0, use {@link #initCredentialsForCluster(Job, Configuration)} instead. * @deprecated Since 1.2.0 and will be removed in 3.0.0. Use
* {@link #initCredentialsForCluster(Job, Configuration)} instead.
* @see #initCredentialsForCluster(Job, Configuration)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-14886">HBASE-14886</a>
*/ */
@Deprecated @Deprecated
public static void initCredentialsForCluster(Job job, String quorumAddress) public static void initCredentialsForCluster(Job job, String quorumAddress)
@ -876,7 +879,10 @@ public class TableMapReduceUtil {
* Add the jars containing the given classes to the job's configuration * Add the jars containing the given classes to the job's configuration
* such that JobClient will ship them to the cluster and add them to * such that JobClient will ship them to the cluster and add them to
* the DistributedCache. * the DistributedCache.
* @deprecated rely on {@link #addDependencyJars(Job)} instead. * @deprecated since 1.3.0 and will be removed in 3.0.0. Use {@link #addDependencyJars(Job)}
* instead.
* @see #addDependencyJars(Job)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-8386">HBASE-8386</a>
*/ */
@Deprecated @Deprecated
public static void addDependencyJars(Configuration conf, public static void addDependencyJars(Configuration conf,

View File

@ -98,7 +98,10 @@ public interface ReplicationPeer {
void registerPeerConfigListener(ReplicationPeerConfigListener listener); void registerPeerConfigListener(ReplicationPeerConfigListener listener);
/** /**
* @deprecated Use {@link #registerPeerConfigListener(ReplicationPeerConfigListener)} instead. * @deprecated since 2.1.0 and will be removed in 4.0.0. Use
* {@link #registerPeerConfigListener(ReplicationPeerConfigListener)} instead.
* @see #registerPeerConfigListener(ReplicationPeerConfigListener)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-10573">HBASE-19573</a>
*/ */
@Deprecated @Deprecated
default void trackPeerConfigChanges(ReplicationPeerConfigListener listener) { default void trackPeerConfigChanges(ReplicationPeerConfigListener listener) {

View File

@ -25,7 +25,9 @@ import org.apache.yetus.audience.InterfaceAudience;
* set and row size appears to exceed max configured size (configurable via * set and row size appears to exceed max configured size (configurable via
* hbase.table.max.rowsize). * hbase.table.max.rowsize).
* *
* @deprecated use {@link org.apache.hadoop.hbase.client.RowTooBigException} instead. * @deprecated since 0.99.0. Use {@link org.apache.hadoop.hbase.client.RowTooBigException} instead.
* @see org.apache.hadoop.hbase.client.RowTooBigException
* @see <a href="https://issues.apache.org/jira/browse/HBASE-11893">HBASE-11893</a>
*/ */
@InterfaceAudience.Public @InterfaceAudience.Public
@Deprecated @Deprecated

View File

@ -36,6 +36,10 @@ public interface RpcSchedulerFactory {
*/ */
RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server); RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server);
/**
* @deprecated since 1.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-12028">HBASE-12028</a>
*/
@Deprecated @Deprecated
RpcScheduler create(Configuration conf, PriorityFunction priority); RpcScheduler create(Configuration conf, PriorityFunction priority);
} }

View File

@ -32,6 +32,10 @@ import org.apache.hadoop.hbase.ipc.SimpleRpcScheduler;
@InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.COPROC, HBaseInterfaceAudience.PHOENIX}) @InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.COPROC, HBaseInterfaceAudience.PHOENIX})
@InterfaceStability.Evolving @InterfaceStability.Evolving
public class SimpleRpcSchedulerFactory implements RpcSchedulerFactory { public class SimpleRpcSchedulerFactory implements RpcSchedulerFactory {
/**
* @deprecated since 1.0.0.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-12028">HBASE-12028</a>
*/
@Override @Override
@Deprecated @Deprecated
public RpcScheduler create(Configuration conf, PriorityFunction priority) { public RpcScheduler create(Configuration conf, PriorityFunction priority) {

View File

@ -191,13 +191,14 @@ public class StoreFileReader {
} }
/** /**
* @deprecated Do not write further code which depends on this call. Instead * @deprecated since 2.0.0 and will be removed in 3.0.0. Do not write further code which depends
* use getStoreFileScanner() which uses the StoreFileScanner class/interface * on this call. Instead use getStoreFileScanner() which uses the StoreFileScanner
* which is the preferred way to scan a store with higher level concepts. * class/interface which is the preferred way to scan a store with higher level concepts.
* *
* @param cacheBlocks should we cache the blocks? * @param cacheBlocks should we cache the blocks?
* @param pread use pread (for concurrent small readers) * @param pread use pread (for concurrent small readers)
* @return the underlying HFileScanner * @return the underlying HFileScanner
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15296">HBASE-15296</a>
*/ */
@Deprecated @Deprecated
public HFileScanner getScanner(boolean cacheBlocks, boolean pread) { public HFileScanner getScanner(boolean cacheBlocks, boolean pread) {
@ -205,9 +206,9 @@ public class StoreFileReader {
} }
/** /**
* @deprecated Do not write further code which depends on this call. Instead * @deprecated since 2.0.0 and will be removed in 3.0.0. Do not write further code which depends
* use getStoreFileScanner() which uses the StoreFileScanner class/interface * on this call. Instead use getStoreFileScanner() which uses the StoreFileScanner
* which is the preferred way to scan a store with higher level concepts. * class/interface which is the preferred way to scan a store with higher level concepts.
* *
* @param cacheBlocks * @param cacheBlocks
* should we cache the blocks? * should we cache the blocks?
@ -216,6 +217,7 @@ public class StoreFileReader {
* @param isCompaction * @param isCompaction
* is scanner being used for compaction? * is scanner being used for compaction?
* @return the underlying HFileScanner * @return the underlying HFileScanner
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15296">HBASE-15296</a>
*/ */
@Deprecated @Deprecated
public HFileScanner getScanner(boolean cacheBlocks, boolean pread, public HFileScanner getScanner(boolean cacheBlocks, boolean pread,

View File

@ -94,7 +94,10 @@ public class WALEdit implements HeapSize {
} }
/** /**
* @deprecated Since 2.0.1. Use {@link #WALEdit(int, boolean)} instead. * @deprecated since 2.0.1 and will be removed in 4.0.0. Use {@link #WALEdit(int, boolean)}
* instead.
* @see #WALEdit(int, boolean)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-20781">HBASE-20781</a>
*/ */
@Deprecated @Deprecated
public WALEdit(boolean isReplay) { public WALEdit(boolean isReplay) {
@ -102,7 +105,10 @@ public class WALEdit implements HeapSize {
} }
/** /**
* @deprecated Since 2.0.1. Use {@link #WALEdit(int, boolean)} instead. * @deprecated since 2.0.1 and will be removed in 4.0.0. Use {@link #WALEdit(int, boolean)}
* instead.
* @see #WALEdit(int, boolean)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-20781">HBASE-20781</a>
*/ */
@Deprecated @Deprecated
public WALEdit(int cellCount) { public WALEdit(int cellCount) {

View File

@ -47,7 +47,10 @@ import junit.framework.TestCase;
/** /**
* Abstract HBase test class. Initializes a few things that can come in handly * Abstract HBase test class. Initializes a few things that can come in handly
* like an HBaseConfiguration and filesystem. * like an HBaseConfiguration and filesystem.
* @deprecated Write junit4 unit tests using {@link HBaseTestingUtility} * @deprecated since 2.0.0 and will be removed in 3.0.0. Write junit4 unit tests using
* {@link HBaseTestingUtility}.
* @see HBaseTestingUtility
* @see <a href="https://issues.apache.org/jira/browse/HBASE-11912">HBASE-11912</a>
*/ */
@Deprecated @Deprecated
public abstract class HBaseTestCase extends TestCase { public abstract class HBaseTestCase extends TestCase {

View File

@ -181,7 +181,8 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
* System property key to get test directory value. Name is as it is because mini dfs has * System property key to get test directory value. Name is as it is because mini dfs has
* hard-codings to put test data here. It should NOT be used directly in HBase, as it's a property * hard-codings to put test data here. It should NOT be used directly in HBase, as it's a property
* used in mini dfs. * used in mini dfs.
* @deprecated can be used only with mini dfs * @deprecated since 2.0.0 and will be removed in 3.0.0. Can be used only with mini dfs.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-19410">HBASE-19410</a>
*/ */
@Deprecated @Deprecated
private static final String TEST_DIRECTORY_KEY = "test.build.data"; private static final String TEST_DIRECTORY_KEY = "test.build.data";
@ -357,8 +358,11 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
} }
/** /**
* @deprecated use {@link HBaseTestingUtility#HBaseTestingUtility()} instead * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #HBaseTestingUtility()}
* instead.
* @return a normal HBaseTestingUtility * @return a normal HBaseTestingUtility
* @see #HBaseTestingUtility()
* @see <a href="https://issues.apache.org/jira/browse/HBASE-19841">HBASE-19841</a>
*/ */
@Deprecated @Deprecated
public static HBaseTestingUtility createLocalHTU() { public static HBaseTestingUtility createLocalHTU() {
@ -366,8 +370,11 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
} }
/** /**
* @deprecated use {@link HBaseTestingUtility#HBaseTestingUtility(Configuration)} instead * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@link #HBaseTestingUtility(Configuration)} instead.
* @return a normal HBaseTestingUtility * @return a normal HBaseTestingUtility
* @see #HBaseTestingUtility(Configuration)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-19841">HBASE-19841</a>
*/ */
@Deprecated @Deprecated
public static HBaseTestingUtility createLocalHTU(Configuration c) { public static HBaseTestingUtility createLocalHTU(Configuration c) {
@ -1770,6 +1777,12 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
public static final byte [] START_KEY_BYTES = {FIRST_CHAR, FIRST_CHAR, FIRST_CHAR}; public static final byte [] START_KEY_BYTES = {FIRST_CHAR, FIRST_CHAR, FIRST_CHAR};
public static final String START_KEY = new String(START_KEY_BYTES, HConstants.UTF8_CHARSET); public static final String START_KEY = new String(START_KEY_BYTES, HConstants.UTF8_CHARSET);
/**
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@link #createTableDescriptor(TableName, int, int, int, KeepDeletedCells)} instead.
* @see #createTableDescriptor(TableName, int, int, int, KeepDeletedCells)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-13893">HBASE-13893</a>
*/
@Deprecated @Deprecated
public HTableDescriptor createTableDescriptor(final String name, public HTableDescriptor createTableDescriptor(final String name,
final int minVersions, final int versions, final int ttl, KeepDeletedCells keepDeleted) { final int minVersions, final int versions, final int ttl, KeepDeletedCells keepDeleted) {
@ -1781,6 +1794,10 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
* Create a table of name <code>name</code>. * Create a table of name <code>name</code>.
* @param name Name to give table. * @param name Name to give table.
* @return Column descriptor. * @return Column descriptor.
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@link #createTableDescriptor(TableName, int, int, int, KeepDeletedCells)} instead.
* @see #createTableDescriptor(TableName, int, int, int, KeepDeletedCells)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-13893">HBASE-13893</a>
*/ */
@Deprecated @Deprecated
public HTableDescriptor createTableDescriptor(final String name) { public HTableDescriptor createTableDescriptor(final String name) {
@ -1882,8 +1899,11 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
* @throws IOException * @throws IOException
* @return A region on which you must call * @return A region on which you must call
{@link HBaseTestingUtility#closeRegionAndWAL(HRegion)} when done. {@link HBaseTestingUtility#closeRegionAndWAL(HRegion)} when done.
* @deprecated use * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@link #createLocalHRegion(TableName, byte[], byte[], boolean, Durability, WAL, byte[]...)} * {@link #createLocalHRegion(TableName, byte[], byte[], boolean, Durability, WAL, byte[]...)}
* instead.
* @see #createLocalHRegion(TableName, byte[], byte[], boolean, Durability, WAL, byte[]...)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-13893">HBASE-13893</a>
*/ */
@Deprecated @Deprecated
public HRegion createLocalHRegion(byte[] tableName, byte[] startKey, byte[] stopKey, public HRegion createLocalHRegion(byte[] tableName, byte[] startKey, byte[] stopKey,