You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2017/08/15 17:45:16 UTC
hbase git commit: HBASE-18599 Add missing @Deprecated annotations
Repository: hbase
Updated Branches:
refs/heads/master effd1093b -> 70c4f78ce
HBASE-18599 Add missing @Deprecated annotations
Signed-off-by: Michael Stack <st...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/70c4f78c
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/70c4f78c
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/70c4f78c
Branch: refs/heads/master
Commit: 70c4f78ce03cf9e13d148e75445b19d43571a09a
Parents: effd109
Author: Lars Francke <la...@gmail.com>
Authored: Tue Aug 15 09:36:51 2017 +0200
Committer: Michael Stack <st...@apache.org>
Committed: Tue Aug 15 10:44:50 2017 -0700
----------------------------------------------------------------------
.../apache/hadoop/hbase/HColumnDescriptor.java | 17 +++++++++--
.../apache/hadoop/hbase/HTableDescriptor.java | 8 +++--
.../org/apache/hadoop/hbase/client/Admin.java | 32 +++++++++++++++-----
.../apache/hadoop/hbase/client/AsyncAdmin.java | 5 ++-
.../client/metrics/ServerSideScanMetrics.java | 15 +++++++--
.../hbase/coprocessor/RegionObserver.java | 5 ++-
6 files changed, 65 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/70c4f78c/hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
----------------------------------------------------------------------
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 5fe85cc..507bf49 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
@@ -100,14 +100,18 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
public static final String NEW_VERSION_BEHAVIOR = ColumnFamilyDescriptorBuilder.NEW_VERSION_BEHAVIOR;
public static final boolean DEFAULT_NEW_VERSION_BEHAVIOR = ColumnFamilyDescriptorBuilder.DEFAULT_NEW_VERSION_BEHAVIOR;
protected final ModifyableColumnFamilyDescriptor delegatee;
+
/**
* Construct a column descriptor specifying only the family name
* The other attributes are defaulted.
*
* @param familyName Column family name. Must be 'printable' -- digit or
* letter -- and may not contain a <code>:</code>
- * @deprecated use {@link ColumnFamilyDescriptorBuilder#of(String)}
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18433">HBASE-18433</a>).
+ * Use {@link ColumnFamilyDescriptorBuilder#of(String)}.
*/
+ @Deprecated
public HColumnDescriptor(final String familyName) {
this(Bytes.toBytes(familyName));
}
@@ -118,8 +122,11 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
*
* @param familyName Column family name. Must be 'printable' -- digit or
* letter -- and may not contain a <code>:</code>
- * @deprecated use {@link ColumnFamilyDescriptorBuilder#of(byte[])}
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18433">HBASE-18433</a>).
+ * Use {@link ColumnFamilyDescriptorBuilder#of(byte[])}.
*/
+ @Deprecated
public HColumnDescriptor(final byte [] familyName) {
this(new ModifyableColumnFamilyDescriptor(familyName));
}
@@ -128,9 +135,13 @@ public class HColumnDescriptor implements ColumnFamilyDescriptor, Comparable<HCo
* Constructor.
* Makes a deep copy of the supplied descriptor.
* Can make a modifiable descriptor from an UnmodifyableHColumnDescriptor.
+ *
* @param desc The descriptor.
- * @deprecated use {@link ColumnFamilyDescriptorBuilder#copy(ColumnFamilyDescriptor)}
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18433">HBASE-18433</a>).
+ * Use {@link ColumnFamilyDescriptorBuilder#copy(ColumnFamilyDescriptor)}.
*/
+ @Deprecated
public HColumnDescriptor(HColumnDescriptor desc) {
this(desc, true);
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/70c4f78c/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
----------------------------------------------------------------------
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 c09d434..a0f23c1 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
@@ -44,7 +44,7 @@ import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.ModifyableCo
* if the table is read only, the maximum size of the memstore,
* when the region split should occur, coprocessors associated with it etc...
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
- * use {@link TableDescriptorBuilder} to build {@link HTableDescriptor}.
+ * Use {@link TableDescriptorBuilder} to build {@link HTableDescriptor}.
*/
@Deprecated
@InterfaceAudience.Public
@@ -602,9 +602,13 @@ public class HTableDescriptor implements TableDescriptor, Comparable<HTableDescr
* HTableDescriptor contains mapping of family name to HColumnDescriptors.
* This returns all the keys of the family map which represents the column
* family names of the table.
+ *
* @return Immutable sorted set of the keys of the families.
- * @deprecated Use {@link #getColumnFamilyNames()}.
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18008">HBASE-18008</a>).
+ * Use {@link #getColumnFamilyNames()}.
*/
+ @Deprecated
public Set<byte[]> getFamiliesKeys() {
return delegatee.getColumnFamilyNames();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/70c4f78c/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
----------------------------------------------------------------------
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 d2acae3..8de9f89 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
@@ -833,8 +833,11 @@ public interface Admin extends Abortable, Closeable {
* @param regionname region name to close
* @param serverName Deprecated. Not used.
* @throws IOException if a remote or network exception occurs
- * @deprecated Since 2.0. Will be removed in 3.0. Use {@link #unassign(byte[], boolean)} instead.
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18231">HBASE-18231</a>).
+ * Use {@link #unassign(byte[], boolean)}.
*/
+ @Deprecated
void closeRegion(final String regionname, final String serverName) throws IOException;
/**
@@ -843,8 +846,11 @@ public interface Admin extends Abortable, Closeable {
* @param regionname region name to close
* @param serverName Deprecated. Not used.
* @throws IOException if a remote or network exception occurs
- * @deprecated Since 2.0. Will be removed in 3.0. Use {@link #unassign(byte[], boolean)} instead.
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18231">HBASE-18231</a>).
+ * Use {@link #unassign(byte[], boolean)}.
*/
+ @Deprecated
void closeRegion(final byte[] regionname, final String serverName) throws IOException;
/**
@@ -857,8 +863,11 @@ public interface Admin extends Abortable, Closeable {
* @param serverName Deprecated. Not used.
* @return Deprecated. Returns true always.
* @throws IOException if a remote or network exception occurs
- * @deprecated Since 2.0. Will be removed in 3.0. Use {@link #unassign(byte[], boolean)} instead.
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18231">HBASE-18231</a>).
+ * Use {@link #unassign(byte[], boolean)}.
*/
+ @Deprecated
boolean closeRegionWithEncodedRegionName(final String encodedRegionName, final String serverName)
throws IOException;
@@ -866,8 +875,11 @@ public interface Admin extends Abortable, Closeable {
* Used {@link #unassign(byte[], boolean)} to unassign the region. For expert-admins.
*
* @param sn Deprecated. Not used.
- * @deprecated Since 2.0. Will be removed in 3.0. Use {@link #unassign(byte[], boolean)} instead.
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18231">HBASE-18231</a>).
+ * Use {@link #unassign(byte[], boolean)}.
*/
+ @Deprecated
void closeRegion(final ServerName sn, final HRegionInfo hri) throws IOException;
/**
@@ -1175,9 +1187,11 @@ public interface Admin extends Abortable, Closeable {
*
* @param regionName region to split
* @throws IOException if a remote or network exception occurs
- * @deprecated Since 2.0. Will be removed in 3.0. Use
- * {@link #splitRegionAsync(byte[], byte[])} instead.
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18229">HBASE-18229</a>).
+ * Use {@link #splitRegionAsync(byte[], byte[])}.
*/
+ @Deprecated
void splitRegion(final byte[] regionName) throws IOException;
/**
@@ -1196,9 +1210,11 @@ public interface Admin extends Abortable, Closeable {
* @param regionName region to split
* @param splitPoint the explicit position to split on
* @throws IOException if a remote or network exception occurs
- * @deprecated Since 2.0. Will be removed in 3.0. Use
- * {@link #splitRegionAsync(byte[], byte[])} instead.
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18229">HBASE-18229</a>).
+ * Use {@link #splitRegionAsync(byte[], byte[])}.
*/
+ @Deprecated
void splitRegion(final byte[] regionName, final byte[] splitPoint)
throws IOException;
http://git-wip-us.apache.org/repos/asf/hbase/blob/70c4f78c/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
----------------------------------------------------------------------
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 f2f2bf1..4b33812 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
@@ -296,8 +296,11 @@ public interface AsyncAdmin {
* @param regionName region name to close
* @param serverName Deprecated. Not used anymore after deprecation.
* @return Deprecated. Always returns true now.
- * @deprecated Since 2.0. Will be removed in 3.0. Use {@link #unassign(byte[], boolean)} instead.
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-18231">HBASE-18231</a>).
+ * Use {@link #unassign(byte[], boolean)}.
*/
+ @Deprecated
CompletableFuture<Boolean> closeRegion(byte[] regionName, Optional<ServerName> serverName);
/**
http://git-wip-us.apache.org/repos/asf/hbase/blob/70c4f78c/hbase-client/src/main/java/org/apache/hadoop/hbase/client/metrics/ServerSideScanMetrics.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/metrics/ServerSideScanMetrics.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/metrics/ServerSideScanMetrics.java
index 2f73a0e..33d1278 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/metrics/ServerSideScanMetrics.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/metrics/ServerSideScanMetrics.java
@@ -49,9 +49,20 @@ public class ServerSideScanMetrics {
public static final String COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME = "ROWS_SCANNED";
public static final String COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME = "ROWS_FILTERED";
- /** @deprecated Use {@link #COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME} instead */
+ /**
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-17886">HBASE-17886</a>).
+ * Use {@link #COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME}.
+ */
+ @Deprecated
public static final String COUNT_OF_ROWS_SCANNED_KEY = COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME;
- /** @deprecated Use {@link #COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME} instead */
+
+ /**
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-17886">HBASE-17886</a>).
+ * Use {@link #COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME}.
+ */
+ @Deprecated
public static final String COUNT_OF_ROWS_FILTERED_KEY = COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME;
/**
http://git-wip-us.apache.org/repos/asf/hbase/blob/70c4f78c/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
----------------------------------------------------------------------
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 da78a09..4f997c2 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
@@ -1437,8 +1437,11 @@ public interface RegionObserver extends Coprocessor {
* @param stagingFamilyPaths pairs of { CF, HFile path } submitted for bulk load
* @param hasLoaded whether the bulkLoad was successful
* @return the new value of hasLoaded
- * @deprecated Use {@link #postBulkLoadHFile(ObserverContext, List, Map, boolean)}
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-17123">HBASE-17123</a>).
+ * Use {@link #postBulkLoadHFile(ObserverContext, List, Map, boolean)}.
*/
+ @Deprecated
default boolean postBulkLoadHFile(final ObserverContext<RegionCoprocessorEnvironment> ctx,
List<Pair<byte[], String>> stagingFamilyPaths, boolean hasLoaded) throws IOException {
return hasLoaded;