ctubbsii commented on a change in pull request #1555: Fix idempotency bug in 
importtable
URL: https://github.com/apache/accumulo/pull/1555#discussion_r390072003
 
 

 ##########
 File path: 
server/master/src/main/java/org/apache/accumulo/master/tableOps/MoveExportedFiles.java
 ##########
 @@ -48,17 +49,22 @@
 
       Map<String,String> fileNameMappings = 
PopulateMetadataTable.readMappingFile(fs, tableInfo);
 
+      FileStatus[] exportedFiles = fs.listStatus(new 
Path(tableInfo.exportDir));
+      FileStatus[] importedFiles = fs.listStatus(new 
Path(tableInfo.importDir));
+
 
 Review comment:
   Guava Sets is definitely better over commons-collections CollectionUtils. We 
still use Guava in 2.x, so that should be fine. If you want a pure-Java way to 
do it, you could use Streams:
   
   ```java
   
Stream.concat(importing.stream(),imported.stream()).collect(Collectors.toSet()).equals(Set.of(fileNameMappings.values()));
   ```
   
   Guava's `Sets.union` is cleaner.

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

Reply via email to