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



##########
File path: 
server/manager/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
##########
@@ -871,7 +870,9 @@ private void 
flushChanges(SortedMap<TServerInstance,TabletServerStatus> currentT
 
     if (!assignments.isEmpty()) {
       Master.log.info(String.format("Assigning %d tablets", 
assignments.size()));
-      store.setFutureLocations(assignments);
+
+      for (Assignment assignment : assignments)
+        store.setFutureLocation(assignment);

Review comment:
       I am not too sure about the performance implications. I remember this 
part being one of the ones I struggled with trying to figure out how to apply 
my other changes too. Part of the original goal of making these changes to the 
state stores was to pass in a single assignment instead of a collection, along 
with applying ample to it. Some of the state stores already did this before 
these changes like in ZooTabletStateStore.setFutureLocation. Its possible the 
easiest and best solution is to add the collection<assignment> back and use: 
   ``` java
    if (assignments.size() != 1)
         throw new IllegalArgumentException("There is only one root tablet");
       Assignment assignment = assignments.iterator().next();
       if (assignment.tablet.compareTo(RootTable.EXTENT) != 0)
         throw new IllegalArgumentException("You can only store the root tablet 
`location");
   ```
   at the beginning of the various state store functions. 




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


Reply via email to