hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [hbase] branch master updated: HBASE-23247 [hbck2] Schedule SCPs for 'Unknown Servers' (#791)
Date Mon, 04 Nov 2019 17:02:09 GMT
This is an automated email from the ASF dual-hosted git repository.

stack 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 bbfc737  HBASE-23247 [hbck2] Schedule SCPs for 'Unknown Servers' (#791)
bbfc737 is described below

commit bbfc73789fb51bac8638cb67fa3bb363fec369bd
Author: Michael Stack <saintstack@users.noreply.github.com>
AuthorDate: Mon Nov 4 08:59:57 2019 -0800

    HBASE-23247 [hbck2] Schedule SCPs for 'Unknown Servers' (#791)
    
    Signed-off-by: Sean Busbey <busbey@apache.org>
    Signed-off-by: Duo Zhang <zhangduo@apache.org>
---
 .../hadoop/hbase/procedure2/store/ProcedureStoreTracker.java   |  3 +++
 .../java/org/apache/hadoop/hbase/master/MasterRpcServices.java | 10 +++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/ProcedureStoreTracker.java
b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/ProcedureStoreTracker.java
index 9edd871..03e2ce3 100644
--- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/ProcedureStoreTracker.java
+++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/ProcedureStoreTracker.java
@@ -136,6 +136,9 @@ public class ProcedureStoreTracker {
     node = lookupClosestNode(node, procId);
     assert node != null : "expected node to update procId=" + procId;
     assert node.contains(procId) : "expected procId=" + procId + " in the node";
+    if (node == null) {
+      throw new NullPointerException("pid=" + procId);
+    }
     node.insertOrUpdate(procId);
     trackProcIds(procId);
     return node;
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index 06a99fa..383ebcb 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.master;
 
 import static org.apache.hadoop.hbase.master.MasterWalManager.META_FILTER;
 
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.BindException;
 import java.net.InetAddress;
@@ -2814,7 +2815,14 @@ public class MasterRpcServices extends RSRpcServices
         AbstractFSWALProvider.getWALDirectoryName(serverName.toString()));
     Path splitDir = logDir.suffix(AbstractFSWALProvider.SPLITTING_EXT);
     Path checkDir = master.getFileSystem().exists(splitDir) ? splitDir : logDir;
-    return master.getFileSystem().listStatus(checkDir, META_FILTER).length > 0;
+    try {
+      return master.getFileSystem().listStatus(checkDir, META_FILTER).length > 0;
+    } catch (FileNotFoundException fnfe) {
+      // If no files, then we don't contain metas; was failing schedule of
+      // SCP because this was FNFE'ing when no server dirs ('Unknown Server').
+      LOG.warn("No dir for WALs for {}; continuing", serverName.toString());
+      return false;
+    }
   }
 
   private boolean shouldSubmitSCP(ServerName serverName) {


Mime
View raw message