Apache9 commented on code in PR #8340:
URL: https://github.com/apache/hbase/pull/8340#discussion_r3401960239
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java:
##########
@@ -628,6 +628,9 @@ public static List<SnapshotDescription>
getSnapshotList(final Configuration conf
Path rootDir = CommonFSUtils.getRootDir(conf);
FileSystem fs = FileSystem.get(rootDir.toUri(), conf);
Path snapshotDir = SnapshotDescriptionUtils.getSnapshotsDir(rootDir);
+ if (!fs.exists(snapshotDir)) {
+ return Collections.emptyList();
+ }
FileStatus[] snapshots = fs.listStatus(snapshotDir,
Review Comment:
Is it possible to test whether snapshots is null or empty, so we can save on
request to HDFS namenode?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]