You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/05/27 18:16:06 UTC

[GitHub] [accumulo] Manno15 commented on a change in pull request #2118: PopulateMetadataTable Improvements

Manno15 commented on a change in pull request #2118:
URL: https://github.com/apache/accumulo/pull/2118#discussion_r640862589



##########
File path: server/manager/src/main/java/org/apache/accumulo/manager/tableOps/tableImport/PopulateMetadataTable.java
##########
@@ -91,15 +91,11 @@ static void readMappingFile(VolumeManager fs, ImportedTableInfo tableInfo, Strin
 
     Path path = new Path(tableInfo.exportFile);
 
-    BatchWriter mbw = null;
-    ZipInputStream zis = null;
-
-    try {
-      VolumeManager fs = manager.getVolumeManager();
-
-      mbw = manager.getContext().createBatchWriter(MetadataTable.NAME, new BatchWriterConfig());
-
-      zis = new ZipInputStream(fs.open(path));
+    try (
+        BatchWriter mbw =
+            manager.getContext().createBatchWriter(MetadataTable.NAME, new BatchWriterConfig());
+        VolumeManager fs = manager.getVolumeManager();

Review comment:
       Possible. How much have you looked into it? I noticed in the test `SortedLogRecoveryTest`, it has the VolumeManager creation in a try with resources block but that is only using the local fs for testing purposes. I do not see anywhere else in the code where that is done, however. 




-- 
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:
users@infra.apache.org