You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ja...@apache.org on 2019/08/12 06:41:10 UTC

[hbase] branch master updated: HBASE-22829 Removed deprecated methods from SnapshotDescription

This is an automated email from the ASF dual-hosted git repository.

janh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 3867fae  HBASE-22829 Removed deprecated methods from SnapshotDescription
3867fae is described below

commit 3867fae04da0ab571e3c666484b8aecda63d7244
Author: Jan Hentschel <ja...@ultratendency.com>
AuthorDate: Mon Aug 12 08:41:05 2019 +0200

    HBASE-22829 Removed deprecated methods from SnapshotDescription
    
    Signed-off-by: stack <st...@apache.org>
---
 .../hadoop/hbase/client/SnapshotDescription.java   | 57 ----------------------
 .../hbase/security/access/AccessController.java    |  3 +-
 2 files changed, 2 insertions(+), 58 deletions(-)

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 4fa825e..872065b 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
@@ -41,64 +41,19 @@ public class SnapshotDescription {
     this(name, (TableName)null);
   }
 
-  /**
-   * @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
-  public SnapshotDescription(String name, String table) {
-    this(name, TableName.valueOf(table));
-  }
-
   public SnapshotDescription(String name, TableName table) {
     this(name, table, SnapshotType.DISABLED, null, -1, -1, null);
   }
 
-  /**
-   * @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
-  public SnapshotDescription(String name, String table, SnapshotType type) {
-    this(name, TableName.valueOf(table), type);
-  }
-
   public SnapshotDescription(String name, TableName table, SnapshotType type) {
     this(name, table, type, null, -1, -1, null);
   }
 
-  /**
-   * @see #SnapshotDescription(String, TableName, SnapshotType, String)
-   * @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
-   * @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
-   *   instance instead.
-   */
-  @Deprecated
-  public SnapshotDescription(String name, String table, SnapshotType type, String owner) {
-    this(name, TableName.valueOf(table), type, owner);
-  }
-
   public SnapshotDescription(String name, TableName table, SnapshotType type, String owner) {
     this(name, table, type, owner, -1, -1, null);
   }
 
   /**
-   * @see #SnapshotDescription(String, TableName, SnapshotType, String, long, int, Map)
-   * @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
-   * @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
-   *   instance instead.
-   */
-  @Deprecated
-  public SnapshotDescription(String name, String table, SnapshotType type, String owner,
-      long creationTime, int version) {
-    this(name, TableName.valueOf(table), type, owner, creationTime, version, null);
-  }
-
-  /**
    * SnapshotDescription Parameterized Constructor
    *
    * @param name          Name of the snapshot
@@ -141,18 +96,6 @@ public class SnapshotDescription {
     return this.name;
   }
 
-  /**
-   * @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
-  public String getTable() {
-    return getTableNameAsString();
-  }
-
   public String getTableNameAsString() {
     return this.table.getNameAsString();
   }
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 93e79c5..44363fa 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
@@ -1089,7 +1089,8 @@ public class AccessController implements MasterCoprocessor, RegionCoprocessor,
       throws IOException {
     User user = getActiveUser(ctx);
     if (SnapshotDescriptionUtils.isSnapshotOwner(snapshot, user)
-        && hTableDescriptor.getTableName().getNameAsString().equals(snapshot.getTable())) {
+        && hTableDescriptor.getTableName().getNameAsString()
+        .equals(snapshot.getTableNameAsString())) {
       // Snapshot owner is allowed to create a table with the same name as the snapshot he took
       AuthResult result = AuthResult.allow("cloneSnapshot " + snapshot.getName(),
         "Snapshot owner check allowed", user, null, hTableDescriptor.getTableName(), null);