You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2022/04/30 02:53:19 UTC

[hbase] branch master updated: HBASE-26976 Update related comments after HMaster can load the live RS infos from local region (#4375)

This is an automated email from the ASF dual-hosted git repository.

liyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new b0c2832b6ec HBASE-26976 Update related comments after HMaster can load the live RS infos from local region (#4375)
b0c2832b6ec is described below

commit b0c2832b6ecdf7a72b219cbf81c2ef70a3097579
Author: LiangJun He <20...@163.com>
AuthorDate: Sat Apr 30 10:53:13 2022 +0800

    HBASE-26976 Update related comments after HMaster can load the live RS infos from local region (#4375)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
    Signed-off-by: Yu Li <li...@apache.org>
---
 .../src/main/java/org/apache/hadoop/hbase/master/HMaster.java  | 10 ++++------
 .../org/apache/hadoop/hbase/master/RegionServerTracker.java    |  2 +-
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 91e18a6f88f..b9fa3294b91 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -865,8 +865,8 @@ public class HMaster extends HBaseServerBase<MasterRpcServices> implements Maste
    * from meta region</li>
    * <li>Start region server tracker, construct the online servers set and find out dead servers and
    * schedule SCP for them. The online servers will be constructed by scanning zk, and we will also
-   * scan the wal directory to find out possible live region servers, and the differences between
-   * these two sets are the dead servers</li>
+   * scan the wal directory and load from master local region to find out possible live region servers,
+   * and the differences between these two sets are the dead servers</li>
    * </ol>
    * </li>
    * <li>If this is a new deploy, schedule a InitMetaProcedure to initialize meta</li>
@@ -941,8 +941,6 @@ public class HMaster extends HBaseServerBase<MasterRpcServices> implements Maste
       this.splitWALManager = new SplitWALManager(this);
     }
 
-
-
     tryMigrateMetaLocationsFromZooKeeper();
 
     createProcedureExecutor();
@@ -963,8 +961,8 @@ public class HMaster extends HBaseServerBase<MasterRpcServices> implements Maste
     this.assignmentManager.setupRIT(ritList);
 
     // Start RegionServerTracker with listing of servers found with exiting SCPs -- these should
-    // be registered in the deadServers set -- and with the list of servernames out on the
-    // filesystem that COULD BE 'alive' (we'll schedule SCPs for each and let SCP figure it out).
+    // be registered in the deadServers set -- and the servernames loaded from the WAL directory
+    // and master local region that COULD BE 'alive'(we'll schedule SCPs for each and let SCP figure it out).
     // We also pass dirs that are already 'splitting'... so we can do some checks down in tracker.
     // TODO: Generate the splitting and live Set in one pass instead of two as we currently do.
     this.regionServerTracker.upgrade(
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionServerTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionServerTracker.java
index 63a3ec19fac..84192a7e94c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionServerTracker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionServerTracker.java
@@ -129,7 +129,7 @@ public class RegionServerTracker extends ZKListener {
     // '-SPLITTING'. Each splitting server should have a corresponding SCP. Log if not.
     splittingServersFromWALDir.stream().filter(s -> !deadServersFromPE.contains(s)).
       forEach(s -> LOG.error("{} has no matching ServerCrashProcedure", s));
-    // create ServerNode for all possible live servers from wal directory
+    // create ServerNode for all possible live servers from wal directory and master local region
     liveServersBeforeRestart
         .forEach(sn -> server.getAssignmentManager().getRegionStates().getOrCreateServer(sn));
     ServerManager serverManager = server.getServerManager();