
com.groupbyinc.flux.discovery.zen.PublishClusterStateAction.class Maven / Gradle / Ivy
???? 4% ;com/groupbyinc/flux/discovery/zen/PublishClusterStateAction 6com/groupbyinc/flux/common/component/AbstractComponent PublishClusterStateAction.java Mcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$SendingController SendingController Ucom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$CommitClusterStateRequest CommitClusterStateRequest \com/groupbyinc/flux/discovery/zen/PublishClusterStateAction$CommitClusterStateRequestHandler CommitClusterStateRequestHandler Zcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$SendClusterStateRequestHandler SendClusterStateRequestHandler Xcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$IncomingClusterStateListener IncomingClusterStateListener =com/groupbyinc/flux/discovery/zen/PublishClusterStateAction$3 =com/groupbyinc/flux/discovery/zen/PublishClusterStateAction$2 =com/groupbyinc/flux/discovery/zen/PublishClusterStateAction$1 3com/groupbyinc/flux/discovery/Discovery$AckListener 'com/groupbyinc/flux/discovery/Discovery AckListener Kcom/groupbyinc/flux/discovery/Discovery$FailedToCommitClusterStateException #FailedToCommitClusterStateException /com/groupbyinc/flux/threadpool/ThreadPool$Names # )com/groupbyinc/flux/threadpool/ThreadPool % Names =com/groupbyinc/flux/transport/TransportRequestOptions$Builder ( 5com/groupbyinc/flux/transport/TransportRequestOptions * Builder :com/groupbyinc/flux/transport/TransportRequestOptions$Type - Type 5com/groupbyinc/flux/transport/TransportResponse$Empty 0 /com/groupbyinc/flux/transport/TransportResponse 2 Empty %java/lang/invoke/MethodHandles$Lookup 5 java/lang/invoke/MethodHandles 7 Lookup SEND_ACTION_NAME Ljava/lang/String; #internal:discovery/zen/publish/send < COMMIT_ACTION_NAME %internal:discovery/zen/publish/commit ? transportService 0Lcom/groupbyinc/flux/transport/TransportService; namedWriteableRegistry =Lcom/groupbyinc/flux/common/io/stream/NamedWriteableRegistry; incomingClusterStateListener ZLcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$IncomingClusterStateListener; discoverySettings 1Lcom/groupbyinc/flux/discovery/DiscoverySettings; fullClusterStateReceivedCount (Ljava/util/concurrent/atomic/AtomicLong; )incompatibleClusterStateDiffReceivedCount 'compatibleClusterStateDiffReceivedCount lastSeenClusterStateMutex Ljava/lang/Object; lastSeenClusterState *Lcom/groupbyinc/flux/cluster/ClusterState; $assertionsDisabled Z )(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/transport/TransportService;Lcom/groupbyinc/flux/common/io/stream/NamedWriteableRegistry;Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$IncomingClusterStateListener;Lcom/groupbyinc/flux/discovery/DiscoverySettings;)V 1(Lcom/groupbyinc/flux/common/settings/Settings;)V S U
V &java/util/concurrent/atomic/AtomicLong X ()V S Z
Y [ I J ] K J _ L J a java/lang/Object c
d [ M N f A B h C D j E F l G H n "java/lang/invoke/LambdaMetafactory p 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; r s
q t u ()Ljava/lang/Object; w 3com/groupbyinc/flux/transport/BytesTransportRequest y
z [ { 7()Lcom/groupbyinc/flux/transport/BytesTransportRequest; } get ()Ljava/util/function/Supplier; ? ? same ? (Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction;Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$1;)V S ?
? .com/groupbyinc/flux/transport/TransportService ? registerRequestHandler }(Ljava/lang/String;Ljava/util/function/Supplier;Ljava/lang/String;ZZLcom/groupbyinc/flux/transport/TransportRequestHandler;)V ? ?
? ?
[ ? Y()Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$CommitClusterStateRequest; ? ?
? this =Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction; settings .Lcom/groupbyinc/flux/common/settings/Settings; publish j(Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;ILcom/groupbyinc/flux/discovery/Discovery$AckListener;)V java/lang/Exception ? /com/groupbyinc/flux/cluster/ClusterChangedEvent ? state ,()Lcom/groupbyinc/flux/cluster/ClusterState; ? ?
? ? (com/groupbyinc/flux/cluster/ClusterState ? nodes 3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; ? ?
? ? java/util/HashSet ? /com/groupbyinc/flux/cluster/node/DiscoveryNodes ? getSize ()I ? ?
? ? (I)V S ?
? ? getLocalNode 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; ? ?
? ? getMasterNodes 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; ? ?
? ? 3com/groupbyinc/flux/common/collect/ImmutableOpenMap ? size ? ?
? ? iterator ()Ljava/util/Iterator; ? ?
? ?
java/util/Set ? .com/groupbyinc/flux/cluster/node/DiscoveryNode ? java/util/Iterator ? hasNext ()Z ? ? ? ? next ? w ? ? equals (Ljava/lang/Object;)Z ? ?
? ? add ? ? ? ? /com/groupbyinc/flux/discovery/DiscoverySettings ? getPublishDiff ? ?
? ?
previousState ? ?
? ? java/util/HashMap ?
? [ buildDiffAndSerializeStates ?(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/util/Set;ZLjava/util/Map;Ljava/util/Map;)V ? ?
? Ccom/groupbyinc/flux/discovery/AckClusterStatePublishResponseHandler ? G(Ljava/util/Set;Lcom/groupbyinc/flux/discovery/Discovery$AckListener;)V S ?
? ? ?(Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction;Lcom/groupbyinc/flux/cluster/ClusterState;IILcom/groupbyinc/flux/discovery/BlockingClusterStatePublishResponseHandler;Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$1;)V S ?
? +unexpected error while preparing to publish ? =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V S ?
! ?
java/util/Map ? innerPublish ?(Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;Ljava/util/Set;Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$SendingController;Lcom/groupbyinc/flux/discovery/Discovery$AckListener;ZLjava/util/Map;Ljava/util/Map;)V ? ?
? unexpected error ?
access$300 y(Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$SendingController;Ljava/lang/String;Ljava/lang/Exception;)Z ? ?
? node 0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; localNode totalMasterNodes I publishResponseHandler JLcom/groupbyinc/flux/discovery/BlockingClusterStatePublishResponseHandler; 1Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; sendingController OLcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$SendingController; nodesToPublishTo ALjava/util/Set; Ljava/util/Set; serializedStates _Ljava/util/Map; Ljava/util/Map; serializedDiffs sendFullVersion e Ljava/lang/Exception; t MLcom/groupbyinc/flux/discovery/Discovery$FailedToCommitClusterStateException; clusterChangedEvent 1Lcom/groupbyinc/flux/cluster/ClusterChangedEvent; minMasterNodes ackListener 5Lcom/groupbyinc/flux/discovery/Discovery$AckListener; java/lang/InterruptedException getPublishTimeout -()Lcom/groupbyinc/flux/common/unit/TimeValue;
? java/lang/System! nanoTime ()J#$
"% ? ? )com/groupbyinc/flux/common/unit/TimeValue(
nodeExists 3(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)Z*+
?, sendFullClusterState ?(Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/util/Map;Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Lcom/groupbyinc/flux/common/unit/TimeValue;Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$SendingController;)V./
0 sendClusterStateDiff ?(Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/util/Map;Ljava/util/Map;Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Lcom/groupbyinc/flux/common/unit/TimeValue;Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$SendingController;)V23
4 getCommitTimeout6
?7
waitForCommit .(Lcom/groupbyinc/flux/common/unit/TimeValue;)V9:
; timeValueNanos .(J)Lcom/groupbyinc/flux/common/unit/TimeValue;=>
)? onCommitA: B nanosD$
)E java/lang/MathG max (JJ)JIJ
HK getPublishResponseHandler L()Lcom/groupbyinc/flux/discovery/BlockingClusterStatePublishResponseHandler;MN
O Hcom/groupbyinc/flux/discovery/BlockingClusterStatePublishResponseHandlerQ
awaitAllNodes .(Lcom/groupbyinc/flux/common/unit/TimeValue;)ZST
RU setPublishingTimedOut (Z)VWX
Y getPublishingTimedOut[ ?
\ pendingNodes 3()[Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;^_
R` logger !Lorg/apache/logging/log4j/Logger;bc d atimed out waiting for all nodes to process published state [{}] (timeout [{}], pending nodes: {})f versionh$
?i java/lang/Longk valueOf (J)Ljava/lang/Long;mn
lo org/apache/logging/log4j/Loggerq warn K(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Vstru getFailedNodes ()Ljava/util/Set;wx
Ry isEmpty{ ? ?| Opublishing cluster state with version [{}] failed for the following nodes: [{}]~ 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Vs?r? java/lang/Thread?
currentThread ()Ljava/lang/Thread;??
?? interrupt? Z
?? 1[Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; timeLeftInNanos J failedNodes Ljava/lang/InterruptedException; clusterState publishTimeout +Lcom/groupbyinc/flux/common/unit/TimeValue; publishingStartInNanos
commitTime java/io/IOException? com/groupbyinc/flux/cluster/Diff?
getVersion ()Lcom/groupbyinc/flux/Version;??
?? containsKey? ? ?? serializeFullClusterState z(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/common/bytes/BytesReference;??
? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;?? ?? diff N(Lcom/groupbyinc/flux/cluster/ClusterState;)Lcom/groupbyinc/flux/cluster/Diff;??
?? serializeDiffClusterState r(Lcom/groupbyinc/flux/cluster/Diff;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/common/bytes/BytesReference;??
? *com/groupbyinc/flux/ElasticsearchException? ;failed to serialize cluster_state for publishing to node {}?
? ? Ljava/io/IOException; NLcom/groupbyinc/flux/cluster/Diff; "Lcom/groupbyinc/flux/cluster/Diff; &(Ljava/lang/Object;)Ljava/lang/Object; ? ?? /com/groupbyinc/flux/common/bytes/BytesReference? ,()Lorg/apache/logging/log4j/message/Message;? lambda$sendFullClusterState$0 \(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)Lorg/apache/logging/log4j/message/Message;??
?? a(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)Lorg/apache/logging/log4j/util/MessageSupplier; ? ? G(Lorg/apache/logging/log4j/util/MessageSupplier;Ljava/lang/Throwable;)Vs?r? onNodeSendFailed H(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Ljava/lang/Exception;)V??
? sendClusterStateToNode(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/common/bytes/BytesReference;Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Lcom/groupbyinc/flux/common/unit/TimeValue;Lcom/groupbyinc/flux/discovery/zen/PublishClusterStateAction$SendingController;ZLjava/util/Map;)V??
? bytes 1Lcom/groupbyinc/flux/common/bytes/BytesReference; Q R ? java/lang/AssertionError? java/lang/StringBuilder?
? [ (failed to find serialized diff for node ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder;??
?? -(Ljava/lang/Object;)Ljava/lang/StringBuilder;??
??
of version [? ]? toString ()Ljava/lang/String;??
?? (Ljava/lang/Object;)V S?
?? builder A()Lcom/groupbyinc/flux/transport/TransportRequestOptions$Builder;??
+? STATE