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/02/12 11:15:58 UTC

[GitHub] [accumulo] milleruntime commented on a change in pull request #1923: Update ServerBulkImportStatus for new Bulk import. Closes #1510

milleruntime commented on a change in pull request #1923:
URL: https://github.com/apache/accumulo/pull/1923#discussion_r575152207



##########
File path: server/base/src/main/java/org/apache/accumulo/server/util/ServerBulkImportStatus.java
##########
@@ -37,12 +39,22 @@
 
   public void updateBulkImportStatus(List<String> files, BulkImportState state) {
     for (String file : files) {
-      BulkImportStatus initial = new BulkImportStatus(System.currentTimeMillis(), file, state);
-      status.putIfAbsent(file, initial);
-      initial = status.get(file);
-      if (initial != null) {
-        initial.state = state;
-      }
+      updateFile(file, state);
+    }
+  }
+
+  private void updateFile(String file, BulkImportState state) {
+    BulkImportStatus initial = new BulkImportStatus(System.currentTimeMillis(), file, state);
+    status.putIfAbsent(file, initial);
+    initial = status.get(file);
+    if (initial != null) {
+      initial.state = state;
+    }
+  }

Review comment:
       I figured there was a way but couldn't find the `compute` method. Nice!




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