[04/50] [abbrv] hbase git commit: HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead
HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead Summary: Requests to tell master that meta is moved can be blocked behind other requests that are trying to mutate meta. This causes a dead lock and the master is assumed dead. However the master stays up the whole time. This patch adds prioritization onto reporting meta moves. It should allow meta to make progress. Test Plan: unit tests. Differential Revision: https://reviews.facebook.net/D38109 Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c3f83a9e Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c3f83a9e Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c3f83a9e Branch: refs/heads/hbase-12439 Commit: c3f83a9eff412d8339f1b9fd40fc0a4117185d2c Parents: 1746321 Author: Elliott Clark ecl...@apache.org Authored: Wed May 6 11:27:33 2015 -0700 Committer: Elliott Clark ecl...@apache.org Committed: Mon May 11 15:21:17 2015 -0700 -- .../hadoop/hbase/ipc/RWQueueRpcExecutor.java| 3 ++ .../AnnotationReadingPriorityFunction.java | 21 .../hbase/regionserver/TestQosFunction.java | 52 3 files changed, 76 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c3f83a9e/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java index 2b58680..a0ea160 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java @@ -187,6 +187,9 @@ public class RWQueueRpcExecutor extends RpcExecutor { if (methodName.equalsIgnoreCase(mutate)) { return true; } +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { + return true; +} return false; } http://git-wip-us.apache.org/repos/asf/hbase/blob/c3f83a9e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java index ad951a9..880710a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java @@ -25,9 +25,14 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.ipc.PriorityFunction; import org.apache.hadoop.hbase.ipc.QosPriority; +import org.apache.hadoop.hbase.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequest; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionStateTransition; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CompactRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.FlushRegionRequest; @@ -227,6 +232,22 @@ class AnnotationReadingPriorityFunction implements PriorityFunction { return HConstants.SYSTEMTABLE_QOS; } } + +// If meta is moving then all the rest of report the report state transitions will be +// blocked. We shouldn't be in the same queue. +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { // Regions are moving + ReportRegionStateTransitionRequest tRequest = (ReportRegionStateTransitionRequest) param; + for (RegionStateTransition transition : tRequest.getTransitionList()) { +if (transition.getRegionInfoList() != null) { + for (HBaseProtos.RegionInfo info : transition.getRegionInfoList()) { +TableName tn = ProtobufUtil.toTableName(info.getTableName()); +if (tn.isSystemTable()) { + return HConstants.SYSTEMTABLE_QOS; +} + } +} + } +} return HConstants.NORMAL_QOS; }
[23/50] [abbrv] hbase git commit: HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead
HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead Summary: Requests to tell master that meta is moved can be blocked behind other requests that are trying to mutate meta. This causes a dead lock and the master is assumed dead. However the master stays up the whole time. This patch adds prioritization onto reporting meta moves. It should allow meta to make progress. Test Plan: unit tests. Differential Revision: https://reviews.facebook.net/D38109 Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c3f83a9e Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c3f83a9e Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c3f83a9e Branch: refs/heads/hbase-11339 Commit: c3f83a9eff412d8339f1b9fd40fc0a4117185d2c Parents: 1746321 Author: Elliott Clark ecl...@apache.org Authored: Wed May 6 11:27:33 2015 -0700 Committer: Elliott Clark ecl...@apache.org Committed: Mon May 11 15:21:17 2015 -0700 -- .../hadoop/hbase/ipc/RWQueueRpcExecutor.java| 3 ++ .../AnnotationReadingPriorityFunction.java | 21 .../hbase/regionserver/TestQosFunction.java | 52 3 files changed, 76 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c3f83a9e/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java index 2b58680..a0ea160 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java @@ -187,6 +187,9 @@ public class RWQueueRpcExecutor extends RpcExecutor { if (methodName.equalsIgnoreCase(mutate)) { return true; } +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { + return true; +} return false; } http://git-wip-us.apache.org/repos/asf/hbase/blob/c3f83a9e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java index ad951a9..880710a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java @@ -25,9 +25,14 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.ipc.PriorityFunction; import org.apache.hadoop.hbase.ipc.QosPriority; +import org.apache.hadoop.hbase.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequest; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionStateTransition; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CompactRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.FlushRegionRequest; @@ -227,6 +232,22 @@ class AnnotationReadingPriorityFunction implements PriorityFunction { return HConstants.SYSTEMTABLE_QOS; } } + +// If meta is moving then all the rest of report the report state transitions will be +// blocked. We shouldn't be in the same queue. +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { // Regions are moving + ReportRegionStateTransitionRequest tRequest = (ReportRegionStateTransitionRequest) param; + for (RegionStateTransition transition : tRequest.getTransitionList()) { +if (transition.getRegionInfoList() != null) { + for (HBaseProtos.RegionInfo info : transition.getRegionInfoList()) { +TableName tn = ProtobufUtil.toTableName(info.getTableName()); +if (tn.isSystemTable()) { + return HConstants.SYSTEMTABLE_QOS; +} + } +} + } +} return HConstants.NORMAL_QOS; }
[23/50] [abbrv] hbase git commit: HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead
HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead Summary: Requests to tell master that meta is moved can be blocked behind other requests that are trying to mutate meta. This causes a dead lock and the master is assumed dead. However the master stays up the whole time. This patch adds prioritization onto reporting meta moves. It should allow meta to make progress. Test Plan: unit tests. Differential Revision: https://reviews.facebook.net/D38109 Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c3f83a9e Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c3f83a9e Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c3f83a9e Branch: refs/heads/hbase-11339 Commit: c3f83a9eff412d8339f1b9fd40fc0a4117185d2c Parents: 1746321 Author: Elliott Clark ecl...@apache.org Authored: Wed May 6 11:27:33 2015 -0700 Committer: Elliott Clark ecl...@apache.org Committed: Mon May 11 15:21:17 2015 -0700 -- .../hadoop/hbase/ipc/RWQueueRpcExecutor.java| 3 ++ .../AnnotationReadingPriorityFunction.java | 21 .../hbase/regionserver/TestQosFunction.java | 52 3 files changed, 76 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c3f83a9e/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java index 2b58680..a0ea160 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java @@ -187,6 +187,9 @@ public class RWQueueRpcExecutor extends RpcExecutor { if (methodName.equalsIgnoreCase(mutate)) { return true; } +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { + return true; +} return false; } http://git-wip-us.apache.org/repos/asf/hbase/blob/c3f83a9e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java index ad951a9..880710a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java @@ -25,9 +25,14 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.ipc.PriorityFunction; import org.apache.hadoop.hbase.ipc.QosPriority; +import org.apache.hadoop.hbase.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequest; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionStateTransition; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CompactRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.FlushRegionRequest; @@ -227,6 +232,22 @@ class AnnotationReadingPriorityFunction implements PriorityFunction { return HConstants.SYSTEMTABLE_QOS; } } + +// If meta is moving then all the rest of report the report state transitions will be +// blocked. We shouldn't be in the same queue. +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { // Regions are moving + ReportRegionStateTransitionRequest tRequest = (ReportRegionStateTransitionRequest) param; + for (RegionStateTransition transition : tRequest.getTransitionList()) { +if (transition.getRegionInfoList() != null) { + for (HBaseProtos.RegionInfo info : transition.getRegionInfoList()) { +TableName tn = ProtobufUtil.toTableName(info.getTableName()); +if (tn.isSystemTable()) { + return HConstants.SYSTEMTABLE_QOS; +} + } +} + } +} return HConstants.NORMAL_QOS; }
hbase git commit: HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead
Repository: hbase Updated Branches: refs/heads/0.98 4d86e2249 - 4e0d26ea2 HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead Summary: Requests to tell master that meta is moved can be blocked behind other requests that are trying to mutate meta. This causes a dead lock and the master is assumed dead. However the master stays up the whole time. This patch adds prioritization onto reporting meta moves. It should allow meta to make progress. Test Plan: unit tests. Differential Revision: https://reviews.facebook.net/D38109 Amending-Author: Andrew Purtell apurt...@apache.org Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4e0d26ea Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4e0d26ea Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4e0d26ea Branch: refs/heads/0.98 Commit: 4e0d26ea23f91f8e04ddfbaa027ad35fc26697fa Parents: 4d86e22 Author: Elliott Clark ecl...@apache.org Authored: Tue May 12 10:08:48 2015 -0700 Committer: Andrew Purtell apurt...@apache.org Committed: Tue May 12 10:08:48 2015 -0700 -- .../hadoop/hbase/ipc/RWQueueRpcExecutor.java| 3 ++ .../AnnotationReadingPriorityFunction.java | 23 +++- .../hbase/regionserver/TestQosFunction.java | 57 +++- 3 files changed, 81 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/4e0d26ea/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java index 9a3d8cd..55889ea 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java @@ -138,6 +138,9 @@ public class RWQueueRpcExecutor extends RpcExecutor { } } } +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { + return true; +} return false; } http://git-wip-us.apache.org/repos/asf/hbase/blob/4e0d26ea/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java index 009a244..3786af1 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java @@ -23,10 +23,15 @@ import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.NotServingRegionException; import org.apache.hadoop.hbase.ipc.PriorityFunction; +import org.apache.hadoop.hbase.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequest; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionStateTransition; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CompactRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.FlushRegionRequest; @@ -198,6 +203,22 @@ class AnnotationReadingPriorityFunction implements PriorityFunction { return HConstants.HIGH_QOS; } } + +// If meta is moving then all the rest of report the report state transitions will be +// blocked. We shouldn't be in the same queue. +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { // Regions are moving + ReportRegionStateTransitionRequest tRequest = (ReportRegionStateTransitionRequest) param; + for (RegionStateTransition transition : tRequest.getTransitionList()) { +if
hbase git commit: HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead
Repository: hbase Updated Branches: refs/heads/branch-1.1 22dad3775 - 253782517 HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead Summary: Requests to tell master that meta is moved can be blocked behind other requests that are trying to mutate meta. This causes a dead lock and the master is assumed dead. However the master stays up the whole time. This patch adds prioritization onto reporting meta moves. It should allow meta to make progress. Test Plan: unit tests. Differential Revision: https://reviews.facebook.net/D38109 Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/25378251 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/25378251 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/25378251 Branch: refs/heads/branch-1.1 Commit: 2537825179a72055bc483b1c1a988b5fc499abf4 Parents: 22dad37 Author: Elliott Clark ecl...@apache.org Authored: Wed May 6 11:27:33 2015 -0700 Committer: Elliott Clark ecl...@apache.org Committed: Mon May 11 15:22:31 2015 -0700 -- .../hadoop/hbase/ipc/RWQueueRpcExecutor.java| 3 ++ .../AnnotationReadingPriorityFunction.java | 21 .../hbase/regionserver/TestQosFunction.java | 52 3 files changed, 76 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/25378251/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java index 2b58680..a0ea160 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java @@ -187,6 +187,9 @@ public class RWQueueRpcExecutor extends RpcExecutor { if (methodName.equalsIgnoreCase(mutate)) { return true; } +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { + return true; +} return false; } http://git-wip-us.apache.org/repos/asf/hbase/blob/25378251/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java index 5ee20ef..17c14b6 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java @@ -25,9 +25,14 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.ipc.PriorityFunction; import org.apache.hadoop.hbase.ipc.QosPriority; +import org.apache.hadoop.hbase.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequest; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionStateTransition; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CompactRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.FlushRegionRequest; @@ -227,6 +232,22 @@ class AnnotationReadingPriorityFunction implements PriorityFunction { return HConstants.SYSTEMTABLE_QOS; } } + +// If meta is moving then all the rest of report the report state transitions will be +// blocked. We shouldn't be in the same queue. +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { // Regions are moving + ReportRegionStateTransitionRequest tRequest = (ReportRegionStateTransitionRequest) param; + for (RegionStateTransition transition : tRequest.getTransitionList()) { +if (transition.getRegionInfoList() != null) { + for (HBaseProtos.RegionInfo info : transition.getRegionInfoList()) { +TableName tn = ProtobufUtil.toTableName(info.getTableName()); +if (tn.isSystemTable()) { + return HConstants.SYSTEMTABLE_QOS; +} + } +} + } +} return HConstants.NORMAL_QOS; }
hbase git commit: HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead
Repository: hbase Updated Branches: refs/heads/branch-1 2b5616462 - 95f1fe52e HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead Summary: Requests to tell master that meta is moved can be blocked behind other requests that are trying to mutate meta. This causes a dead lock and the master is assumed dead. However the master stays up the whole time. This patch adds prioritization onto reporting meta moves. It should allow meta to make progress. Test Plan: unit tests. Differential Revision: https://reviews.facebook.net/D38109 Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/95f1fe52 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/95f1fe52 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/95f1fe52 Branch: refs/heads/branch-1 Commit: 95f1fe52ed486fea21587739af7a18583d667b31 Parents: 2b56164 Author: Elliott Clark ecl...@apache.org Authored: Wed May 6 11:27:33 2015 -0700 Committer: Elliott Clark ecl...@apache.org Committed: Mon May 11 15:22:08 2015 -0700 -- .../hadoop/hbase/ipc/RWQueueRpcExecutor.java| 3 ++ .../AnnotationReadingPriorityFunction.java | 21 .../hbase/regionserver/TestQosFunction.java | 52 3 files changed, 76 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/95f1fe52/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java index 2b58680..a0ea160 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java @@ -187,6 +187,9 @@ public class RWQueueRpcExecutor extends RpcExecutor { if (methodName.equalsIgnoreCase(mutate)) { return true; } +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { + return true; +} return false; } http://git-wip-us.apache.org/repos/asf/hbase/blob/95f1fe52/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java index ad951a9..880710a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java @@ -25,9 +25,14 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.ipc.PriorityFunction; import org.apache.hadoop.hbase.ipc.QosPriority; +import org.apache.hadoop.hbase.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequest; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionStateTransition; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CompactRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.FlushRegionRequest; @@ -227,6 +232,22 @@ class AnnotationReadingPriorityFunction implements PriorityFunction { return HConstants.SYSTEMTABLE_QOS; } } + +// If meta is moving then all the rest of report the report state transitions will be +// blocked. We shouldn't be in the same queue. +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { // Regions are moving + ReportRegionStateTransitionRequest tRequest = (ReportRegionStateTransitionRequest) param; + for (RegionStateTransition transition : tRequest.getTransitionList()) { +if (transition.getRegionInfoList() != null) { + for (HBaseProtos.RegionInfo info : transition.getRegionInfoList()) { +TableName tn = ProtobufUtil.toTableName(info.getTableName()); +if (tn.isSystemTable()) { + return HConstants.SYSTEMTABLE_QOS; +} + } +} + } +} return HConstants.NORMAL_QOS; }
hbase git commit: HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead
Repository: hbase Updated Branches: refs/heads/master 174632111 - c3f83a9ef HBASE-13635 Regions stuck in transition because master is incorrectly assumed dead Summary: Requests to tell master that meta is moved can be blocked behind other requests that are trying to mutate meta. This causes a dead lock and the master is assumed dead. However the master stays up the whole time. This patch adds prioritization onto reporting meta moves. It should allow meta to make progress. Test Plan: unit tests. Differential Revision: https://reviews.facebook.net/D38109 Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c3f83a9e Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c3f83a9e Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c3f83a9e Branch: refs/heads/master Commit: c3f83a9eff412d8339f1b9fd40fc0a4117185d2c Parents: 1746321 Author: Elliott Clark ecl...@apache.org Authored: Wed May 6 11:27:33 2015 -0700 Committer: Elliott Clark ecl...@apache.org Committed: Mon May 11 15:21:17 2015 -0700 -- .../hadoop/hbase/ipc/RWQueueRpcExecutor.java| 3 ++ .../AnnotationReadingPriorityFunction.java | 21 .../hbase/regionserver/TestQosFunction.java | 52 3 files changed, 76 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c3f83a9e/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java index 2b58680..a0ea160 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java @@ -187,6 +187,9 @@ public class RWQueueRpcExecutor extends RpcExecutor { if (methodName.equalsIgnoreCase(mutate)) { return true; } +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { + return true; +} return false; } http://git-wip-us.apache.org/repos/asf/hbase/blob/c3f83a9e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java index ad951a9..880710a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java @@ -25,9 +25,14 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.ipc.PriorityFunction; import org.apache.hadoop.hbase.ipc.QosPriority; +import org.apache.hadoop.hbase.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequest; +import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionStateTransition; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CompactRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.FlushRegionRequest; @@ -227,6 +232,22 @@ class AnnotationReadingPriorityFunction implements PriorityFunction { return HConstants.SYSTEMTABLE_QOS; } } + +// If meta is moving then all the rest of report the report state transitions will be +// blocked. We shouldn't be in the same queue. +if (methodName.equalsIgnoreCase(ReportRegionStateTransition)) { // Regions are moving + ReportRegionStateTransitionRequest tRequest = (ReportRegionStateTransitionRequest) param; + for (RegionStateTransition transition : tRequest.getTransitionList()) { +if (transition.getRegionInfoList() != null) { + for (HBaseProtos.RegionInfo info : transition.getRegionInfoList()) { +TableName tn = ProtobufUtil.toTableName(info.getTableName()); +if (tn.isSystemTable()) { + return HConstants.SYSTEMTABLE_QOS; +} + } +} + } +} return HConstants.NORMAL_QOS; }