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 75f75fcbc68..ad3ede5f572 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp @@ -36,14 +36,16 @@ 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 = snapshot.getTableName(); - tableExists = admin.tableExists(snapshotTable); - break; + if(snapshotName != null) { + try (Admin admin = master.getConnection().getAdmin()) { + for (SnapshotDescription snapshotDesc: admin.listSnapshots()) { + if (snapshotName.equals(snapshotDesc.getName())) { + snapshot = snapshotDesc; + stats = SnapshotInfo.getSnapshotStats(conf, snapshot); + snapshotTable = snapshot.getTableName(); + tableExists = admin.tableExists(snapshotTable); + break; + } } } } @@ -110,7 +112,7 @@
Go Back, or wait for the redirect.