jojochuang commented on code in PR #6874:
URL: https://github.com/apache/hbase/pull/6874#discussion_r2038377678


##########
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java:
##########
@@ -328,6 +333,13 @@ private void copyFile(final Context context, final 
SnapshotFileInfo inputInfo,
 
         // Ensure that the output folder is there and copy the file
         createOutputPath(outputPath.getParent());
+        String family = new Path(inputInfo.getHfile()).getParent().getName();
+        String familyStoragePolicy = generateFamilyStoragePolicyKey(family);
+        if 
(stringIsNotEmpty(context.getConfiguration().get(familyStoragePolicy))) {
+          String key = context.getConfiguration().get(familyStoragePolicy);
+          LOG.info("Setting storage policy {} for {}", key, 
outputPath.getParent());
+          outputFs.setStoragePolicy(outputPath.getParent(), key);

Review Comment:
   This is assumes the output path has storage policy support, is enabled, and 
that the storage policy in both input and output file system are compatible.



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