Skip to content

Commit 3867fae

Browse files
authored
HBASE-22829 Removed deprecated methods from SnapshotDescription
Signed-off-by: stack <stack@apache.org>
1 parent e938215 commit 3867fae

File tree

2 files changed

+2
-58
lines changed

2 files changed

+2
-58
lines changed

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

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -41,63 +41,18 @@ public SnapshotDescription(String name) {
4141
this(name, (TableName)null);
4242
}
4343

44-
/**
45-
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
46-
* instance instead.
47-
* @see #SnapshotDescription(String, TableName)
48-
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
49-
*/
50-
@Deprecated
51-
public SnapshotDescription(String name, String table) {
52-
this(name, TableName.valueOf(table));
53-
}
54-
5544
public SnapshotDescription(String name, TableName table) {
5645
this(name, table, SnapshotType.DISABLED, null, -1, -1, null);
5746
}
5847

59-
/**
60-
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
61-
* instance instead.
62-
* @see #SnapshotDescription(String, TableName, SnapshotType)
63-
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
64-
*/
65-
@Deprecated
66-
public SnapshotDescription(String name, String table, SnapshotType type) {
67-
this(name, TableName.valueOf(table), type);
68-
}
69-
7048
public SnapshotDescription(String name, TableName table, SnapshotType type) {
7149
this(name, table, type, null, -1, -1, null);
7250
}
7351

74-
/**
75-
* @see #SnapshotDescription(String, TableName, SnapshotType, String)
76-
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
77-
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
78-
* instance instead.
79-
*/
80-
@Deprecated
81-
public SnapshotDescription(String name, String table, SnapshotType type, String owner) {
82-
this(name, TableName.valueOf(table), type, owner);
83-
}
84-
8552
public SnapshotDescription(String name, TableName table, SnapshotType type, String owner) {
8653
this(name, table, type, owner, -1, -1, null);
8754
}
8855

89-
/**
90-
* @see #SnapshotDescription(String, TableName, SnapshotType, String, long, int, Map)
91-
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
92-
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version with the TableName
93-
* instance instead.
94-
*/
95-
@Deprecated
96-
public SnapshotDescription(String name, String table, SnapshotType type, String owner,
97-
long creationTime, int version) {
98-
this(name, TableName.valueOf(table), type, owner, creationTime, version, null);
99-
}
100-
10156
/**
10257
* SnapshotDescription Parameterized Constructor
10358
*
@@ -141,18 +96,6 @@ public String getName() {
14196
return this.name;
14297
}
14398

144-
/**
145-
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #getTableName()} or
146-
* {@link #getTableNameAsString()} instead.
147-
* @see #getTableName()
148-
* @see #getTableNameAsString()
149-
* @see <a href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
150-
*/
151-
@Deprecated
152-
public String getTable() {
153-
return getTableNameAsString();
154-
}
155-
15699
public String getTableNameAsString() {
157100
return this.table.getNameAsString();
158101
}

hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,8 @@ public void preCloneSnapshot(final ObserverContext<MasterCoprocessorEnvironment>
10891089
throws IOException {
10901090
User user = getActiveUser(ctx);
10911091
if (SnapshotDescriptionUtils.isSnapshotOwner(snapshot, user)
1092-
&& hTableDescriptor.getTableName().getNameAsString().equals(snapshot.getTable())) {
1092+
&& hTableDescriptor.getTableName().getNameAsString()
1093+
.equals(snapshot.getTableNameAsString())) {
10931094
// Snapshot owner is allowed to create a table with the same name as the snapshot he took
10941095
AuthResult result = AuthResult.allow("cloneSnapshot " + snapshot.getName(),
10951096
"Snapshot owner check allowed", user, null, hTableDescriptor.getTableName(), null);

0 commit comments

Comments
 (0)