virajjasani commented on a change in pull request #348: HBASE-22643 : Delete
region without archiving only if regiondir is pr…
URL: https://github.com/apache/hbase/pull/348#discussion_r302562653
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java
##########
@@ -120,7 +120,9 @@ public static boolean archiveRegion(FileSystem fs, Path
rootdir, Path tableDir,
if (tableDir == null || regionDir == null) {
LOG.error("No archive directory could be found because tabledir (" +
tableDir
+ ") or regiondir (" + regionDir + "was null. Deleting files
instead.");
- deleteRegionWithoutArchiving(fs, regionDir);
+ if (regionDir != null) {
+ deleteRegionWithoutArchiving(fs, regionDir);
Review comment:
I came across this error while modifying existing test cases, but haven’t
come across in real life. So it’s of type: "better safe than sorry"
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services