Skip to content

Commit a883f1d

Browse files
HorizonNetwchevreuil
authored andcommitted
HBASE-22344 Documented the deprecation of public and limited private APIs (apache#208)
Signed-off-by: stack <stack@apache.org>
1 parent 0de4c4c commit a883f1d

27 files changed

Lines changed: 232 additions & 62 deletions

File tree

hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ protected HColumnDescriptor(ModifyableColumnFamilyDescriptor delegate) {
162162
* name: i.e. 'printable' and ends in a ':' (Null passes are allowed because
163163
* <code>b</code> can be null when deserializing). Cannot start with a '.'
164164
* either. Also Family can not be an empty value or equal "recovered.edits".
165-
* @deprecated Use {@link ColumnFamilyDescriptorBuilder#isLegalColumnFamilyName(byte[])}.
165+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use
166+
* {@link ColumnFamilyDescriptorBuilder#isLegalColumnFamilyName(byte[])} instead.
167+
* @see ColumnFamilyDescriptorBuilder#isLegalColumnFamilyName(byte[])
168+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-18008">HBASE-18008</a>
166169
*/
167170
@Deprecated
168171
public static byte [] isLegalFamilyName(final byte [] b) {

hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,11 @@ public int compareTo(final HTableDescriptor other) {
551551
/**
552552
* Returns an unmodifiable collection of all the {@link HColumnDescriptor}
553553
* of all the column families of the table.
554-
* @deprecated Use {@link #getColumnFamilies}.
554+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #getColumnFamilies()} instead.
555555
* @return Immutable collection of {@link HColumnDescriptor} of all the
556556
* column families.
557+
* @see #getColumnFamilies()
558+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-18008">HBASE-18008</a>
557559
*/
558560
@Deprecated
559561
public Collection<HColumnDescriptor> getFamilies() {
@@ -660,8 +662,9 @@ public int getColumnFamilyCount() {
660662
* of the table.
661663
*
662664
* @return Array of all the HColumnDescriptors of the current table
663-
*
665+
* @deprecated since 2.0.0 and will be removed in 3.0.0.
664666
* @see #getFamilies()
667+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-18008">HBASE-18008</a>
665668
*/
666669
@Deprecated
667670
@Override
@@ -677,7 +680,10 @@ public HColumnDescriptor[] getColumnFamilies() {
677680
* @param column Column family name
678681
* @return Column descriptor for the passed family name or the family on
679682
* passed in column.
680-
* @deprecated Use {@link #getColumnFamily(byte[])}.
683+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #getColumnFamily(byte[])}
684+
* instead.
685+
* @see #getColumnFamily(byte[])
686+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-18008">HBASE-18008</a>
681687
*/
682688
@Deprecated
683689
public HColumnDescriptor getFamily(final byte[] column) {
@@ -800,19 +806,31 @@ public void removeCoprocessor(String className) {
800806
public static final HTableDescriptor NAMESPACE_TABLEDESC
801807
= new HTableDescriptor(TableDescriptorBuilder.NAMESPACE_TABLEDESC);
802808

809+
/**
810+
* @deprecated since 0.94.1
811+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-6188">HBASE-6188</a>
812+
*/
803813
@Deprecated
804814
public HTableDescriptor setOwner(User owner) {
805815
getDelegateeForModification().setOwner(owner);
806816
return this;
807817
}
808818

819+
/**
820+
* @deprecated since 0.94.1
821+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-6188">HBASE-6188</a>
822+
*/
809823
// used by admin.rb:alter(table_name,*args) to update owner.
810824
@Deprecated
811825
public HTableDescriptor setOwnerString(String ownerString) {
812826
getDelegateeForModification().setOwnerString(ownerString);
813827
return this;
814828
}
815829

830+
/**
831+
* @deprecated since 0.94.1
832+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-6188">HBASE-6188</a>
833+
*/
816834
@Override
817835
@Deprecated
818836
public String getOwnerString() {

hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,9 +1726,11 @@ HTableDescriptor[] getTableDescriptors(List<String> names)
17261726
* Do not use. Usually it is ignored but if not, it can do more damage than good. See hbck2.
17271727
* @param procId ID of the procedure to abort
17281728
* @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted?
1729-
* @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does not exist
1730-
* @throws IOException
1731-
* @deprecated Since 2.1.1 -- to be removed.
1729+
* @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does
1730+
* not exist
1731+
* @throws IOException if a remote or network exception occurs
1732+
* @deprecated since 2.1.1 and will be removed in 4.0.0.
1733+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-21223">HBASE-21223</a>
17321734
*/
17331735
@Deprecated
17341736
boolean abortProcedure(
@@ -1746,8 +1748,9 @@ boolean abortProcedure(
17461748
* @param procId ID of the procedure to abort
17471749
* @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted?
17481750
* @return <code>true</code> if aborted, <code>false</code> if procedure already completed or does not exist
1749-
* @throws IOException
1750-
* @deprecated Since 2.1.1 -- to be removed.
1751+
* @throws IOException if a remote or network exception occurs
1752+
* @deprecated since 2.1.1 and will be removed in 4.0.0.
1753+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-21223">HBASE-21223</a>
17511754
*/
17521755
@Deprecated
17531756
Future<Boolean> abortProcedureAsync(

hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,8 @@ CompletableFuture<Boolean> isProcedureFinished(String signature, String instance
864864
* @param mayInterruptIfRunning if the proc completed at least one step, should it be aborted?
865865
* @return true if aborted, false if procedure already completed or does not exist. the value is
866866
* wrapped by {@link CompletableFuture}
867-
* @deprecated Since 2.1.1 -- to be removed.
867+
* @deprecated since 2.1.1 and will be removed in 4.0.0.
868+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-21223">HBASE-21223</a>
868869
*/
869870
@Deprecated
870871
CompletableFuture<Boolean> abortProcedure(long procId, boolean mayInterruptIfRunning);

hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ public class Scan extends Query {
196196
public Scan() {}
197197

198198
/**
199-
* @deprecated use {@code new Scan().withStartRow(startRow).setFilter(filter)} instead.
199+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use
200+
* {@code new Scan().withStartRow(startRow).setFilter(filter)} instead.
201+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17320">HBASE-17320</a>
200202
*/
201203
@Deprecated
202204
public Scan(byte[] startRow, Filter filter) {
@@ -210,7 +212,9 @@ public Scan(byte[] startRow, Filter filter) {
210212
* If the specified row does not exist, the Scanner will start from the next closest row after the
211213
* specified row.
212214
* @param startRow row to start scanner at or after
213-
* @deprecated use {@code new Scan().withStartRow(startRow)} instead.
215+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use
216+
* {@code new Scan().withStartRow(startRow)} instead.
217+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17320">HBASE-17320</a>
214218
*/
215219
@Deprecated
216220
public Scan(byte[] startRow) {
@@ -221,7 +225,9 @@ public Scan(byte[] startRow) {
221225
* Create a Scan operation for the range of rows specified.
222226
* @param startRow row to start scanner at or after (inclusive)
223227
* @param stopRow row to stop scanner before (exclusive)
224-
* @deprecated use {@code new Scan().withStartRow(startRow).withStopRow(stopRow)} instead.
228+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use
229+
* {@code new Scan().withStartRow(startRow).withStopRow(stopRow)} instead.
230+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17320">HBASE-17320</a>
225231
*/
226232
@Deprecated
227233
public Scan(byte[] startRow, byte[] stopRow) {
@@ -423,8 +429,11 @@ public Scan setTimestamp(long timestamp) {
423429
* @return this
424430
* @throws IllegalArgumentException if startRow does not meet criteria for a row key (when length
425431
* exceeds {@link HConstants#MAX_ROW_LENGTH})
426-
* @deprecated use {@link #withStartRow(byte[])} instead. This method may change the inclusive of
427-
* the stop row to keep compatible with the old behavior.
432+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #withStartRow(byte[])}
433+
* instead. This method may change the inclusive of the stop row to keep compatible with the old
434+
* behavior.
435+
* @see #withStartRow(byte[])
436+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17320">HBASE-17320</a>
428437
*/
429438
@Deprecated
430439
public Scan setStartRow(byte[] startRow) {
@@ -483,8 +492,11 @@ public Scan withStartRow(byte[] startRow, boolean inclusive) {
483492
* @return this
484493
* @throws IllegalArgumentException if stopRow does not meet criteria for a row key (when length
485494
* exceeds {@link HConstants#MAX_ROW_LENGTH})
486-
* @deprecated use {@link #withStopRow(byte[])} instead. This method may change the inclusive of
487-
* the stop row to keep compatible with the old behavior.
495+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #withStopRow(byte[])} instead.
496+
* This method may change the inclusive of the stop row to keep compatible with the old
497+
* behavior.
498+
* @see #withStopRow(byte[])
499+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17320">HBASE-17320</a>
488500
*/
489501
@Deprecated
490502
public Scan setStopRow(byte[] stopRow) {
@@ -601,8 +613,10 @@ private byte[] calculateTheClosestNextRowKeyForPrefix(byte[] rowKeyPrefix) {
601613
/**
602614
* Get all available versions.
603615
* @return this
604-
* @deprecated It is easy to misunderstand with column family's max versions, so use
605-
* {@link #readAllVersions()} instead.
616+
* @deprecated since 2.0.0 and will be removed in 3.0.0. It is easy to misunderstand with column
617+
* family's max versions, so use {@link #readAllVersions()} instead.
618+
* @see #readAllVersions()
619+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17125">HBASE-17125</a>
606620
*/
607621
@Deprecated
608622
public Scan setMaxVersions() {
@@ -613,8 +627,10 @@ public Scan setMaxVersions() {
613627
* Get up to the specified number of versions of each column.
614628
* @param maxVersions maximum versions for each column
615629
* @return this
616-
* @deprecated It is easy to misunderstand with column family's max versions, so use
617-
* {@link #readVersions(int)} instead.
630+
* @deprecated since 2.0.0 and will be removed in 3.0.0. It is easy to misunderstand with column
631+
* family's max versions, so use {@link #readVersions(int)} instead.
632+
* @see #readVersions(int)
633+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17125">HBASE-17125</a>
618634
*/
619635
@Deprecated
620636
public Scan setMaxVersions(int maxVersions) {
@@ -1037,12 +1053,13 @@ public boolean isRaw() {
10371053
* better performance for small scan. [HBASE-9488]. Generally, if the scan range is within one
10381054
* data block(64KB), it could be considered as a small scan.
10391055
* @param small
1040-
* @deprecated since 2.0.0. Use {@link #setLimit(int)} and {@link #setReadType(ReadType)} instead.
1041-
* And for the one rpc optimization, now we will also fetch data when openScanner, and
1042-
* if the number of rows reaches the limit then we will close the scanner
1043-
* automatically which means we will fall back to one rpc.
1056+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #setLimit(int)} and
1057+
* {@link #setReadType(ReadType)} instead. And for the one rpc optimization, now we will also
1058+
* fetch data when openScanner, and if the number of rows reaches the limit then we will close
1059+
* the scanner automatically which means we will fall back to one rpc.
10441060
* @see #setLimit(int)
10451061
* @see #setReadType(ReadType)
1062+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17045">HBASE-17045</a>
10461063
*/
10471064
@Deprecated
10481065
public Scan setSmall(boolean small) {
@@ -1054,7 +1071,9 @@ public Scan setSmall(boolean small) {
10541071
/**
10551072
* Get whether this scan is a small scan
10561073
* @return true if small scan
1057-
* @deprecated since 2.0.0. See the comment of {@link #setSmall(boolean)}
1074+
* @deprecated since 2.0.0 and will be removed in 3.0.0. See the comment of
1075+
* {@link #setSmall(boolean)}
1076+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-17045">HBASE-17045</a>
10581077
*/
10591078
@Deprecated
10601079
public boolean isSmall() {

hbase-client/src/main/java/org/apache/hadoop/hbase/client/SnapshotDescription.java

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ public SnapshotDescription(String name) {
3737
}
3838

3939
/**
40-
* @deprecated Use the version with the TableName instance instead
40+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
41+
* instance instead.
42+
* @see #SnapshotDescription(String, TableName)
43+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
4144
*/
4245
@Deprecated
4346
public SnapshotDescription(String name, String table) {
@@ -49,7 +52,10 @@ public SnapshotDescription(String name, TableName table) {
4952
}
5053

5154
/**
52-
* @deprecated Use the version with the TableName instance instead
55+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
56+
* instance instead.
57+
* @see #SnapshotDescription(String, TableName, SnapshotType)
58+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
5359
*/
5460
@Deprecated
5561
public SnapshotDescription(String name, String table, SnapshotType type) {
@@ -61,7 +67,10 @@ public SnapshotDescription(String name, TableName table, SnapshotType type) {
6167
}
6268

6369
/**
64-
* @deprecated Use the version with the TableName instance instead
70+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
71+
* instance instead.
72+
* @see #SnapshotDescription(String, TableName, SnapshotType, String)
73+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
6574
*/
6675
@Deprecated
6776
public SnapshotDescription(String name, String table, SnapshotType type, String owner) {
@@ -73,7 +82,10 @@ public SnapshotDescription(String name, TableName table, SnapshotType type, Stri
7382
}
7483

7584
/**
76-
* @deprecated Use the version with the TableName instance instead
85+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
86+
* instance instead.
87+
* @see #SnapshotDescription(String, TableName, SnapshotType, String, long, int)
88+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
7789
*/
7890
@Deprecated
7991
public SnapshotDescription(String name, String table, SnapshotType type, String owner,
@@ -96,7 +108,11 @@ public String getName() {
96108
}
97109

98110
/**
99-
* @deprecated Use getTableName() or getTableNameAsString() instead.
111+
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #getTableName()} or
112+
* {@link #getTableNameAsString()} instead.
113+
* @see #getTableName()
114+
* @see #getTableNameAsString()
115+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
100116
*/
101117
@Deprecated
102118
public String getTable() {

hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ default Collection<String> getCoprocessors() {
191191
*/
192192
TableName getTableName();
193193

194+
/**
195+
* @deprecated since 2.0.0 and will be removed in 3.0.0.
196+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
197+
*/
194198
@Deprecated
195199
String getOwnerString();
196200

hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,12 +452,20 @@ public TableDescriptorBuilder setNormalizationEnabled(final boolean isEnable) {
452452
return this;
453453
}
454454

455+
/**
456+
* @deprecated since 2.0.0 and will be removed in 3.0.0.
457+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
458+
*/
455459
@Deprecated
456460
public TableDescriptorBuilder setOwner(User owner) {
457461
desc.setOwner(owner);
458462
return this;
459463
}
460464

465+
/**
466+
* @deprecated since 2.0.0 and will be removed in 3.0.0.
467+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
468+
*/
461469
@Deprecated
462470
public TableDescriptorBuilder setOwnerString(String ownerString) {
463471
desc.setOwnerString(ownerString);
@@ -1453,17 +1461,29 @@ public void removeCoprocessor(String className) {
14531461
}
14541462
}
14551463

1464+
/**
1465+
* @deprecated since 2.0.0 and will be removed in 3.0.0.
1466+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
1467+
*/
14561468
@Deprecated
14571469
public ModifyableTableDescriptor setOwner(User owner) {
14581470
return setOwnerString(owner != null ? owner.getShortName() : null);
14591471
}
14601472

1473+
/**
1474+
* @deprecated since 2.0.0 and will be removed in 3.0.0.
1475+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
1476+
*/
14611477
// used by admin.rb:alter(table_name,*args) to update owner.
14621478
@Deprecated
14631479
public ModifyableTableDescriptor setOwnerString(String ownerString) {
14641480
return setValue(OWNER_KEY, ownerString);
14651481
}
14661482

1483+
/**
1484+
* @deprecated since 2.0.0 and will be removed in 3.0.0.
1485+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-15583">HBASE-15583</a>
1486+
*/
14671487
@Override
14681488
@Deprecated
14691489
public String getOwnerString() {

hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FirstKeyValueMatchingQualifiersFilter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
* caveat, this filter is only useful for special cases
4444
* like org.apache.hadoop.hbase.mapreduce.RowCounter.
4545
* <p>
46-
* @deprecated Deprecated in 2.0. See HBASE-13347
46+
* @deprecated Deprecated in 2.0.0 and will be removed in 3.0.0.
47+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-13347">HBASE-13347</a>
4748
*/
4849
@InterfaceAudience.Public
4950
@Deprecated

hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public class HBaseConfiguration extends Configuration {
3939
/**
4040
* Instantiating HBaseConfiguration() is deprecated. Please use
4141
* HBaseConfiguration#create() to construct a plain Configuration
42-
* @deprecated Please use create() instead.
42+
* @deprecated since 0.90.0. Please use {@link #create()} instead.
43+
* @see #create()
44+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-2036">HBASE-2036</a>
4345
*/
4446
@Deprecated
4547
public HBaseConfiguration() {
@@ -53,7 +55,9 @@ public HBaseConfiguration() {
5355
/**
5456
* Instantiating HBaseConfiguration() is deprecated. Please use
5557
* HBaseConfiguration#create(conf) to construct a plain Configuration
56-
* @deprecated Please user create(conf) instead.
58+
* @deprecated since 0.90.0. Please use {@link #create(Configuration)} instead.
59+
* @see #create(Configuration)
60+
* @see <a href="https://issues.apache.org/jira/browse/HBASE-2036">HBASE-2036</a>
5761
*/
5862
@Deprecated
5963
public HBaseConfiguration(final Configuration c) {

0 commit comments

Comments
 (0)