DomGarguilo commented on code in PR #3228:
URL: https://github.com/apache/accumulo/pull/3228#discussion_r1235756930


##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/tableExport/WriteExportFiles.java:
##########
@@ -186,8 +191,36 @@ public static void exportTable(VolumeManager fs, 
ServerContext context, String t
       dataOut.close();
       dataOut = null;
 
-      createDistcpFile(fs, exportDir, exportMetaFilePath, uniqueFiles);
-
+      // make map containing a volume and corresponding files
+      final Map<Volume,Set<String>> volumeFileMap = new HashMap<>();
+      final Collection<Volume> configuredVolumes = fs.getVolumes();
+      configuredVolumes.forEach(vol -> {
+        final FileSystem dfs = vol.getFileSystem();
+        uniqueFiles.values().forEach(file -> {
+          Path p = null;
+          try {
+            p = dfs.resolvePath(new Path(file));
+          } catch (IOException e) {
+            throw new RuntimeException(e);
+          }
+          if (vol.containsPath(p)) {
+            if (volumeFileMap.get(vol) == null) {
+              volumeFileMap.put(vol, new HashSet<String>());
+            }
+            volumeFileMap.get(vol).add(file);

Review Comment:
   ```suggestion
               volumeFileMap.computeIfAbsent(vol, k -> new 
HashSet<>()).add(file);
   ```



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