hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [4/4] hbase git commit: HBASE-13616 Move ServerShutdownHandler to Pv2
Date Fri, 29 May 2015 03:46:13 GMT
HBASE-13616 Move ServerShutdownHandler to Pv2


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/32561422
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/32561422
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/32561422

Branch: refs/heads/master
Commit: 325614220f1c208b0846001f903888660096cdb1
Parents: e61bf1b
Author: stack <stack@apache.org>
Authored: Thu May 28 17:13:54 2015 -0700
Committer: stack <stack@apache.org>
Committed: Thu May 28 20:45:38 2015 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/HRegionInfo.java    |    2 +-
 .../replication/ReplicationQueuesZKImpl.java    |    6 +-
 .../hbase/zookeeper/MetaTableLocator.java       |    4 +-
 .../org/apache/hadoop/hbase/util/Bytes.java     |    8 +-
 .../hadoop/hbase/procedure2/Procedure.java      |   12 +-
 .../hbase/procedure2/ProcedureExecutor.java     |    6 +-
 .../generated/MasterProcedureProtos.java        | 2116 ++++++++++++++++--
 .../src/main/protobuf/MasterProcedure.proto     |   22 +
 .../ZKSplitLogManagerCoordination.java          |   14 +-
 .../ZkSplitLogWorkerCoordination.java           |    2 +-
 .../hadoop/hbase/master/AssignmentManager.java  |   41 +-
 .../apache/hadoop/hbase/master/DeadServer.java  |    3 +-
 .../org/apache/hadoop/hbase/master/HMaster.java |   49 +-
 .../hadoop/hbase/master/MasterFileSystem.java   |    7 +
 .../hadoop/hbase/master/MasterServices.java     |    2 +-
 .../hadoop/hbase/master/RegionStates.java       |   13 +-
 .../hadoop/hbase/master/ServerManager.java      |   51 +-
 .../hadoop/hbase/master/SplitLogManager.java    |   11 +-
 .../hadoop/hbase/master/TableLockManager.java   |    5 +-
 .../hbase/master/handler/LogReplayHandler.java  |   88 -
 .../handler/MetaServerShutdownHandler.java      |  216 --
 .../master/handler/ServerShutdownHandler.java   |  371 ---
 .../procedure/AddColumnFamilyProcedure.java     |    6 +-
 .../master/procedure/CreateTableProcedure.java  |    6 +-
 .../procedure/DeleteColumnFamilyProcedure.java  |    6 +-
 .../master/procedure/DeleteTableProcedure.java  |    6 +-
 .../master/procedure/DisableTableProcedure.java |    6 +-
 .../master/procedure/EnableTableProcedure.java  |    6 +-
 .../master/procedure/MasterProcedureEnv.java    |    2 +-
 .../master/procedure/MasterProcedureQueue.java  |  358 ++-
 .../procedure/ModifyColumnFamilyProcedure.java  |    6 +-
 .../master/procedure/ModifyTableProcedure.java  |    6 +-
 .../master/procedure/ServerCrashProcedure.java  |  751 +++++++
 .../procedure/ServerProcedureInterface.java     |   40 +
 .../procedure/TableProcedureInterface.java      |    2 +-
 .../procedure/TruncateTableProcedure.java       |    6 +-
 .../apache/hadoop/hbase/util/FSHDFSUtils.java   |    4 +-
 .../master/TestAssignmentManagerOnCluster.java  |    6 +-
 .../hadoop/hbase/master/TestCatalogJanitor.java |    2 +-
 .../master/TestDistributedLogSplitting.java     |    3 +-
 .../hadoop/hbase/master/TestMasterFailover.java |   17 +-
 .../MasterProcedureTestingUtility.java          |   48 +-
 .../procedure/TestMasterProcedureQueue.java     |   44 +-
 .../procedure/TestServerCrashProcedure.java     |  131 ++
 .../snapshot/TestSnapshotClientRetries.java     |    9 +-
 45 files changed, 3363 insertions(+), 1157 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/32561422/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
index b127489..adca3d7 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
@@ -846,7 +846,7 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
   }
 
   /**
-   * Convert a HRegionInfo to a RegionInfo
+   * Convert a HRegionInfo to the protobuf RegionInfo
    *
    * @return the converted RegionInfo
    */

