saintstack commented on a change in pull request #2445:
URL: https://github.com/apache/hbase/pull/2445#discussion_r503642848



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfoBuilder.java
##########
@@ -33,6 +33,25 @@
   public static final RegionInfo UNDEFINED =
     RegionInfoBuilder.newBuilder(TableName.valueOf("__UNDEFINED__")).build();
 
+  /**
+   * RegionInfo for first root region
+   * You cannot use this builder to make an instance of the {@link 
#ROOT_REGIONINFO}.
+   * Just refer to this instance. Also, while the instance is actually a 
MutableRI, its type is
+   * just RI so the mutable methods are not available (unless you go casting); 
it appears
+   * as immutable (I tried adding Immutable type but it just makes a mess).

Review comment:
       Good

##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfoBuilder.java
##########
@@ -33,6 +33,25 @@
   public static final RegionInfo UNDEFINED =
     RegionInfoBuilder.newBuilder(TableName.valueOf("__UNDEFINED__")).build();
 
+  /**
+   * RegionInfo for first root region

Review comment:
       first? Only?

##########
File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
##########
@@ -300,8 +300,12 @@ public static CellComparator getCellComparator(TableName 
tableName) {
    * @return CellComparator to use going off the {@code tableName} passed.
    */
   public static CellComparator getCellComparator(byte [] tableName) {
-    // FYI, TableName.toBytes does not create an array; just returns existing 
array pointer.
-    return Bytes.equals(tableName, TableName.META_TABLE_NAME.toBytes())?
-      MetaCellComparator.META_COMPARATOR: CellComparatorImpl.COMPARATOR;
+    if (Bytes.equals(tableName, TableName.ROOT_TABLE_NAME.toBytes())) {
+      return RootCellComparator.ROOT_COMPARATOR;
+    }
+    if (Bytes.equals(tableName, TableName.META_TABLE_NAME.toBytes())) {
+      return MetaCellComparator.META_COMPARATOR;
+    }
+    return CellComparatorImpl.COMPARATOR;

Review comment:
       Can't this call the Interface version?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
##########
@@ -2531,6 +2531,7 @@ public GetTableStateResponse 
setTableStateInMeta(RpcController controller,
    *
    * @return previous states of the regions
    */
+  //TODO francis support root here

Review comment:
       Whats this?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -152,9 +159,19 @@
   private static final int DEFAULT_RIT_STUCK_WARNING_THRESHOLD = 60 * 1000;
   public static final String UNEXPECTED_STATE_REGION = "Unexpected state for ";
 
-  private final ProcedureEvent<?> metaAssignEvent = new ProcedureEvent<>("meta 
assign");
+  private final ProcedureEvent<?> rootAssignEvent = new ProcedureEvent<>("root 
assign");
+  private final ProcedureEvent<?> rootLoadEvent = new ProcedureEvent<>("root 
load");
+
   private final ProcedureEvent<?> metaLoadEvent = new ProcedureEvent<>("meta 
load");
 
+  private final ConcurrentSkipListMap<byte[], ProcedureEvent<?>> 
metaAssignEventMap =

Review comment:
       Whats this about?

##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java
##########
@@ -250,6 +260,7 @@
     DEFAULT_VALUES.put(PRIORITY, String.valueOf(DEFAULT_PRIORITY));
     DEFAULT_VALUES.keySet().stream()
             .map(s -> new 
Bytes(Bytes.toBytes(s))).forEach(RESERVED_KEYWORDS::add);
+    RESERVED_KEYWORDS.add(IS_ROOT_KEY);
     RESERVED_KEYWORDS.add(IS_META_KEY);

Review comment:
       ouch. who did this.
   
   Ok. I suppose ROOT needs to follow form.

##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfoBuilder.java
##########
@@ -33,6 +33,25 @@
   public static final RegionInfo UNDEFINED =
     RegionInfoBuilder.newBuilder(TableName.valueOf("__UNDEFINED__")).build();
 
+  /**
+   * RegionInfo for first root region
+   * You cannot use this builder to make an instance of the {@link 
#ROOT_REGIONINFO}.
+   * Just refer to this instance. Also, while the instance is actually a 
MutableRI, its type is
+   * just RI so the mutable methods are not available (unless you go casting); 
it appears
+   * as immutable (I tried adding Immutable type but it just makes a mess).
+   *
+   * We are using the non-legacy encoding format to reduce the boilerplace code

Review comment:
       Whats this?

##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java
##########
@@ -124,6 +124,16 @@
   @InterfaceAudience.Private
   public static final String FLUSH_POLICY = "FLUSH_POLICY";
   private static final Bytes FLUSH_POLICY_KEY = new 
Bytes(Bytes.toBytes(FLUSH_POLICY));
+
+  /**
+   * Used by rest interface to access this metadata attribute
+   * which denotes if it is a catalog table, either <code> hbase:meta </code>.
+   */
+  @InterfaceAudience.Private
+  public static final String IS_ROOT = "IS_ROOT";

Review comment:
       s/IS_ROOT/ROOT/?

##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java
##########
@@ -124,6 +124,16 @@
   @InterfaceAudience.Private
   public static final String FLUSH_POLICY = "FLUSH_POLICY";
   private static final Bytes FLUSH_POLICY_KEY = new 
Bytes(Bytes.toBytes(FLUSH_POLICY));
+
+  /**
+   * Used by rest interface to access this metadata attribute
+   * which denotes if it is a catalog table, either <code> hbase:meta </code>.
+   */
+  @InterfaceAudience.Private
+  public static final String IS_ROOT = "IS_ROOT";
+  private static final Bytes IS_ROOT_KEY

Review comment:
       s/IS_ROOT_KEY/ROOT_KEY/

##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfoBuilder.java
##########
@@ -33,6 +33,25 @@
   public static final RegionInfo UNDEFINED =
     RegionInfoBuilder.newBuilder(TableName.valueOf("__UNDEFINED__")).build();
 
+  /**
+   * RegionInfo for first root region
+   * You cannot use this builder to make an instance of the {@link 
#ROOT_REGIONINFO}.
+   * Just refer to this instance. Also, while the instance is actually a 
MutableRI, its type is
+   * just RI so the mutable methods are not available (unless you go casting); 
it appears
+   * as immutable (I tried adding Immutable type but it just makes a mess).
+   *
+   * We are using the non-legacy encoding format to reduce the boilerplace code
+   */
+  public static final RegionInfo ROOT_REGIONINFO =
+    new MutableRegionInfo(TableName.ROOT_TABLE_NAME,
+      HConstants.EMPTY_START_ROW,
+      HConstants.EMPTY_END_ROW,
+      false,
+      0,
+      RegionInfo.DEFAULT_REPLICA_ID,
+      false);

Review comment:
       Is this schema immutable? What if I want to change it? To up the read 
repicas or to add a bloom or an encoding?

##########
File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparator.java
##########
@@ -158,4 +174,14 @@ default int compareRows(ByteBuffer row, Cell cell) {
    *   Do not pollute with types other than BBKV if can be helped; the 
Comparator will slow.
    */
   Comparator getSimpleComparator();
+
+  static CellComparator getComparator(TableName tableName) {
+    if (tableName.equals(TableName.ROOT_TABLE_NAME)) {
+      return RootCellComparator.ROOT_COMPARATOR;
+    }
+    if (tableName.equals(TableName.META_TABLE_NAME)) {
+      return MetaCellComparator.META_COMPARATOR;
+    }
+    return CellComparatorImpl.COMPARATOR;

Review comment:
       This makes sense here. You can't use it from async client above? You 
have to repro it?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -511,6 +654,39 @@ public boolean isMetaLoaded() {
     return metaLoadEvent.isReady();
   }
 
+
+  /**
+   * @return True if region is online and scannable else false if an error or 
shutdown (Otherwise
+   *   we just block in here holding up all forward-progess).

Review comment:
       Radical

##########
File path: 
hbase-common/src/test/java/org/apache/hadoop/hbase/TestCellComparator.java
##########
@@ -205,6 +243,37 @@ public void testMetaComparisons2() {
             Bytes.toBytes(TableName.META_TABLE_NAME.getNameAsString()+",,1"), 
now))) > 0);
   }
 
+  @Test
+  public void testRootComparisons2() {

Review comment:
       There used to be a million tests for the Root comparator... there were 
all kinds of interesting corner cases. Need to steal them and bring them back?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
##########
@@ -124,7 +124,7 @@
 import org.apache.hadoop.hbase.master.procedure.DeleteTableProcedure;
 import org.apache.hadoop.hbase.master.procedure.DisableTableProcedure;
 import org.apache.hadoop.hbase.master.procedure.EnableTableProcedure;
-import org.apache.hadoop.hbase.master.procedure.InitMetaProcedure;
+import org.apache.hadoop.hbase.master.procedure.InitRootProcedure;

Review comment:
       FYI, the InitMetaProcedure just removed from master and branch-2.

##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
##########
@@ -110,6 +111,15 @@
   @Deprecated
   public static final KVComparator META_COMPARATOR = new MetaComparator();
 
+  /**
+   * A {@link KVComparator} for <code>hbase:root</code> catalog table
+   * {@link KeyValue}s.
+   * @deprecated Use {@link RootCellComparator#ROOT_COMPARATOR} instead.
+   * Deprecated for hbase 2.0, remove for hbase 3.0.
+   */
+  @Deprecated
+  public static final KVComparator ROOT_COMPARATOR = new RootComparator();

Review comment:
       Can it be a CellComparator? Does it have to be KVComparator?

##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
##########
@@ -1604,6 +1614,79 @@ public static int getDelimiterInReverse(final byte [] b, 
final int offset,
     return result;
   }
 
+  /**
+   * A {@link KVComparator} for <code>-ROOT-</code> catalog table
+   * {@link KeyValue}s.
+   * @deprecated : {@link RootCellComparator#ROOT_COMPARATOR} to be used.
+   * Deprecated for hbase 2.0, remove for hbase 3.0.

Review comment:
       Why this add and deprecate?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -1440,10 +1625,42 @@ private void 
handleRegionOverStuckWarningThreshold(final RegionInfo regionInfo)
   // 
============================================================================================
   //  TODO: Master load/bootstrap
   // 
============================================================================================
-  public void joinCluster() throws IOException {
+  public void joinCluster(boolean loadRoot) throws IOException {
+    joinCluster(loadRoot, true, true);
+  }
+
+  @VisibleForTesting
+  public void joinCluster(boolean loadRoot, boolean shouldWaitForRootOnline,
+    boolean shouldWaitForMetaOnline)
+    throws IOException {
     long startTime = System.nanoTime();
     LOG.debug("Joining cluster...");
 
+    // FIRST Catalog tables READ!!!!
+    // The below cannot make progress w/o hbase:meta being online.

Review comment:
       This talks of hbase:meta but below is hbase;root

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterCatalogBootstrap.java
##########
@@ -61,23 +68,56 @@ void assignMetaReplicas()
       throw new IllegalStateException("hbase:meta must be initialized first 
before we can " +
           "assign out its replicas");
     }
-    ServerName metaServername = 
MetaTableLocator.getMetaRegionLocation(this.master.getZooKeeper());
+    ServerName rootServername = 
RootTableLocator.getRootRegionLocation(this.master.getZooKeeper());
     for (int i = 1; i < numReplicas; i++) {
-      // Get current meta state for replica from zk.
-      RegionState metaState = 
MetaTableLocator.getMetaRegionState(master.getZooKeeper(), i);
+      // Get current hbase:root state for replica from zk.
+      RegionState rootState = 
RootTableLocator.getRootRegionState(master.getZooKeeper(), i);
       RegionInfo hri = RegionReplicaUtil.getRegionInfoForReplica(
-          RegionInfoBuilder.FIRST_META_REGIONINFO, i);
-      LOG.debug(hri.getRegionNameAsString() + " replica region state from 
zookeeper=" + metaState);
-      if (metaServername.equals(metaState.getServerName())) {
-        metaState = null;
+          RegionInfoBuilder.ROOT_REGIONINFO, i);

Review comment:
       Or rather I think this just removed in master.

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -430,11 +553,19 @@ private boolean isCarryingRegion(final ServerName 
serverName, final RegionInfo r
     return(node != null && serverName.equals(node.getRegionLocation()));
   }
 
-  private RegionInfo getMetaForRegion(final RegionInfo regionInfo) {
-    //if (regionInfo.isMetaRegion()) return regionInfo;
-    // TODO: handle multiple meta. if the region provided is not meta lookup
-    // which meta the region belongs to.
-    return RegionInfoBuilder.FIRST_META_REGIONINFO;
+  /**
+   * Check hbase:meta is up and ready for reading. For use during Master 
startup only.
+   * @return True if meta is UP and online and startup can progress. 
Otherwise, meta is not online
+   *   and we will hold here until operator intervention.
+   */
+  @VisibleForTesting
+  public boolean waitForMetaOnline() {

Review comment:
       So only if all meta regions are up? What if 10k meta regions? We wait 
till all up? Can fix in follow-on?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -400,28 +419,132 @@ public boolean isTableDisabled(final TableName 
tableName) {
   }
 
   // 
============================================================================================
-  //  META Helpers
+  //  ROOT Helpers
   // 
============================================================================================
-  private boolean isMetaRegion(final RegionInfo regionInfo) {
-    return regionInfo.isMetaRegion();
+  private boolean isRootRegion(final RegionInfo regionInfo) {
+    return regionInfo.isRootRegion();
   }
 
-  public boolean isMetaRegion(final byte[] regionName) {
-    return getMetaRegionFromName(regionName) != null;
+  public boolean isCarryingRoot(final ServerName serverName) {
+    // TODO: handle multiple root
+    return isCarryingRegion(serverName, RegionInfoBuilder.ROOT_REGIONINFO);
   }
 
-  public RegionInfo getMetaRegionFromName(final byte[] regionName) {
-    for (RegionInfo hri: getMetaRegionSet()) {
-      if (Bytes.equals(hri.getRegionName(), regionName)) {
-        return hri;
-      }
+  private RegionInfo getRootForRegion(final RegionInfo regionInfo) {
+    //if (regionInfo.isRootRegion()) return regionInfo;
+    // TODO: handle multiple root. if the region provided is not root lookup
+    // which root the region belongs to.
+    return RegionInfoBuilder.ROOT_REGIONINFO;
+  }
+
+  /**
+   * Check hbase:root is up and ready for reading. For use during Master 
startup only.
+   * @return True if root is UP and online and startup can progress. 
Otherwise, root is not online
+   *   and we will hold here until operator intervention.
+   */
+  public boolean waitForRootOnline() {
+    return isRegionOnline(RegionInfoBuilder.ROOT_REGIONINFO);
+  }
+
+  private static final Set<RegionInfo> ROOT_REGION_SET =
+    Collections.singleton(RegionInfoBuilder.ROOT_REGIONINFO);
+  public Set<RegionInfo> getRootRegionSet() {
+    return ROOT_REGION_SET;
+  }
+
+  // 
============================================================================================
+  //  ROOT Event(s) helpers
+  // 
============================================================================================
+  /**
+   * Notice that, this only means the root region is available on a RS, but 
the AM may still be
+   * loading the region states from root, so usually you need to check {@link 
#isRootLoaded()} first
+   * before checking this method, unless you can make sure that your piece of 
code can only be
+   * executed after AM builds the region states.
+   * @see #isRootLoaded()
+   */
+  public boolean isRootAssigned() {
+    return rootAssignEvent.isReady();
+  }
+
+  public boolean isRootRegionInTransition() {
+    return !isRootAssigned();
+  }
+
+  /**
+   * Notice that this event does not mean the AM has already finished region 
state rebuilding. See
+   * the comment of {@link #isRootAssigned()} for more details.
+   * @see #isRootAssigned()
+   */
+  public boolean waitRootAssigned(Procedure<?> proc, RegionInfo regionInfo) {
+    return 
getRootAssignEvent(getRootForRegion(regionInfo)).suspendIfNotReady(proc);
+  }
+
+  private void setRootAssigned(RegionInfo rootRegionInfo, boolean assigned) {
+    assert isRootRegion(rootRegionInfo) : "unexpected non-root region " + 
rootRegionInfo;
+    if (!RegionReplicaUtil.isDefaultReplica(rootRegionInfo)) {
+      return;
     }
-    return null;
+    ProcedureEvent<?> rootAssignEvent = getRootAssignEvent(rootRegionInfo);
+    if (assigned) {
+      LOG.debug("Setting hbase:root region assigned: "+rootRegionInfo);
+      rootAssignEvent.wake(getProcedureScheduler());
+    } else {
+      LOG.debug("Setting hbase:root region unassigned: "+rootRegionInfo);
+      rootAssignEvent.suspend();
+    }
+  }
+
+  private ProcedureEvent<?> getRootAssignEvent(RegionInfo rootRegionInfo) {
+    assert isRootRegion(rootRegionInfo) : "unexpected non-catalog region " + 
rootRegionInfo;
+    // TODO: handle multiple root.

Review comment:
       Only one root or do you mean replicas? The old stuff did async assign of 
replicas waiting on primary only FYI

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
##########
@@ -2531,6 +2531,7 @@ public GetTableStateResponse 
setTableStateInMeta(RpcController controller,
    *
    * @return previous states of the regions
    */
+  //TODO francis support root here

Review comment:
       Needs finishing?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -1926,6 +2225,27 @@ public void markRegionAsMerged(final RegionInfo child, 
final ServerName serverNa
     }
     TableDescriptor td = master.getTableDescriptors().get(child.getTable());
     regionStateStore.mergeRegions(child, mergeParents, serverName, td);
+
+    //Split meta assignment event
+    if (td.isMetaTable()) {
+      ProcedureEvent<?> parentEvent[] = new 
ProcedureEvent[mergeParents.length];
+      for (int i=0; i<parentEvent.length; i++) {
+        parentEvent[i] = metaAssignEventMap.get(mergeParents[i].getStartKey());
+      }
+
+      metaAssignEventMap.put(child.getStartKey(),
+        new ProcedureEvent<>("meta assign: " + child.getRegionNameAsString()));
+
+      //wake the procedures waiting on parent event, the procedures will awaken
+      //and wait on newly created child event
+      for (int i= mergeParents.length-1; i>=1; i--) {
+        metaAssignEventMap.remove(mergeParents[i].getStartKey());
+        parentEvent[i].wake(getProcedureScheduler());
+      }
+      //for the first key we don't remove since we already replaced it
+      parentEvent[0].wake(getProcedureScheduler());
+    }
+
     if (shouldAssignFavoredNodes(child)) {
       getFavoredNodePromoter().generateFavoredNodesForMergedRegion(child, 
mergeParents);
     }

Review comment:
       Concerned about blocking on Region transitions.

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
##########
@@ -2986,6 +2988,7 @@ public GetMastersResponse getMasters(RpcController 
rpcController, GetMastersRequ
     return resp.build();
   }
 
+  //TODO francis this needs to be get RootLocation now?
   @Override
   public GetMetaRegionLocationsResponse getMetaRegionLocations(RpcController 
rpcController,

Review comment:
       You've seen the ConnectionRegistry stuff?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -768,6 +944,15 @@ public void move(RegionInfo regionInfo) throws IOException 
{
 
   @VisibleForTesting
   static int compare(TransitRegionStateProcedure left, 
TransitRegionStateProcedure right) {
+    //TODO francis this is broken once we have more meta entries

Review comment:
       Does this patch include support for split meta?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ServerCrashProcedure.java
##########
@@ -257,46 +327,62 @@ private void cleanupSplitDir(MasterProcedureEnv env) {
         // old hbase:meta tenancy on this server; clean these up if any before 
trying to remove the
         // WAL directory of this server or we will fail. See archiveMetaLog 
comment for more details
         // on this condition.
-        
env.getMasterServices().getMasterWalManager().archiveMetaLog(this.serverName);
+        
env.getMasterServices().getMasterWalManager().archiveCatalogLog(this.serverName,
 false);
       }
       splitWALManager.deleteWALDir(serverName);
     } catch (IOException e) {
       LOG.warn("Remove WAL directory for {} failed, ignore...{}", serverName, 
e.getMessage());
     }
   }
 
-  private boolean isSplittingDone(MasterProcedureEnv env, boolean splitMeta) {
+  private boolean isSplittingDone(MasterProcedureEnv env, 
SplitWALManager.SplitType splitType) {
     SplitWALManager splitWALManager = 
env.getMasterServices().getSplitWALManager();
     try {
-      int wals = splitWALManager.getWALsToSplit(serverName, splitMeta).size();
-      LOG.debug("Check if {} WAL splitting is done? wals={}, meta={}", 
serverName, wals, splitMeta);
+      int wals = splitWALManager.getWALsToSplit(serverName, splitType).size();
+      LOG.debug("Check if {} WAL splitting is done? wals={}, SplitType={}",
+        serverName, wals, splitType);
       return wals == 0;
     } catch (IOException e) {
       LOG.warn("Get WALs of {} failed, retry...", serverName, e);
       return false;
     }
   }
 
-  private Procedure[] createSplittingWalProcedures(MasterProcedureEnv env, 
boolean splitMeta)
+  private Procedure[] createSplittingWalProcedures(MasterProcedureEnv env,
+    SplitWALManager.SplitType splitType)
       throws IOException {
-    LOG.info("Splitting WALs {}, isMeta: {}", this, splitMeta);
+    LOG.info("Splitting WALs {}, SplitType: {}", this, splitType);
     SplitWALManager splitWALManager = 
env.getMasterServices().getSplitWALManager();
-    List<Procedure> procedures = splitWALManager.splitWALs(serverName, 
splitMeta);
+    List<Procedure> procedures = splitWALManager.splitWALs(serverName, 
splitType);
     return procedures.toArray(new Procedure[procedures.size()]);
   }
 
   private boolean filterDefaultMetaRegions() {
     if (regionsOnCrashedServer == null) {
       return false;
     }
-    regionsOnCrashedServer.removeIf(this::isDefaultMetaRegion);
+    regionsOnCrashedServer.removeIf((x) -> isDefaultMetaRegion(x) || 
isDefaultRootRegion(x));
     return !regionsOnCrashedServer.isEmpty();
   }
 
+  private boolean isDefaultRootRegion(RegionInfo hri) {
+    return hri.isRootRegion() && RegionReplicaUtil.isDefaultReplica(hri);
+  }
+
   private boolean isDefaultMetaRegion(RegionInfo hri) {
     return hri.isMetaRegion() && RegionReplicaUtil.isDefaultReplica(hri);
   }
 
+  private void zkCoordinatedSplitRootLogs(MasterProcedureEnv env) throws 
IOException {
+    LOG.debug("Splitting root WALs {}", this);
+    MasterWalManager mwm = env.getMasterServices().getMasterWalManager();
+    AssignmentManager am = env.getMasterServices().getAssignmentManager();
+    am.getRegionStates().rootLogSplitting(serverName);
+    mwm.splitRootLog(serverName);
+    am.getRegionStates().rootLogSplit(serverName);
+    LOG.debug("Done splitting root WALs {}", this);
+  }

Review comment:
       The zk coordinated splitter is deprecated in favor of a procedure-based 
one (was enabled about a month or more ago)




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