gvprathyusha6 commented on code in PR #8248:
URL: https://github.com/apache/hbase/pull/8248#discussion_r3297310355


##########
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java:
##########
@@ -616,6 +616,9 @@ public static void setInput(Configuration conf, String 
snapshotName, Path restor
 
     restoreDir = new Path(restoreDir, UUID.randomUUID().toString());
 
+    // Guard: ensure restoreDir is not under production data directory 
(HBASE-29435)
+    MapReduceArchiveGuard.validateNotProductionDataPath(rootDir, restoreDir);
+
     RestoreSnapshotHelper.copySnapshotForScanner(conf, fs, rootDir, 
restoreDir, snapshotName);

Review Comment:
   Right, these are the APIs that are being used across mapreduce module and 
server module (for the Snapshot procedure code), lets separate these as part of 
this change
   



-- 
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]

Reply via email to