http://git-wip-us.apache.org/repos/asf/hbase/blob/32561422/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
index 635b021..0535b4b2 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java
@@ -168,7 +168,7 @@ public class ReplicationQueuesZKImpl extends ReplicationStateZKBase implements
R
     SortedMap<String, SortedSet<String>> newQueues = new TreeMap<String, SortedSet<String>>();
     // check whether there is multi support. If yes, use it.
     if (conf.getBoolean(HConstants.ZOOKEEPER_USEMULTI, true)) {
-      LOG.info("Atomically moving " + regionserverZnode + "'s wals to my queue");
+      LOG.info("Atomically moving " + regionserverZnode + "'s WALs to my queue");
       newQueues = copyQueuesFromRSUsingMulti(regionserverZnode);
     } else {
       LOG.info("Moving " + regionserverZnode + "'s wals to my queue");
@@ -336,9 +336,9 @@ public class ReplicationQueuesZKImpl extends ReplicationStateZKBase implements
R
       }
       // add delete op for dead rs
       listOfOps.add(ZKUtilOp.deleteNodeFailSilent(deadRSZnodePath));
-      LOG.debug(" The multi list size is: " + listOfOps.size());
+      if (LOG.isTraceEnabled()) LOG.trace(" The multi list size is: " + listOfOps.size());
       ZKUtil.multiOrSequential(this.zookeeper, listOfOps, false);
-      LOG.info("Atomically moved the dead regionserver logs. ");
+      if (LOG.isTraceEnabled()) LOG.trace("Atomically moved the dead regionserver logs. ");
     } catch (KeeperException e) {
       // Multi call failed; it looks like some other regionserver took away the logs.
       LOG.warn("Got exception in copyQueuesFromRSUsingMulti: ", e);

http://git-wip-us.apache.org/repos/asf/hbase/blob/32561422/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/MetaTableLocator.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/MetaTableLocator.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/MetaTableLocator.java
index bfdf394..3cffd04 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/MetaTableLocator.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/MetaTableLocator.java
@@ -97,7 +97,7 @@ public class MetaTableLocator {
   }
 
   /**
-   * 
+   *
    * @param zkw
    * @param replicaId
    * @return meta table regions and their locations.
@@ -120,7 +120,7 @@ public class MetaTableLocator {
   }
 
   /**
-   * 
+   *
    * @param zkw
    * @param replicaId
    * @return List of meta regions

http://git-wip-us.apache.org/repos/asf/hbase/blob/32561422/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
index 0366644..7d678fd 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
@@ -2665,7 +2665,7 @@ public class Bytes implements Comparable<Bytes> {
 
   /**
    * Find index of passed delimiter walking from end of buffer backwards.
-   * 
+   *
    * @param b
    * @param delimiter
    * @return Index of delimiter
@@ -2684,15 +2684,15 @@ public class Bytes implements Comparable<Bytes> {
     }
     return result;
     }
-  
+
     public static int findCommonPrefix(byte[] left, byte[] right, int leftLength, int rightLength,
         int leftOffset, int rightOffset) {
       int length = Math.min(leftLength, rightLength);
       int result = 0;
-  
+
       while (result < length && left[leftOffset + result] == right[rightOffset
+ result]) {
         result++;
       }
       return result;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/32561422/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/Procedure.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/Procedure.java
b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/Procedure.java
index 6abf2c5..e87ea09 100644
--- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/Procedure.java
+++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/Procedure.java
@@ -168,6 +168,16 @@ public abstract class Procedure<TEnvironment> implements Comparable<Procedure>
{
     // no-op
   }
 
+  /**
+   * By default, the executor will run procedures start to finish. Return true to make the
executor
+   * yield between each flow step to give other procedures time to run their flow steps.
+   * @return Return true if the executor should yield on completion of a flow state step.
+   * Defaults to return false.
+   */
+  protected boolean isYieldAfterSuccessfulFlowStateStep() {
+    return false;
+  }
+
   @Override
   public String toString() {
     StringBuilder sb = new StringBuilder();
@@ -691,4 +701,4 @@ public abstract class Procedure<TEnvironment> implements Comparable<Procedure>
{
 
     return proc;
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/32561422/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
index 59b346a..efc0b63 100644
--- a/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
+++ b/hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
@@ -148,8 +148,8 @@ public class ProcedureExecutor<TEnvironment> {
 
     public void periodicExecute(final TEnvironment env) {
       if (completed.isEmpty()) {
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("No completed procedures to cleanup.");
+        if (LOG.isTraceEnabled()) {
+          LOG.trace("No completed procedures to cleanup.");
         }
         return;
       }
@@ -1134,4 +1134,4 @@ public class ProcedureExecutor<TEnvironment> {
     }
     return new ProcedureResult(proc.getStartTime(), proc.getLastUpdate(), proc.getResult());
   }
-}
\ No newline at end of file
+}


Mime
View raw message