Add log for mastership handoff

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

Branch: refs/heads/master
Commit: edaf78e279e87f74a08355103b2ef1b427ae0012
Parents: 5807fba
Author: Junkai Xue <j...@linkedin.com>
Authored: Fri Sep 1 16:07:38 2017 -0700
Committer: Junkai Xue <j...@linkedin.com>
Committed: Mon Nov 6 17:07:20 2017 -0800

----------------------------------------------------------------------
 .../org/apache/helix/controller/GenericHelixController.java     | 5 +++--
 .../helix/controller/stages/CurrentStateComputationStage.java   | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/edaf78e2/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
----------------------------------------------------------------------
diff --git 
a/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
 
b/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
index e89d159..33db34d 100644
--- 
a/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
+++ 
b/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
@@ -353,8 +353,9 @@ public class GenericHelixController implements 
ConfigChangeListener, IdealStateC
     event.addAttribute(AttributeName.ClusterDataCache.name(), cache);
 
     List<Pipeline> pipelines = cache.isTaskCache()
-        ? _registry.getPipelinesForEvent(event.getEventType())
-        : _taskRegistry.getPipelinesForEvent(event.getEventType());
+        ? _taskRegistry.getPipelinesForEvent(event.getEventType())
+        : _registry.getPipelinesForEvent(event.getEventType());
+
     if (pipelines == null || pipelines.size() == 0) {
       logger.info(
           "No " + getPipelineType(cache.isTaskCache()) + " pipeline to run for 
event:" + event

http://git-wip-us.apache.org/repos/asf/helix/blob/edaf78e2/helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateComputationStage.java
----------------------------------------------------------------------
diff --git 
a/helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateComputationStage.java
 
b/helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateComputationStage.java
index 88ddf20..d310fe0 100644
--- 
a/helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateComputationStage.java
+++ 
b/helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateComputationStage.java
@@ -282,6 +282,8 @@ public class CurrentStateComputationStage extends 
AbstractBaseStage {
     }
 
     if (handOffStartTime != TRANSITION_FAILED && handOffEndTime - 
handOffStartTime <= threshold) {
+      LOG.info(String.format("Missing topstate duration is %d for partition 
%s",
+          handOffEndTime - handOffStartTime, partition.getPartitionName()));
       
clusterStatusMonitor.updateMissingTopStateDurationStats(resource.getResourceName(),
           handOffEndTime - handOffStartTime, true);
     }

Reply via email to