hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [5/5] hbase git commit: HBASE-13616 Move ServerShutdownHandler to Pv2
Date Thu, 28 May 2015 22:04:43 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/94f0ee7e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/94f0ee7e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/94f0ee7e

Branch: refs/heads/branch-1
Commit: 94f0ee7ee391e3fb0ee5f6be7beb8c9cebc4acbc
Parents: 24ef755
Author: stack <stack@apache.org>
Authored: Thu May 28 15:04:27 2015 -0700
Committer: stack <stack@apache.org>
Committed: Thu May 28 15:04:27 2015 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/HRegionInfo.java    |    2 +-
 .../replication/ReplicationQueuesZKImpl.java    |    6 +-
 .../hbase/zookeeper/MetaTableLocator.java       |   31 +-
 .../org/apache/hadoop/hbase/util/Bytes.java     |    2 +-
 .../hadoop/hbase/procedure2/Procedure.java      |   12 +-
 .../hbase/procedure2/ProcedureExecutor.java     |    6 +-
 .../generated/MasterProcedureProtos.java        | 2116 ++++++++++++++++--
 .../src/main/protobuf/MasterProcedure.proto     |   22 +
 .../ZKSplitLogManagerCoordination.java          |    6 +-
 .../ZkSplitLogWorkerCoordination.java           |    2 +-
 .../hadoop/hbase/master/AssignmentManager.java  |   61 +-
 .../apache/hadoop/hbase/master/DeadServer.java  |    3 +-
 .../org/apache/hadoop/hbase/master/HMaster.java |   57 +-
 .../hadoop/hbase/master/MasterFileSystem.java   |    7 +
 .../hadoop/hbase/master/MasterServices.java     |    2 +-
 .../hadoop/hbase/master/RegionStates.java       |   18 +-
 .../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      |  222 --
 .../master/handler/ServerShutdownHandler.java   |  399 ----
 .../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  |  762 +++++++
 .../procedure/ServerProcedureInterface.java     |   40 +
 .../procedure/TableProcedureInterface.java      |    2 +-
 .../procedure/TruncateTableProcedure.java       |    6 +-
 .../hadoop/hbase/regionserver/HRegion.java      |   16 +-
 .../apache/hadoop/hbase/util/FSHDFSUtils.java   |    4 +-
 .../hbase/master/TestAssignmentManager.java     |  334 ++-
 .../master/TestAssignmentManagerOnCluster.java  |   18 +-
 .../hadoop/hbase/master/TestCatalogJanitor.java |    2 +-
 .../master/TestDistributedLogSplitting.java     |    3 +-
 .../hadoop/hbase/master/TestMasterFailover.java |    7 +-
 .../hbase/master/TestZKLessAMOnCluster.java     |    2 +-
 .../MasterProcedureTestingUtility.java          |   48 +-
 .../procedure/TestMasterProcedureQueue.java     |   53 +-
 .../procedure/TestServerCrashProcedure.java     |  131 ++
 .../snapshot/TestSnapshotClientRetries.java     |    9 +-
 48 files changed, 3621 insertions(+), 1353 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/94f0ee7e/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 3c7b2ce..175515c 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
@@ -988,7 +988,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/94f0ee7e/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 6a30511..0a6ba44 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/94f0ee7e/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 54b6ef4..0975c14 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
@@ -17,21 +17,28 @@
  */
 package org.apache.hadoop.hbase.zookeeper;
 
-import com.google.common.base.Stopwatch;
-import com.google.protobuf.InvalidProtocolBufferException;
+import java.io.EOFException;
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.NoRouteToHostException;
+import java.net.SocketException;
+import java.net.SocketTimeoutException;
+import java.rmi.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.NotAllMetaRegionsOnlineException;
+import org.apache.hadoop.hbase.ServerName;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.client.HConnection;
 import org.apache.hadoop.hbase.client.RegionReplicaUtil;
 import org.apache.hadoop.hbase.client.RetriesExhaustedException;
 import org.apache.hadoop.hbase.exceptions.DeserializationException;
-import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.ipc.FailedServerException;
 import org.apache.hadoop.hbase.ipc.ServerNotRunningYetException;
 import org.apache.hadoop.hbase.master.RegionState;
@@ -47,18 +54,8 @@ import org.apache.hadoop.hbase.util.Pair;
 import org.apache.hadoop.ipc.RemoteException;
 import org.apache.zookeeper.KeeperException;
 
-import java.io.EOFException;
-import java.io.IOException;
-import java.net.ConnectException;
-import java.net.NoRouteToHostException;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.rmi.UnknownHostException;
-
-import java.util.List;
-import java.util.ArrayList;
-
-import javax.annotation.Nullable;
+import com.google.common.base.Stopwatch;
+import com.google.protobuf.InvalidProtocolBufferException;
 
 /**
  * Utility class to perform operation (get/wait for/verify/set/delete) on znode in ZooKeeper
@@ -620,4 +617,4 @@ public class MetaTableLocator {
       stopped = true;
     }
   }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hbase/blob/94f0ee7e/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 c59071c..ff54ebe 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
@@ -1186,7 +1186,7 @@ public class Bytes {
    * @param offset Offset into array at which vint begins.
    * @throws java.io.IOException e
    * @return deserialized long from buffer.
-   * @deprecated Use {@link #readAsVLong()} instead.
+   * @deprecated Use {@link #readAsVLong(byte[], int)} instead.
    */
   @Deprecated
   public static long readVLong(final byte [] buffer, final int offset)

http://git-wip-us.apache.org/repos/asf/hbase/blob/94f0ee7e/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/94f0ee7e/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