com.groupbyinc.flux.cluster.InternalClusterInfoService.class Maven / Gradle / Ivy
???? 4? 6com/groupbyinc/flux/cluster/InternalClusterInfoService 6com/groupbyinc/flux/common/component/AbstractComponent .com/groupbyinc/flux/cluster/ClusterInfoService 3com/groupbyinc/flux/cluster/LocalNodeMasterListener 0com/groupbyinc/flux/cluster/ClusterStateListener InternalClusterInfoService.java ^com/groupbyinc/flux/cluster/InternalClusterInfoService$SubmitReschedulingClusterInfoUpdatedJob 'SubmitReschedulingClusterInfoUpdatedJob 8com/groupbyinc/flux/cluster/InternalClusterInfoService$2 8com/groupbyinc/flux/cluster/InternalClusterInfoService$1 ;com/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder 3com/groupbyinc/flux/common/collect/ImmutableOpenMap Builder *com/groupbyinc/flux/monitor/fs/FsInfo$Path %com/groupbyinc/flux/monitor/fs/FsInfo Path /com/groupbyinc/flux/threadpool/ThreadPool$Names )com/groupbyinc/flux/threadpool/ThreadPool Names 4com/groupbyinc/flux/common/settings/Setting$Property " +com/groupbyinc/flux/common/settings/Setting $ Property 5com/groupbyinc/flux/cluster/node/DiscoveryNodes$Delta ' /com/groupbyinc/flux/cluster/node/DiscoveryNodes ) Delta %java/lang/invoke/MethodHandles$Lookup , java/lang/invoke/MethodHandles . Lookup -INTERNAL_CLUSTER_INFO_UPDATE_INTERVAL_SETTING -Lcom/groupbyinc/flux/common/settings/Setting; ZLcom/groupbyinc/flux/common/settings/Setting; %INTERNAL_CLUSTER_INFO_TIMEOUT_SETTING updateFrequency +Lcom/groupbyinc/flux/common/unit/TimeValue; leastAvailableSpaceUsages 5Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; pLcom/groupbyinc/flux/common/collect/ImmutableOpenMap; mostAvailableSpaceUsages shardRoutingToDataPath {Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;
shardSizes YLcom/groupbyinc/flux/common/collect/ImmutableOpenMap; isMaster Z enabled fetchTimeout clusterService 4Lcom/groupbyinc/flux/cluster/service/ClusterService;
threadPool +Lcom/groupbyinc/flux/threadpool/ThreadPool; client ,Lcom/groupbyinc/flux/client/node/NodeClient; listener Ljava/util/function/Consumer; HLjava/util/function/Consumer; $assertionsDisabled ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/client/node/NodeClient;Ljava/util/function/Consumer;)V 1(Lcom/groupbyinc/flux/common/settings/Settings;)V M O
P ? @ R of 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; T U
V 7 8 X : 8 Z ; 8 \ = 8 ^ C D ` E F b G H d 1 2 f get B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object; h i
% j )com/groupbyinc/flux/common/unit/TimeValue l 5 6 n 4 2 p B 6 r Dcom/groupbyinc/flux/cluster/routing/allocation/DiskThresholdSettings t 9CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED_SETTING v 2 u w java/lang/Boolean y booleanValue ()Z { |
z } A @ 2com/groupbyinc/flux/cluster/service/ClusterService ? getClusterSettings 7()Lcom/groupbyinc/flux/common/settings/ClusterSettings; ? ?
? ? "java/lang/invoke/LambdaMetafactory ? metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; ? ?
? ? ? (Ljava/lang/Object;)V ? setFetchTimeout .(Lcom/groupbyinc/flux/common/unit/TimeValue;)V ? ?
? ? ? accept W(Lcom/groupbyinc/flux/cluster/InternalClusterInfoService;)Ljava/util/function/Consumer; ? ? ? 3com/groupbyinc/flux/common/settings/ClusterSettings ? addSettingsUpdateConsumer M(Lcom/groupbyinc/flux/common/settings/Setting;Ljava/util/function/Consumer;)V ? ?
? ? setUpdateFrequency ? ?
? ? ?
setEnabled (Z)V ? ?
? ? (Ljava/lang/Boolean;)V ? ? addLocalNodeMasterListener 8(Lcom/groupbyinc/flux/cluster/LocalNodeMasterListener;)V ? ?
? ? addListener 5(Lcom/groupbyinc/flux/cluster/ClusterStateListener;)V ? ?
? ? I J ? this 8Lcom/groupbyinc/flux/cluster/InternalClusterInfoService; settings .Lcom/groupbyinc/flux/common/settings/Settings; clusterSettings 5Lcom/groupbyinc/flux/common/settings/ClusterSettings; onMaster ()V Gcom/groupbyinc/flux/common/util/concurrent/EsRejectedExecutionException ? logger 8Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger; ? ? ? 6com/groupbyinc/flux/common/apache/logging/log4j/Logger ? isTraceEnabled ? | ? ? =I have been elected master, scheduling a ClusterInfoUpdateJob ? trace (Ljava/lang/String;)V ? ? ? ? executorName ()Ljava/lang/String; ? ?
? ;(Lcom/groupbyinc/flux/cluster/InternalClusterInfoService;)V M ?
? schedule y(Lcom/groupbyinc/flux/common/unit/TimeValue;Ljava/lang/String;Ljava/lang/Runnable;)Ljava/util/concurrent/ScheduledFuture; ? ?
? state ,()Lcom/groupbyinc/flux/cluster/ClusterState; ? ?
? ? (com/groupbyinc/flux/cluster/ClusterState ? getNodes 3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; ? ?
? ? getDataNodes ? U
* ? size ()I ? ?
? executor :(Ljava/lang/String;)Ljava/util/concurrent/ExecutorService; ? ?
? ? lambda$onMaster$0 ? ?
? ? run N(Lcom/groupbyinc/flux/cluster/InternalClusterInfoService;)Ljava/lang/Runnable; ? ? ? $java/util/concurrent/ExecutorService ? execute (Ljava/lang/Runnable;)V ? ? ? ? isDebugEnabled ? | ? HCouldn't schedule cluster info update task - node might be shutting down debug *(Ljava/lang/String;Ljava/lang/Throwable;)V ? ex ILcom/groupbyinc/flux/common/util/concurrent/EsRejectedExecutionException; offMaster
management clusterChanged 4(Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;)V /com/groupbyinc/flux/cluster/ClusterChangedEvent
nodesDelta 9()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes$Delta;
addedNodes ()Ljava/util/List;
( java/util/List iterator ()Ljava/util/Iterator; java/util/Iterator hasNext! | " next ()Ljava/lang/Object;$% & .com/groupbyinc/flux/cluster/node/DiscoveryNode(
isDataNode* |
)+
? 0data node was added, retrieving new cluster info. ? ?0 lambda$clusterChanged$12 ?
34 ? nodesRemoved7 |
8 removedNodes:
(; #Removing node from cluster info: {}= getId? ?
)@ '(Ljava/lang/String;Ljava/lang/Object;)V ?B ?C containsKey (Ljava/lang/Object;)ZEF
G builder t(Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder;IJ
K remove &(Ljava/lang/Object;)Ljava/lang/Object;MN
O buildQ U
R addedNode 0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; newMaxUsages xLcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder; =Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder; newMinUsages removedNode event 1Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;
dataNodeAdded getClusterInfo +()Lcom/groupbyinc/flux/cluster/ClusterInfo; 'com/groupbyinc/flux/cluster/ClusterInfo` ?(Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)V Mb
ac updateNodeStats R(Lcom/groupbyinc/flux/action/ActionListener;)Ljava/util/concurrent/CountDownLatch; #java/util/concurrent/CountDownLatchg (I)V Mi
hj Ecom/groupbyinc/flux/action/admin/cluster/node/stats/NodesStatsRequestl java/lang/Stringn data:truep ([Ljava/lang/String;)V Mr
ms clear I()Lcom/groupbyinc/flux/action/admin/cluster/node/stats/NodesStatsRequest;uv
mw fs J(Z)Lcom/groupbyinc/flux/action/admin/cluster/node/stats/NodesStatsRequest;yz
m{ timeout h(Lcom/groupbyinc/flux/common/unit/TimeValue;)Lcom/groupbyinc/flux/action/support/nodes/BaseNodesRequest;}~
m *com/groupbyinc/flux/client/node/NodeClient? admin *()Lcom/groupbyinc/flux/client/AdminClient;??
?? &com/groupbyinc/flux/client/AdminClient? cluster 1()Lcom/groupbyinc/flux/client/ClusterAdminClient;???? 0com/groupbyinc/flux/action/LatchedActionListener? S(Lcom/groupbyinc/flux/action/ActionListener;Ljava/util/concurrent/CountDownLatch;)V M?
?? -com/groupbyinc/flux/client/ClusterAdminClient?
nodesStats u(Lcom/groupbyinc/flux/action/admin/cluster/node/stats/NodesStatsRequest;Lcom/groupbyinc/flux/action/ActionListener;)V???? uLcom/groupbyinc/flux/action/ActionListener; +Lcom/groupbyinc/flux/action/ActionListener; latch %Ljava/util/concurrent/CountDownLatch; nodesStatsRequest GLcom/groupbyinc/flux/action/admin/cluster/node/stats/NodesStatsRequest; updateIndicesStats Bcom/groupbyinc/flux/action/admin/indices/stats/IndicesStatsRequest? M ?
?? F()Lcom/groupbyinc/flux/action/admin/indices/stats/IndicesStatsRequest;u?
?? store G(Z)Lcom/groupbyinc/flux/action/admin/indices/stats/IndicesStatsRequest;??
?? indices 1()Lcom/groupbyinc/flux/client/IndicesAdminClient;???? -com/groupbyinc/flux/client/IndicesAdminClient? stats r(Lcom/groupbyinc/flux/action/admin/indices/stats/IndicesStatsRequest;Lcom/groupbyinc/flux/action/ActionListener;)V???? rLcom/groupbyinc/flux/action/ActionListener; indicesStatsRequest DLcom/groupbyinc/flux/action/admin/indices/stats/IndicesStatsRequest; maybeRefresh refresh?_
? 3Skipping ClusterInfoUpdatedJob since it is disabled? java/lang/InterruptedException? java/lang/Exception? Performing ClusterInfoUpdateJob?
?ef
?
??f
? getMillis ()J??
m? java/util/concurrent/TimeUnit? MILLISECONDS Ljava/util/concurrent/TimeUnit;?? ?? await #(JLjava/util/concurrent/TimeUnit;)Z??
h? java/lang/Thread?
currentThread ()Ljava/lang/Thread;??
?? interrupt? ?
?? LFailed to update node information for ClusterInfoUpdateJob within {} timeout? warn?B ?? MFailed to update shard information for ClusterInfoUpdateJob within {} timeout?^_
? java/util/function/Consumer? ? ??? ,Failed executing ClusterInfoService listener? info? ?? e Ljava/lang/InterruptedException; Ljava/lang/Exception; nodeLatch indicesLatch clusterInfo )Lcom/groupbyinc/flux/cluster/ClusterInfo; buildShardLevelInfo(Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;[Lcom/groupbyinc/flux/action/admin/indices/stats/ShardStats;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder;Lcom/groupbyinc/flux/cluster/ClusterState;)V <[Lcom/groupbyinc/flux/action/admin/indices/stats/ShardStats;? 9com/groupbyinc/flux/action/admin/indices/stats/ShardStats? getShardRouting 4()Lcom/groupbyinc/flux/cluster/routing/ShardRouting;?
? getDataPath ?
? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
getStats >()Lcom/groupbyinc/flux/action/admin/indices/stats/CommonStats;
? :com/groupbyinc/flux/action/admin/indices/stats/CommonStats getStore .()Lcom/groupbyinc/flux/index/store/StoreStats;
*com/groupbyinc/flux/index/store/StoreStats sizeInBytes?
shardIdentifierFromRouting F(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)Ljava/lang/String;
a shard: {} size: {} java/lang/Long valueOf (J)Ljava/lang/Long;!"
# 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V ?% ?& J sid Ljava/lang/String; s ;Lcom/groupbyinc/flux/action/admin/indices/stats/ShardStats;
newShardSizes aLcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder; newShardRoutingToDataPath ?Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder; *Lcom/groupbyinc/flux/cluster/ClusterState; fillDiskUsagePerNode ?(Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;Ljava/util/List;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder;)V =com/groupbyinc/flux/action/admin/cluster/node/stats/NodeStats4 getFs )()Lcom/groupbyinc/flux/monitor/fs/FsInfo;67
58 'Unable to retrieve node FS stats for {}: getNode 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;<=
5> getName@ ?
)A
L @ D java/lang/AssertionErrorF
G? getAvailable 1()Lcom/groupbyinc/flux/common/unit/ByteSizeValue;IJ
K -com/groupbyinc/flux/common/unit/ByteSizeValueM getBytesO?
NP tnode: [{}], most available: total disk: {}, available disk: {} / least available: total disk: {}, available disk: {}R getTotalTJ
U o(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V ?W ?X Rnode: [{}] least available path has less than 0 total bytes of disk [{}], skippingZ %com/groupbyinc/flux/cluster/DiskUsage\ getPath^ ?
_ ;(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JJ)V Ma
]b Qnode: [{}] most available path has less than 0 total bytes of disk [{}], skippingd ,Lcom/groupbyinc/flux/monitor/fs/FsInfo$Path; leastAvailablePath mostAvailablePath nodeId nodeName nodeStats ?Lcom/groupbyinc/flux/action/admin/cluster/node/stats/NodeStats; nodeStatsArray QLjava/util/List; Ljava/util/List; newLeastAvaiableUsages newMostAvaiableUsages? ?
r
access$000 r(Lcom/groupbyinc/flux/cluster/InternalClusterInfoService;)Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger; x0
access$100
access$200 e(Lcom/groupbyinc/flux/cluster/InternalClusterInfoService;)Lcom/groupbyinc/flux/threadpool/ThreadPool;
access$300
access$400
access$500
access$600 ;(Lcom/groupbyinc/flux/cluster/InternalClusterInfoService;)Z
access$700
access$800 e(Lcom/groupbyinc/flux/cluster/InternalClusterInfoService;)Lcom/groupbyinc/flux/common/unit/TimeValue;
access$900 access$1000 access$1100 access$1202 ?(Lcom/groupbyinc/flux/cluster/InternalClusterInfoService;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; x1 access$1302 access$1400 access$1500 access$1600 access$1700 access$1800 access$1900 n(Lcom/groupbyinc/flux/cluster/InternalClusterInfoService;)Lcom/groupbyinc/flux/cluster/service/ClusterService; access$2002 access$2102 access$2200 access$2300 access$2400 access$2500 java/lang/Class? desiredAssertionStatus? |
?? cluster.info.update.interval? timeValueSeconds .(J)Lcom/groupbyinc/flux/common/unit/TimeValue;??
m?
Dynamic 6Lcom/groupbyinc/flux/common/settings/Setting$Property;?? #? NodeScope?? #? timeSetting ?(Ljava/lang/String;Lcom/groupbyinc/flux/common/unit/TimeValue;Lcom/groupbyinc/flux/common/unit/TimeValue;[Lcom/groupbyinc/flux/common/settings/Setting$Property;)Lcom/groupbyinc/flux/common/settings/Setting;??
%? cluster.info.update.timeout? positiveTimeSetting ?(Ljava/lang/String;Lcom/groupbyinc/flux/common/unit/TimeValue;[Lcom/groupbyinc/flux/common/settings/Setting$Property;)Lcom/groupbyinc/flux/common/settings/Setting;??
%? Signature Code LocalVariableTable LocalVariableTypeTable LineNumberTable(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/client/node/NodeClient;Ljava/util/function/Consumer;)V
StackMapTable ?(Lcom/groupbyinc/flux/action/ActionListener;)Ljava/util/concurrent/CountDownLatch; ?(Lcom/groupbyinc/flux/action/ActionListener;)Ljava/util/concurrent/CountDownLatch;?(Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;[Lcom/groupbyinc/flux/action/admin/indices/stats/ShardStats;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder;Lcom/groupbyinc/flux/cluster/ClusterState;)V|(Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;Ljava/util/List;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder;)V BootstrapMethods
SourceFile InnerClasses !
1 2 ? 3 4 2 ? 3 B 5 6 B 7 8 ? 9 B : 8 ? 9 B ; 8 ? <