accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] milleruntime commented on a change in pull request #890: Organize new Bulk Import code
Date Thu, 10 Jan 2019 23:27:18 GMT
milleruntime commented on a change in pull request #890: Organize new Bulk Import code
URL: https://github.com/apache/accumulo/pull/890#discussion_r246958748
 
 

 ##########
 File path: server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer2/LoadFiles.java
 ##########
 @@ -328,38 +333,45 @@ private long loadFiles(Table.ID tableId, Path bulkDir, LoadMappingIterator
lmi,
     loader.start(bulkDir, master, tid, bulkInfo.setTime);
 
     long t1 = System.currentTimeMillis();
-    while (true) {
-      if (loadMapEntry == null) {
-        if (!lmi.hasNext()) {
-          break;
-        }
-        loadMapEntry = lmi.next();
-      }
-      KeyExtent fke = loadMapEntry.getKey();
-      Files files = loadMapEntry.getValue();
-      loadMapEntry = null;
-
+    while (loadMapEntry != null) {
+      KeyExtent fileTablet = loadMapEntry.getKey();
       tablets.clear();
 
-      while (!Objects.equals(currentTablet.getPrevEndRow(), fke.getPrevEndRow())) {
-        currentTablet = tabletIter.next();
-      }
+      // get first tablet in range
+      currentTablet = getFirstTablet(tabletIter, currentTablet, fileTablet.getPrevEndRow());
       tablets.add(currentTablet);
 
-      while (!Objects.equals(currentTablet.getEndRow(), fke.getEndRow())) {
-        currentTablet = tabletIter.next();
-        tablets.add(currentTablet);
-      }
+      // get all tablets between currentTablet and EndRow given in mapping file
 
 Review comment:
   > The method names do not give me any concrete idea what the method will do with the
parameters.
   
   Perhaps different names to give a better idea of what is going on?  Something like "iterateToFirstTablet"
 or "findFirstTablet".  

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Mime
View raw message