diff --git a/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp b/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp index 50a7560..b18a63e 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp @@ -35,12 +35,14 @@ SnapshotDescription snapshot = null; SnapshotInfo.SnapshotStats stats = null; TableName snapshotTable = null; + boolean tableExists = false; try (Admin admin = master.getConnection().getAdmin()) { for (SnapshotDescription snapshotDesc: admin.listSnapshots()) { if (snapshotName.equals(snapshotDesc.getName())) { snapshot = snapshotDesc; stats = SnapshotInfo.getSnapshotStats(conf, snapshot); snapshotTable = TableName.valueOf(snapshot.getTable()); + tableExists = admin.tableExists(snapshotTable); break; } } @@ -103,32 +105,7 @@ -<% if (isActionResultPage) { %> -
-<% - try (Admin admin = master.getConnection().getAdmin()) { - if (action.equals("restore")) { - admin.restoreSnapshot(snapshotName); - %> Restore Snapshot request accepted. <% - } else if (action.equals("clone")) { - if (cloneName != null && cloneName.length() > 0) { - admin.cloneSnapshot(snapshotName, TableName.valueOf(cloneName)); - %> Clone from Snapshot request accepted. <% - } else { - %> Clone from Snapshot request failed, No table name specified. <% - } - } - } -%> -
Go Back, or wait for the redirect. -
-Actions: -
-
- -<% } %>