apurtell commented on a change in pull request #3826:
URL: https://github.com/apache/hbase/pull/3826#discussion_r745123322



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
##########
@@ -3343,6 +3346,55 @@ boolean waitUntilNoRegionsInTransition(final long 
timeout)
     return offlineServers;
   }
 
+  void deleteNonZkBasedQualifiersForZkBasedAssignment() throws IOException {
+    boolean isZKAssignmentInUse =
+      ConfigUtil.useZKForAssignment(server.getConfiguration()) && 
!server.getConfiguration()
+        .getBoolean("hbase.assignment.usezk.migrating", false);
+    if (isZKAssignmentInUse) {
+      List<Result> results = 
MetaTableAccessor.fullScanOfMeta(server.getConnection());
+      List<Delete> redundantCQDeletes = new ArrayList<>();
+      for (Result result : results) {
+        RegionLocations rl =  MetaTableAccessor.getRegionLocations(result);
+        if (rl == null) {
+          continue;

Review comment:
       I think you want the same log as what happens if locations comes back as 
null if you managed to get a rl object.
   
            LOG.error("No location found for " + result);

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
##########
@@ -3293,7 +3295,7 @@ boolean waitUntilNoRegionsInTransition(final long timeout)
         HRegionInfo regionInfo = hrl.getRegionInfo();
         if (regionInfo == null) continue;
         int replicaId = regionInfo.getReplicaId();
-        State state = RegionStateStore.getRegionState(result, replicaId);
+        State state = RegionStateStore.getRegionState(result, replicaId, 
server.getConfiguration());

Review comment:
       Can we just pass through useZk as a boolean instead of the whole 
configuration object? Not a big deal, but the former seems a bit 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to