You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2017/05/23 07:36:59 UTC

[47/50] [abbrv] hbase git commit: MoveRegionProcedure was not passing its Region to super class. NPEs when locking.

MoveRegionProcedure was not passing its Region to super class. NPEs when
locking.


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

Branch: refs/heads/HBASE-14614
Commit: d7c479366680fa7f667bf7e4436fbce83f8b159a
Parents: bb34013
Author: Michael Stack <st...@apache.org>
Authored: Thu May 11 20:22:33 2017 -0700
Committer: Michael Stack <st...@apache.org>
Committed: Tue May 23 00:33:03 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java    | 2 +-
 .../apache/hadoop/hbase/master/assignment/AssignmentManager.java | 4 +---
 .../hadoop/hbase/master/assignment/MoveRegionProcedure.java      | 3 ++-
 .../master/procedure/AbstractStateMachineTableProcedure.java     | 3 +++
 4 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d7c47936/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 f065a98..fa3df04 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
@@ -1669,7 +1669,7 @@ public class ProcedureExecutor<TEnvironment> {
           }
         }
       } catch (Throwable t) {
-        LOG.warn("Worker terminating because....", t);
+        LOG.warn("Worker terminating UNNATURALLY " + this.activeProcedure, t);
       } finally {
         LOG.debug("Worker terminated.");
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d7c47936/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
index e567d2d..eceb624 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
@@ -720,9 +720,7 @@ public class AssignmentManager implements ServerListener {
   }
 
   public MoveRegionProcedure createMoveRegionProcedure(final RegionPlan plan) {
-    MoveRegionProcedure proc = new MoveRegionProcedure(plan);
-    proc.setOwner(getProcedureEnvironment().getRequestUser().getShortName());
-    return proc;
+    return new MoveRegionProcedure(getProcedureEnvironment(), plan);
   }
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/d7c47936/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MoveRegionProcedure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MoveRegionProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MoveRegionProcedure.java
index 6cc04e4..f998af8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MoveRegionProcedure.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MoveRegionProcedure.java
@@ -52,7 +52,8 @@ public class MoveRegionProcedure extends AbstractStateMachineRegionProcedure<Mov
     super();
   }
 
-  public MoveRegionProcedure(final RegionPlan plan) {
+  public MoveRegionProcedure(final MasterProcedureEnv env, final RegionPlan plan) {
+    super(env, plan.getRegionInfo());
     assert plan.getDestination() != null: plan.toString();
     this.plan = plan;
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d7c47936/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineTableProcedure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineTableProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineTableProcedure.java
index eca963d..1417159 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineTableProcedure.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineTableProcedure.java
@@ -50,6 +50,9 @@ public abstract class AbstractStateMachineTableProcedure<TState>
     this(env, null);
   }
 
+  /**
+   * @param env Uses this to set Procedure Owner at least.
+   */
   protected AbstractStateMachineTableProcedure(final MasterProcedureEnv env,
       final ProcedurePrepareLatch latch) {
     if (env != null) {