HBASE-22064 Remove Admin.deleteSnapshot(byte[])
Signed-off-by: zhangduo <zhangduo@apache.org>
This commit is contained in:
parent
7e3ca7063c
commit
21cb00eef6
|
@ -1509,16 +1509,6 @@ public interface Admin extends Abortable, Closeable {
|
|||
List<SnapshotDescription> listTableSnapshots(Pattern tableNamePattern,
|
||||
Pattern snapshotNamePattern) throws IOException;
|
||||
|
||||
/**
|
||||
* Delete an existing snapshot.
|
||||
*
|
||||
* @param snapshotName name of the snapshot
|
||||
* @throws IOException if a remote or network exception occurs
|
||||
* @deprecated Since 2.2.0. Will be removed in 3.0.0. Use {@link #deleteSnapshot(String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
void deleteSnapshot(byte[] snapshotName) throws IOException;
|
||||
|
||||
/**
|
||||
* Delete an existing snapshot.
|
||||
*
|
||||
|
|
|
@ -2472,11 +2472,6 @@ public class HBaseAdmin implements Admin {
|
|||
return tableSnapshots;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSnapshot(final byte[] snapshotName) throws IOException {
|
||||
deleteSnapshot(Bytes.toString(snapshotName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSnapshot(final String snapshotName) throws IOException {
|
||||
// make sure the snapshot is possibly valid
|
||||
|
|
|
@ -216,7 +216,7 @@ public class TestSnapshotFromClient {
|
|||
|
||||
// take a snapshot of the disabled table
|
||||
final String SNAPSHOT_NAME = "offlineTableSnapshot";
|
||||
byte[] snapshot = Bytes.toBytes(SNAPSHOT_NAME);
|
||||
String snapshot = SNAPSHOT_NAME;
|
||||
|
||||
admin.snapshot(new SnapshotDescription(SNAPSHOT_NAME, TABLE_NAME,
|
||||
SnapshotType.DISABLED, null, -1, SnapshotManifestV1.DESCRIPTOR_VERSION));
|
||||
|
|
|
@ -306,7 +306,7 @@ public class TestSnapshotTemporaryDirectory {
|
|||
|
||||
// take a snapshot of the disabled table
|
||||
final String SNAPSHOT_NAME = "offlineTableSnapshot";
|
||||
byte[] snapshot = Bytes.toBytes(SNAPSHOT_NAME);
|
||||
String snapshot = SNAPSHOT_NAME;
|
||||
takeSnapshot(TABLE_NAME, SNAPSHOT_NAME, true);
|
||||
LOG.debug("Snapshot completed.");
|
||||
|
||||
|
@ -390,8 +390,8 @@ public class TestSnapshotTemporaryDirectory {
|
|||
LOG);
|
||||
|
||||
// take a snapshot of the disabled table
|
||||
byte[] snapshot = Bytes.toBytes("testOfflineTableSnapshotWithEmptyRegion");
|
||||
takeSnapshot(TABLE_NAME, Bytes.toString(snapshot), true);
|
||||
String snapshot = "testOfflineTableSnapshotWithEmptyRegion";
|
||||
takeSnapshot(TABLE_NAME, snapshot, true);
|
||||
LOG.debug("Snapshot completed.");
|
||||
|
||||
// make sure we have the snapshot
|
||||
|
|
|
@ -313,7 +313,7 @@ public class TestSnapshotFromMaster {
|
|||
|
||||
// take a snapshot of the table
|
||||
String snapshotName = "snapshot";
|
||||
byte[] snapshotNameBytes = Bytes.toBytes(snapshotName);
|
||||
String snapshotNameBytes = snapshotName;
|
||||
admin.snapshot(snapshotName, TABLE_NAME);
|
||||
|
||||
LOG.info("After snapshot File-System state");
|
||||
|
|
|
@ -186,7 +186,7 @@ public class TestFlushSnapshotFromClient {
|
|||
|
||||
// take a snapshot of the enabled table
|
||||
String snapshotString = "skipFlushTableSnapshot";
|
||||
byte[] snapshot = Bytes.toBytes(snapshotString);
|
||||
String snapshot = snapshotString;
|
||||
admin.snapshot(snapshotString, TABLE_NAME, SnapshotType.SKIPFLUSH);
|
||||
LOG.debug("Snapshot completed.");
|
||||
|
||||
|
|
|
@ -854,11 +854,6 @@ public class ThriftAdmin implements Admin {
|
|||
throw new NotImplementedException("listTableSnapshots not supported in ThriftAdmin");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSnapshot(byte[] snapshotName) {
|
||||
throw new NotImplementedException("deleteSnapshot not supported in ThriftAdmin");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSnapshot(String snapshotName) {
|
||||
throw new NotImplementedException("deleteSnapshot not supported in ThriftAdmin");
|
||||
|
|
Loading…
Reference in New Issue