From 6cff25cc23734819f99b1d089924bb25bb0a11c9 Mon Sep 17 00:00:00 2001 From: Jan Hentschel Date: Mon, 17 Jun 2019 22:02:23 +0200 Subject: [PATCH] HBASE-22344 Documented the deprecation of public and limited private APIs (#208) Signed-off-by: stack --- .../hadoop/hbase/HColumnDescriptor.java | 5 +- .../apache/hadoop/hbase/HTableDescriptor.java | 24 ++++- .../org/apache/hadoop/hbase/client/Admin.java | 12 ++- .../hadoop/hbase/client/AsyncAdmin.java | 3 +- .../org/apache/hadoop/hbase/client/Scan.java | 51 ++++++--- .../hbase/client/SnapshotDescription.java | 26 ++++- .../hadoop/hbase/client/TableDescriptor.java | 4 + .../hbase/client/TableDescriptorBuilder.java | 22 ++++ ...FirstKeyValueMatchingQualifiersFilter.java | 3 +- .../org/apache/hadoop/hbase/AuthUtil.java | 10 +- .../hadoop/hbase/HBaseConfiguration.java | 8 +- .../hbase/io/ImmutableBytesWritable.java | 4 +- .../org/apache/hadoop/hbase/util/Bytes.java | 18 +++- .../org/apache/hadoop/hbase/util/Counter.java | 5 +- .../hbase/mapred/TableOutputFormat.java | 6 +- .../hadoop/hbase/mapreduce/CellCreator.java | 2 + .../hbase/mapreduce/HFileOutputFormat2.java | 5 +- .../SimpleTotalOrderPartitioner.java | 9 ++ .../hbase/mapreduce/TableMapReduceUtil.java | 10 +- .../hbase/replication/ReplicationPeer.java | 5 +- .../hbase/coprocessor/RegionObserver.java | 7 +- .../regionserver/RowTooBigException.java | 4 +- .../regionserver/RpcSchedulerFactory.java | 4 + .../SimpleRpcSchedulerFactory.java | 4 + .../hbase/regionserver/StoreFileReader.java | 14 +-- .../security/access/AccessController.java | 25 ++++- .../hbase/tool/LoadIncrementalHFiles.java | 4 +- .../org/apache/hadoop/hbase/wal/WALEdit.java | 10 +- .../apache/hadoop/hbase/HBaseTestCase.java | 5 +- .../hadoop/hbase/HBaseTestingUtility.java | 102 ++++++++++++++---- 30 files changed, 326 insertions(+), 85 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java index 70392087513d..a2039360acc0 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java @@ -162,7 +162,10 @@ protected HColumnDescriptor(ModifyableColumnFamilyDescriptor delegate) { * name: i.e. 'printable' and ends in a ':' (Null passes are allowed because * b can be null when deserializing). Cannot start with a '.' * 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 HBASE-18008 */ @Deprecated public static byte [] isLegalFamilyName(final byte [] b) { diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java index 8391a232a18d..77d2b4773673 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java @@ -597,9 +597,11 @@ public int compareTo(final HTableDescriptor other) { /** * Returns an unmodifiable collection of all the {@link HColumnDescriptor} * 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 * column families. + * @see #getColumnFamilies() + * @see HBASE-18008 */ @Deprecated public Collection getFamilies() { @@ -706,8 +708,9 @@ public int getColumnFamilyCount() { * of the 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 HBASE-18008 */ @Deprecated @Override @@ -723,7 +726,10 @@ public HColumnDescriptor[] getColumnFamilies() { * @param column Column family name * @return Column descriptor for the passed family name or the family on * 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 HBASE-18008 */ @Deprecated public HColumnDescriptor getFamily(final byte[] column) { @@ -846,12 +852,20 @@ public void removeCoprocessor(String className) { public static final HTableDescriptor NAMESPACE_TABLEDESC = new HTableDescriptor(TableDescriptorBuilder.NAMESPACE_TABLEDESC); + /** + * @deprecated since 0.94.1 + * @see HBASE-6188 + */ @Deprecated public HTableDescriptor setOwner(User owner) { getDelegateeForModification().setOwner(owner); return this; } + /** + * @deprecated since 0.94.1 + * @see HBASE-6188 + */ // used by admin.rb:alter(table_name,*args) to update owner. @Deprecated public HTableDescriptor setOwnerString(String ownerString) { @@ -859,6 +873,10 @@ public HTableDescriptor setOwnerString(String ownerString) { return this; } + /** + * @deprecated since 0.94.1 + * @see HBASE-6188 + */ @Override @Deprecated public String getOwnerString() { diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java index 4f83c57625ed..e6ccc7711476 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java @@ -1110,8 +1110,10 @@ Map compactionSwitch(boolean switchState, List serv * array we'll assign to a random server. A server name is made of host, port and * startcode. Here is an example: host187.example.com,60020,1289493121758 * @throws IOException if we can't find a region named encodedRegionName - * @deprecated Use {@link #move(byte[], ServerName)} instead. And if you want to move the region - * to a random server, please use {@link #move(byte[])}. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use {@link #move(byte[], ServerName)} + * instead. And if you want to move the region to a random server, please use + * {@link #move(byte[])}. + * @see HBASE-22108 */ @Deprecated default void move(byte[] encodedRegionName, byte[] destServerName) throws IOException { @@ -1873,7 +1875,8 @@ HTableDescriptor[] getTableDescriptors(List names) * @return true if aborted, false if procedure already completed or does * not exist * @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 HBASE-21223 */ @Deprecated default boolean abortProcedure(long procId, boolean mayInterruptIfRunning) throws IOException { @@ -1893,7 +1896,8 @@ default boolean abortProcedure(long procId, boolean mayInterruptIfRunning) throw * @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 * @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 HBASE-21223 */ @Deprecated Future abortProcedureAsync( diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java index 3652eb77c7dd..78ed6d3de974 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java @@ -954,7 +954,8 @@ CompletableFuture isProcedureFinished(String signature, String instance * @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 * 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 HBASE-21223 */ @Deprecated CompletableFuture abortProcedure(long procId, boolean mayInterruptIfRunning); diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java index d4aff047a3c1..5e57799c9946 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java @@ -196,7 +196,9 @@ public class Scan extends Query { 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 HBASE-17320 */ @Deprecated public Scan(byte[] startRow, Filter filter) { @@ -210,7 +212,9 @@ public Scan(byte[] startRow, Filter filter) { * If the specified row does not exist, the Scanner will start from the next closest row after the * specified row. * @param startRow row to start scanner at or after - * @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 HBASE-17320 */ @Deprecated public Scan(byte[] startRow) { @@ -221,7 +225,9 @@ public Scan(byte[] startRow) { * Create a Scan operation for the range of rows specified. * @param startRow row to start scanner at or after (inclusive) * @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 HBASE-17320 */ @Deprecated public Scan(byte[] startRow, byte[] stopRow) { @@ -423,8 +429,11 @@ public Scan setTimestamp(long timestamp) { * @return this * @throws IllegalArgumentException if startRow does not meet criteria for a row key (when length * exceeds {@link HConstants#MAX_ROW_LENGTH}) - * @deprecated use {@link #withStartRow(byte[])} instead. This method may change the inclusive of - * the stop row to keep compatible with the old behavior. + * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #withStartRow(byte[])} + * instead. This method may change the inclusive of the stop row to keep compatible with the old + * behavior. + * @see #withStartRow(byte[]) + * @see HBASE-17320 */ @Deprecated public Scan setStartRow(byte[] startRow) { @@ -483,8 +492,11 @@ public Scan withStartRow(byte[] startRow, boolean inclusive) { * @return this * @throws IllegalArgumentException if stopRow does not meet criteria for a row key (when length * exceeds {@link HConstants#MAX_ROW_LENGTH}) - * @deprecated use {@link #withStopRow(byte[])} instead. This method may change the inclusive of - * the stop row to keep compatible with the old behavior. + * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #withStopRow(byte[])} instead. + * This method may change the inclusive of the stop row to keep compatible with the old + * behavior. + * @see #withStopRow(byte[]) + * @see HBASE-17320 */ @Deprecated public Scan setStopRow(byte[] stopRow) { @@ -601,8 +613,10 @@ private byte[] calculateTheClosestNextRowKeyForPrefix(byte[] rowKeyPrefix) { /** * Get all available versions. * @return this - * @deprecated It is easy to misunderstand with column family's max versions, so use - * {@link #readAllVersions()} instead. + * @deprecated since 2.0.0 and will be removed in 3.0.0. It is easy to misunderstand with column + * family's max versions, so use {@link #readAllVersions()} instead. + * @see #readAllVersions() + * @see HBASE-17125 */ @Deprecated public Scan setMaxVersions() { @@ -613,8 +627,10 @@ public Scan setMaxVersions() { * Get up to the specified number of versions of each column. * @param maxVersions maximum versions for each column * @return this - * @deprecated It is easy to misunderstand with column family's max versions, so use - * {@link #readVersions(int)} instead. + * @deprecated since 2.0.0 and will be removed in 3.0.0. It is easy to misunderstand with column + * family's max versions, so use {@link #readVersions(int)} instead. + * @see #readVersions(int) + * @see HBASE-17125 */ @Deprecated public Scan setMaxVersions(int maxVersions) { @@ -1037,12 +1053,13 @@ public boolean isRaw() { * 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. * @param small - * @deprecated since 2.0.0. Use {@link #setLimit(int)} and {@link #setReadType(ReadType)} instead. - * And for the one rpc optimization, now we will also fetch data when openScanner, and - * if the number of rows reaches the limit then we will close the scanner - * automatically which means we will fall back to one rpc. + * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #setLimit(int)} and + * {@link #setReadType(ReadType)} instead. And for the one rpc optimization, now we will also + * fetch data when openScanner, and if the number of rows reaches the limit then we will close + * the scanner automatically which means we will fall back to one rpc. * @see #setLimit(int) * @see #setReadType(ReadType) + * @see HBASE-17045 */ @Deprecated public Scan setSmall(boolean small) { @@ -1054,7 +1071,9 @@ public Scan setSmall(boolean small) { /** * Get whether this scan is a 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 HBASE-17045 */ @Deprecated public boolean isSmall() { diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/SnapshotDescription.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/SnapshotDescription.java index db62c431f593..0b6f196d615a 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/SnapshotDescription.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/SnapshotDescription.java @@ -37,7 +37,10 @@ public SnapshotDescription(String name) { } /** - * @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 HBASE-16892 */ @Deprecated public SnapshotDescription(String name, String table) { @@ -49,7 +52,10 @@ public SnapshotDescription(String name, TableName table) { } /** - * @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 HBASE-16892 */ @Deprecated public SnapshotDescription(String name, String table, SnapshotType type) { @@ -61,7 +67,10 @@ public SnapshotDescription(String name, TableName table, SnapshotType type) { } /** - * @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 HBASE-16892 */ @Deprecated public SnapshotDescription(String name, String table, SnapshotType type, String owner) { @@ -73,7 +82,10 @@ public SnapshotDescription(String name, TableName table, SnapshotType type, Stri } /** - * @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 HBASE-16892 */ @Deprecated public SnapshotDescription(String name, String table, SnapshotType type, String owner, @@ -96,7 +108,11 @@ public String getName() { } /** - * @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 HBASE-16892 */ @Deprecated public String getTable() { diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptor.java index 9d6e261cc921..2ae273d89899 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptor.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptor.java @@ -191,6 +191,10 @@ default Collection getCoprocessors() { */ TableName getTableName(); + /** + * @deprecated since 2.0.0 and will be removed in 3.0.0. + * @see HBASE-15583 + */ @Deprecated String getOwnerString(); diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java index b0e32d1f542d..4ab04cd6f0cd 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java @@ -272,6 +272,7 @@ public class TableDescriptorBuilder { CP_HTD_ATTR_VALUE_PARAM_VALUE_PATTERN + "),?"); private static final Pattern CP_HTD_ATTR_KEY_PATTERN = Pattern.compile("^coprocessor\\$([0-9]+)$", Pattern.CASE_INSENSITIVE); + /** * Table descriptor for namespace table */ @@ -288,6 +289,7 @@ public class TableDescriptorBuilder { .setScope(HConstants.REPLICATION_SCOPE_LOCAL) .build()) .build(); + private final ModifyableTableDescriptor desc; /** @@ -488,12 +490,20 @@ public TableDescriptorBuilder setNormalizationEnabled(final boolean isEnable) { return this; } + /** + * @deprecated since 2.0.0 and will be removed in 3.0.0. + * @see HBASE-15583 + */ @Deprecated public TableDescriptorBuilder setOwner(User owner) { desc.setOwner(owner); return this; } + /** + * @deprecated since 2.0.0 and will be removed in 3.0.0. + * @see HBASE-15583 + */ @Deprecated public TableDescriptorBuilder setOwnerString(String ownerString) { desc.setOwnerString(ownerString); @@ -1532,17 +1542,29 @@ public void removeCoprocessor(String className) { } } + /** + * @deprecated since 2.0.0 and will be removed in 3.0.0. + * @see HBASE-15583 + */ @Deprecated public ModifyableTableDescriptor setOwner(User owner) { return setOwnerString(owner != null ? owner.getShortName() : null); } + /** + * @deprecated since 2.0.0 and will be removed in 3.0.0. + * @see HBASE-15583 + */ // used by admin.rb:alter(table_name,*args) to update owner. @Deprecated public ModifyableTableDescriptor setOwnerString(String ownerString) { return setValue(OWNER_KEY, ownerString); } + /** + * @deprecated since 2.0.0 and will be removed in 3.0.0. + * @see HBASE-15583 + */ @Override @Deprecated public String getOwnerString() { diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.java index 4cde2bfcdeef..ed119494cce2 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.java @@ -43,7 +43,8 @@ * caveat, this filter is only useful for special cases * like org.apache.hadoop.hbase.mapreduce.RowCounter. *

- * @deprecated Deprecated in 2.0. See HBASE-13347 + * @deprecated Deprecated in 2.0.0 and will be removed in 3.0.0. + * @see HBASE-13347 */ @InterfaceAudience.Public @Deprecated diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/AuthUtil.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/AuthUtil.java index 1cf43e130678..d8d4f788ab10 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/AuthUtil.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/AuthUtil.java @@ -72,12 +72,13 @@ * for kerberized applications. For more, please refer * Client-side Configuration for Secure Operation * - * @deprecated since 2.2.0, to be removed in hbase-3.0.0. + * @deprecated since 2.2.0, to be marked as + * {@link org.apache.yetus.audience.InterfaceAudience.Private} in 4.0.0. + * @see HBASE-20886 */ @Deprecated @InterfaceAudience.Public public final class AuthUtil { - // TODO: Mark this class InterfaceAudience.Private from 3.0.0 private static final Logger LOG = LoggerFactory.getLogger(AuthUtil.class); /** Prefix character to denote group names */ @@ -214,11 +215,12 @@ protected void chore() { * Checks if security is enabled and if so, launches chore for refreshing kerberos ticket. * @param conf the hbase service configuration * @return a ScheduledChore for renewals, if needed, and null otherwise. - * @deprecated Deprecated since 2.2.0, this method will be internal use only after 3.0.0. + * @deprecated Deprecated since 2.2.0, this method will be + * {@link org.apache.yetus.audience.InterfaceAudience.Private} use only after 4.0.0. + * @see HBASE-20886 */ @Deprecated public static ScheduledChore getAuthChore(Configuration conf) throws IOException { - // TODO: Mark this method InterfaceAudience.Private from 3.0.0 User user = loginClientAsService(conf); return getAuthRenewalChore(user.getUGI()); } diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java index 02c36ab45260..85c038fcf6eb 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java @@ -39,7 +39,9 @@ public class HBaseConfiguration extends Configuration { /** * Instantiating HBaseConfiguration() is deprecated. Please use * 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 HBASE-2036 */ @Deprecated public HBaseConfiguration() { @@ -53,7 +55,9 @@ public HBaseConfiguration() { /** * Instantiating HBaseConfiguration() is deprecated. Please use * 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 HBASE-2036 */ @Deprecated public HBaseConfiguration(final Configuration c) { diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ImmutableBytesWritable.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ImmutableBytesWritable.java index 949e905a69c0..d810c4ae9aa1 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ImmutableBytesWritable.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/ImmutableBytesWritable.java @@ -117,7 +117,9 @@ public void set(final byte [] b, final int offset, final int length) { /** * @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 HBASE-11561 */ @Deprecated public int getSize() { diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java index dcc1266df92c..cf1220b8671e 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java @@ -226,7 +226,9 @@ public void set(final byte [] b, final int offset, final int length) { /** * @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 HBASE-11862 */ @Deprecated public int getSize() { @@ -1319,7 +1321,9 @@ public static long bytesToVint(final byte [] buffer) { * @param offset Offset into array at which vint begins. * @throws java.io.IOException e * @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 HBASE-6919 */ @Deprecated public static long readVLong(final byte [] buffer, final int offset) @@ -2102,7 +2106,10 @@ public static byte[][] toBinaryByteArrays(final String[] t) { * arr[-1] = -Inf and arr[N] = Inf for an N-element array. The above * means that this function can return 2N + 1 different values * 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 HBASE-13450 */ @Deprecated public static int binarySearch(byte [][]arr, byte []key, int offset, @@ -2160,7 +2167,10 @@ else if (cmp < 0) * means that this function can return 2N + 1 different values * ranging from -(N + 1) to N - 1. * @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 HBASE-13450 */ @Deprecated public static int binarySearch(byte[][] arr, Cell key, RawComparator comparator) { diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Counter.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Counter.java index d646f4592a93..2d97405c0aa6 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Counter.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Counter.java @@ -25,7 +25,10 @@ /** * 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 HBASE-7612 */ @InterfaceAudience.Public @Deprecated diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java index ed619fd7ff21..fcf6f552b7ac 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java @@ -57,8 +57,10 @@ protected static class TableRecordWriter implements RecordWriterHBASE-16774 */ @Deprecated public TableRecordWriter(final BufferedMutator mutator) throws IOException { diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/CellCreator.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/CellCreator.java index e744967fa361..6c69651d0a43 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/CellCreator.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/CellCreator.java @@ -87,6 +87,8 @@ public Cell create(byte[] row, int roffset, int rlength, byte[] family, int foff * @param visExpression visibility expression to be associated with cell * @return created Cell * @throws IOException + * @deprecated since 0.98.9 + * @see HBASE-10560 */ @Deprecated public Cell create(byte[] row, int roffset, int rlength, byte[] family, int foffset, int flength, diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java index 59b19948a0b2..cc9df097e84a 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java @@ -119,7 +119,10 @@ public TableInfo(TableDescriptor tableDesctiptor, RegionLocator regionLocator) { /** * The modification for the returned HTD doesn't affect the inner TD. * @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 HBASE-18241 */ @Deprecated public HTableDescriptor getHTableDescriptor() { diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java index 1d6308adc664..df07780737a3 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java @@ -49,8 +49,17 @@ public class SimpleTotalOrderPartitioner extends PartitionerHBASE-1923 + */ @Deprecated public static final String START = "hbase.simpletotalorder.start"; + + /** + * @deprecated since 0.90.0 + * @see HBASE-1923 + */ @Deprecated public static final String END = "hbase.simpletotalorder.end"; diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java index ad189c62c076..c789654ba568 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java @@ -552,7 +552,10 @@ public static void initCredentials(Job job) throws IOException { * @param job The job that requires the permission. * @param quorumAddress string that contains the 3 required configuratins * @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 HBASE-14886 */ @Deprecated public static void initCredentialsForCluster(Job job, String quorumAddress) @@ -874,7 +877,10 @@ public static void addDependencyJars(Job job) throws IOException { * 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 * 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 HBASE-8386 */ @Deprecated public static void addDependencyJars(Configuration conf, diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeer.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeer.java index 2da3cce9402f..f1103b268e98 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeer.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeer.java @@ -98,7 +98,10 @@ default boolean isPeerEnabled() { 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 HBASE-19573 */ @Deprecated default void trackPeerConfigChanges(ReplicationPeerConfigListener listener) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java index 95b215054967..e517405d4c20 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java @@ -1030,7 +1030,12 @@ default StoreFileReader postStoreFileReaderOpen(ObserverContextHBASE-21643 */ @Deprecated default Cell postMutationBeforeWAL(ObserverContext ctx, diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RowTooBigException.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RowTooBigException.java index 4e3281101b27..9cbf748f90db 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RowTooBigException.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RowTooBigException.java @@ -25,7 +25,9 @@ * set and row size appears to exceed max configured size (configurable via * 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 HBASE-11893 */ @InterfaceAudience.Public @Deprecated diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RpcSchedulerFactory.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RpcSchedulerFactory.java index 4e63f430e226..dbd393db9884 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RpcSchedulerFactory.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RpcSchedulerFactory.java @@ -36,6 +36,10 @@ public interface RpcSchedulerFactory { */ RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server); + /** + * @deprecated since 1.0.0. + * @see HBASE-12028 + */ @Deprecated RpcScheduler create(Configuration conf, PriorityFunction priority); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SimpleRpcSchedulerFactory.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SimpleRpcSchedulerFactory.java index 67aad2680971..22a9da548d6f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SimpleRpcSchedulerFactory.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SimpleRpcSchedulerFactory.java @@ -32,6 +32,10 @@ @InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.COPROC, HBaseInterfaceAudience.PHOENIX}) @InterfaceStability.Evolving public class SimpleRpcSchedulerFactory implements RpcSchedulerFactory { + /** + * @deprecated since 1.0.0. + * @see HBASE-12028 + */ @Override @Deprecated public RpcScheduler create(Configuration conf, PriorityFunction priority) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileReader.java index e1fc91844cd2..702ea8df34ac 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileReader.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileReader.java @@ -187,13 +187,14 @@ void readCompleted() { } /** - * @deprecated Do not write further code which depends on this call. Instead - * use getStoreFileScanner() which uses the StoreFileScanner class/interface - * which is the preferred way to scan a store with higher level concepts. + * @deprecated since 2.0.0 and will be removed in 3.0.0. Do not write further code which depends + * on this call. Instead use getStoreFileScanner() which uses the StoreFileScanner + * class/interface which is the preferred way to scan a store with higher level concepts. * * @param cacheBlocks should we cache the blocks? * @param pread use pread (for concurrent small readers) * @return the underlying HFileScanner + * @see HBASE-15296 */ @Deprecated public HFileScanner getScanner(boolean cacheBlocks, boolean pread) { @@ -201,9 +202,9 @@ public HFileScanner getScanner(boolean cacheBlocks, boolean pread) { } /** - * @deprecated Do not write further code which depends on this call. Instead - * use getStoreFileScanner() which uses the StoreFileScanner class/interface - * which is the preferred way to scan a store with higher level concepts. + * @deprecated since 2.0.0 and will be removed in 3.0.0. Do not write further code which depends + * on this call. Instead use getStoreFileScanner() which uses the StoreFileScanner + * class/interface which is the preferred way to scan a store with higher level concepts. * * @param cacheBlocks * should we cache the blocks? @@ -212,6 +213,7 @@ public HFileScanner getScanner(boolean cacheBlocks, boolean pread) { * @param isCompaction * is scanner being used for compaction? * @return the underlying HFileScanner + * @see HBASE-15296 */ @Deprecated public HFileScanner getScanner(boolean cacheBlocks, boolean pread, diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java index 783c9b053eb4..c98fc118e7b5 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java @@ -1982,7 +1982,10 @@ public void postEndpointInvocation(ObserverContext /* ---- Protobuf AccessControlService implementation ---- */ /** - * @deprecated Use {@link Admin#grant(UserPermission, boolean)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link Admin#grant(UserPermission, boolean)} instead. + * @see Admin#grant(UserPermission, boolean) + * @see HBASE-21739 */ @Deprecated @Override @@ -2025,7 +2028,10 @@ public void grant(RpcController controller, } /** - * @deprecated Use {@link Admin#revoke(UserPermission)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use {@link Admin#revoke(UserPermission)} + * instead. + * @see Admin#revoke(UserPermission) + * @see HBASE-21739 */ @Deprecated @Override @@ -2065,7 +2071,10 @@ public void revoke(RpcController controller, AccessControlProtos.RevokeRequest r } /** - * @deprecated Use {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead. + * @see Admin#getUserPermissions(GetUserPermissionsRequest) + * @see HBASE-21911 */ @Deprecated @Override @@ -2116,7 +2125,10 @@ public void getUserPermissions(RpcController controller, } /** - * @deprecated Use {@link Admin#hasUserPermissions(List)} instead. + * @deprecated since 2.2.0 and will be removed 4.0.0. Use {@link Admin#hasUserPermissions(List)} + * instead. + * @see Admin#hasUserPermissions(List) + * @see HBASE-22117 */ @Deprecated @Override @@ -2442,7 +2454,10 @@ private User getActiveUser(ObserverContext ctx) throws IOException { } /** - * @deprecated Use {@link Admin#hasUserPermissions(String, List)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link Admin#hasUserPermissions(String, List)} instead. + * @see Admin#hasUserPermissions(String, List) + * @see HBASE-22117 */ @Deprecated @Override diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/LoadIncrementalHFiles.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/LoadIncrementalHFiles.java index bebd736be58d..a9266182e524 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/LoadIncrementalHFiles.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/LoadIncrementalHFiles.java @@ -155,7 +155,9 @@ public class LoadIncrementalHFiles extends Configured implements Tool { * the case where a region has split during the process of the load. When this happens, the HFile * is split into two physical parts across the new region boundary, and each part is added back * into the queue. The import process finishes when the queue is empty. - * @deprecated Use {@link BulkLoadHFiles} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use {@link BulkLoadHFiles} instead. + * @see BulkLoadHFiles + * @see HBASE-21782 */ @InterfaceAudience.Public @Deprecated diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALEdit.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALEdit.java index 7c2814346fd9..214000200cba 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALEdit.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALEdit.java @@ -94,7 +94,10 @@ public WALEdit() { } /** - * @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 HBASE-20781 */ @Deprecated public WALEdit(boolean isReplay) { @@ -102,7 +105,10 @@ public WALEdit(boolean isReplay) { } /** - * @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 HBASE-20781 */ @Deprecated public WALEdit(int cellCount) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java index 706a75f287db..7d296fa0e5ce 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java @@ -47,7 +47,10 @@ /** * Abstract HBase test class. Initializes a few things that can come in handly * 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 HBASE-11912 */ @Deprecated public abstract class HBaseTestCase extends TestCase { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java index c147fa185a06..c1c3f2af7008 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java @@ -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 * hard-codings to put test data here. It should NOT be used directly in HBase, as it's a property * 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 HBASE-19410 */ @Deprecated private static final String TEST_DIRECTORY_KEY = "test.build.data"; @@ -357,8 +358,11 @@ public HBaseTestingUtility(@Nullable Configuration conf) { } /** - * @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 + * @see #HBaseTestingUtility() + * @see HBASE-19841 */ @Deprecated public static HBaseTestingUtility createLocalHTU() { @@ -366,8 +370,11 @@ public static HBaseTestingUtility createLocalHTU() { } /** - * @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 + * @see #HBaseTestingUtility(Configuration) + * @see HBASE-19841 */ @Deprecated public static HBaseTestingUtility createLocalHTU(Configuration c) { @@ -787,7 +794,10 @@ public void shutdownMiniDFSCluster() throws IOException { * @param createWALDir Whether to create a new WAL directory. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(boolean createWALDir) throws Exception { @@ -803,7 +813,10 @@ public MiniHBaseCluster startMiniCluster(boolean createWALDir) throws Exception * @param createRootDir Whether to create a new root or data directory path. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(int numSlaves, boolean createRootDir) @@ -821,7 +834,10 @@ public MiniHBaseCluster startMiniCluster(int numSlaves, boolean createRootDir) * @param createWALDir Whether to create a new WAL directory. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(int numSlaves, boolean createRootDir, @@ -840,7 +856,10 @@ public MiniHBaseCluster startMiniCluster(int numSlaves, boolean createRootDir, * @param createRootDir Whether to create a new root or data directory path. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(int numMasters, int numSlaves, boolean createRootDir) @@ -858,7 +877,10 @@ public MiniHBaseCluster startMiniCluster(int numMasters, int numSlaves, boolean * @param numSlaves Slave node number, for both HBase region server and HDFS data node. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(int numMasters, int numSlaves) throws Exception { @@ -877,7 +899,10 @@ public MiniHBaseCluster startMiniCluster(int numMasters, int numSlaves) throws E * @param createRootDir Whether to create a new root or data directory path. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(int numMasters, int numSlaves, String[] dataNodeHosts, @@ -897,7 +922,10 @@ public MiniHBaseCluster startMiniCluster(int numMasters, int numSlaves, String[] * HDFS data node number. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(int numMasters, int numSlaves, String[] dataNodeHosts) @@ -916,7 +944,10 @@ public MiniHBaseCluster startMiniCluster(int numMasters, int numSlaves, String[] * @param numDataNodes Number of datanodes. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(int numMasters, int numRegionServers, int numDataNodes) @@ -938,7 +969,10 @@ public MiniHBaseCluster startMiniCluster(int numMasters, int numRegionServers, i * @param rsClass The class to use as HRegionServer, or null for default. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(int numMasters, int numSlaves, String[] dataNodeHosts, @@ -965,7 +999,10 @@ public MiniHBaseCluster startMiniCluster(int numMasters, int numSlaves, String[] * @param rsClass The class to use as HRegionServer, or null for default. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(int numMasters, int numRegionServers, int numDataNodes, @@ -994,7 +1031,10 @@ public MiniHBaseCluster startMiniCluster(int numMasters, int numRegionServers, i * @param createWALDir Whether to create a new WAL directory. * @return The mini HBase cluster created. * @see #shutdownMiniCluster() - * @deprecated Use {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniCluster(StartMiniClusterOption)} instead. + * @see #startMiniCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniCluster(int numMasters, int numRegionServers, int numDataNodes, @@ -1135,7 +1175,10 @@ public MiniHBaseCluster startMiniHBaseCluster() throws IOException, InterruptedE * @param numRegionServers Number of region servers. * @return The mini HBase cluster created. * @see #shutdownMiniHBaseCluster() - * @deprecated Use {@link #startMiniHBaseCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniHBaseCluster(StartMiniClusterOption)} instead. + * @see #startMiniHBaseCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniHBaseCluster(int numMasters, int numRegionServers) @@ -1154,7 +1197,10 @@ public MiniHBaseCluster startMiniHBaseCluster(int numMasters, int numRegionServe * @param rsPorts Ports that RegionServer should use. * @return The mini HBase cluster created. * @see #shutdownMiniHBaseCluster() - * @deprecated Use {@link #startMiniHBaseCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniHBaseCluster(StartMiniClusterOption)} instead. + * @see #startMiniHBaseCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniHBaseCluster(int numMasters, int numRegionServers, @@ -1177,7 +1223,10 @@ public MiniHBaseCluster startMiniHBaseCluster(int numMasters, int numRegionServe * @param createWALDir Whether to create a new WAL directory. * @return The mini HBase cluster created. * @see #shutdownMiniHBaseCluster() - * @deprecated Use {@link #startMiniHBaseCluster(StartMiniClusterOption)} instead. + * @deprecated since 2.2.0 and will be removed in 4.0.0. Use + * {@link #startMiniHBaseCluster(StartMiniClusterOption)} instead. + * @see #startMiniHBaseCluster(StartMiniClusterOption) + * @see HBASE-21071 */ @Deprecated public MiniHBaseCluster startMiniHBaseCluster(int numMasters, int numRegionServers, @@ -1900,6 +1949,12 @@ public void deleteTableIfAny(TableName tableName) throws IOException { 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); + /** + * @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 HBASE-13893 + */ @Deprecated public HTableDescriptor createTableDescriptor(final String name, final int minVersions, final int versions, final int ttl, KeepDeletedCells keepDeleted) { @@ -1911,6 +1966,10 @@ public HTableDescriptor createTableDescriptor(final String name, * Create a table of name name. * @param name Name to give table. * @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 HBASE-13893 */ @Deprecated public HTableDescriptor createTableDescriptor(final String name) { @@ -2012,8 +2071,11 @@ public HRegion createLocalHRegion(RegionInfo info, TableDescriptor desc, WAL wal * @throws IOException * @return A region on which you must call {@link HBaseTestingUtility#closeRegionAndWAL(HRegion)} when done. - * @deprecated use - * {@link #createLocalHRegion(TableName, byte[], byte[], boolean, Durability, WAL, byte[]...)} + * @deprecated since 2.0.0 and will be removed in 3.0.0. Use + * {@link #createLocalHRegion(TableName, byte[], byte[], boolean, Durability, WAL, byte[]...)} + * instead. + * @see #createLocalHRegion(TableName, byte[], byte[], boolean, Durability, WAL, byte[]...) + * @see HBASE-13893 */ @Deprecated public HRegion createLocalHRegion(byte[] tableName, byte[] startKey, byte[] stopKey, @@ -2381,6 +2443,8 @@ public void deleteNumericRows(final Table t, final byte[] f, int startRow, int e /** * Return the number of rows in the given table. + * @param table to count rows + * @return count of rows */ public int countRows(final Table table) throws IOException { return countRows(table, new Scan());