Fix the monitor reporting thread pool init order in RoutingTableProvider. The reporting thread pool was init after listener registers. This may cause some warning message printed because of the monitor event fails to be recorded.
Project: http://git-wip-us.apache.org/repos/asf/helix/repo Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/86748856 Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/86748856 Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/86748856 Branch: refs/heads/master Commit: 86748856c4abec4cf1cea16574b9acd01c650308 Parents: 65533ea Author: Jiajun Wang <[email protected]> Authored: Thu Aug 9 22:47:28 2018 -0700 Committer: Lei Xia <[email protected]> Committed: Fri Sep 21 14:10:35 2018 -0700 ---------------------------------------------------------------------- .../java/org/apache/helix/spectator/RoutingTableProvider.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/helix/blob/86748856/helix-core/src/main/java/org/apache/helix/spectator/RoutingTableProvider.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/spectator/RoutingTableProvider.java b/helix-core/src/main/java/org/apache/helix/spectator/RoutingTableProvider.java index 3403d12..5338145 100644 --- a/helix-core/src/main/java/org/apache/helix/spectator/RoutingTableProvider.java +++ b/helix-core/src/main/java/org/apache/helix/spectator/RoutingTableProvider.java @@ -119,6 +119,7 @@ public class RoutingTableProvider } catch (JMException e) { logger.error("Failed to register RoutingTableProvider monitor MBean.", e); } + _reportExecutor = Executors.newSingleThreadExecutor(); _routerUpdater = new RouterUpdater(clusterName, _sourceDataType); _routerUpdater.start(); @@ -197,8 +198,6 @@ public class RoutingTableProvider } else { _isPeriodicRefreshEnabled = false; } - - _reportExecutor = Executors.newSingleThreadExecutor(); } /**
