com.groupbyinc.flux.discovery.zen.PendingClusterStatesQueue.class Maven / Gradle / Ivy
???? 42 ;com/groupbyinc/flux/discovery/zen/PendingClusterStatesQueue java/lang/Object PendingClusterStatesQueue.java Ocom/groupbyinc/flux/discovery/zen/PendingClusterStatesQueue$ClusterStateContext ClusterStateContext Rcom/groupbyinc/flux/discovery/zen/PendingClusterStatesQueue$StateProcessedListener StateProcessedListener
pendingStates Ljava/util/ArrayList; hLjava/util/ArrayList; logger !Lorg/apache/logging/log4j/Logger; maxQueueSize I $assertionsDisabled Z %(Lorg/apache/logging/log4j/Logger;I)V ()V
java/util/ArrayList
! this =Lcom/groupbyinc/flux/discovery/zen/PendingClusterStatesQueue;
addPending -(Lcom/groupbyinc/flux/cluster/ClusterState;)V &
' add (Ljava/lang/Object;)Z ) *
+ size ()I - .
/ remove (I)Ljava/lang/Object; 1 2
3 ;dropping pending state [{}]. more than [{}] pending states. 5 java/lang/Integer 7 valueOf (I)Ljava/lang/Integer; 9 :
8 ; org/apache/logging/log4j/Logger = warn 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V ? @ > A committed ()Z C D
E listener TLcom/groupbyinc/flux/discovery/zen/PendingClusterStatesQueue$StateProcessedListener; G H I *com/groupbyinc/flux/ElasticsearchException K &too many pending states ([{}] pending) M ((Ljava/lang/String;[Ljava/lang/Object;)V O
L P onNewClusterStateFailed (Ljava/lang/Exception;)V R S
T context QLcom/groupbyinc/flux/discovery/zen/PendingClusterStatesQueue$ClusterStateContext; state *Lcom/groupbyinc/flux/cluster/ClusterState; markAsCommitted ?(Ljava/lang/String;Lcom/groupbyinc/flux/discovery/zen/PendingClusterStatesQueue$StateProcessedListener;)Lcom/groupbyinc/flux/cluster/ClusterState; findState e(Ljava/lang/String;)Lcom/groupbyinc/flux/discovery/zen/PendingClusterStatesQueue$ClusterStateContext; \ ]
^ java/lang/IllegalStateException ` java/lang/StringBuilder b
c 'can't resolve cluster state with uuid [ e append -(Ljava/lang/String;)Ljava/lang/StringBuilder; g h
c i ] to commit k toString ()Ljava/lang/String; m n
c o (Ljava/lang/String;)V q
a r cluster state with uuid [ t ] is already committed v W(Lcom/groupbyinc/flux/discovery/zen/PendingClusterStatesQueue$StateProcessedListener;)V Z x
y X Y { stateUUID Ljava/lang/String; markAsFailed B(Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/lang/Exception;)V (com/groupbyinc/flux/cluster/ClusterState ? } n
? ? "java/lang/IllegalArgumentException ? .can't resolve failed cluster state with uuid [ ? ], version [ ? version ()J ? ?
? ? (J)Ljava/lang/StringBuilder; g ?
c ? ] ?
? r &failed cluster state is not committed ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; g ?
c ? get ? 2
? equals ? *
?
supersedes -(Lcom/groupbyinc/flux/cluster/ClusterState;)Z ? ?
? ? 1failing committed state {} together with state {} ? debug ? @ > ? removeAll (Ljava/util/Collection;)Z ? ?
? ? java/lang/AssertionError ? Estate was marked as processed but can still be found in pending list ? (Ljava/lang/Object;)V ?
? ? pendingContext pendingState index reason Ljava/lang/Exception;
failedContext statesToRemove markAsProcessed 1can't resolve processed cluster state with uuid [ ? nodes 3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; ? ?
? ? /com/groupbyinc/flux/cluster/node/DiscoveryNodes ?
getMasterNode 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; ? ?
? ? ,processed cluster state mast have a master. ? .com/groupbyinc/flux/cluster/node/DiscoveryNode ? java/util/Objects ? '(Ljava/lang/Object;Ljava/lang/Object;)Z ? ?
? ? {received a cluster state (uuid[{}]/v[{}]) from a different master than the current one, rejecting (received {}, current {}) ? java/lang/Long ? (J)Ljava/lang/Long; 9 ?
? ? ](Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V ? ? > ? Pcluster state from a different master than the current one, rejecting (received ?
, current ? ) ? iremoving non-committed state with uuid[{}]/v[{}] from [{}] - a state from [{}] was successfully processed ? trace ? ? > ? java/lang/String ?
? ? )processed cluster state is not committed ? onNewClusterStateProcessed ?
? Jprocessing pending state uuid[{}]/v[{}] together with state uuid[{}]/v[{}] ? pendingMasterNode 0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;
currentMaster contextsToRemove
? i failAllStatesAndClear iterator ()Ljava/util/Iterator; ? ?
? java/util/Iterator ? hasNext ? D ? next ()Ljava/lang/Object; ? clear
getNextClusterStateToProcess ,()Lcom/groupbyinc/flux/cluster/ClusterState; isEmpty D
2should only return committed cluster state. found potentialState stateToProcess pendingClusterStates -()[Lcom/groupbyinc/flux/cluster/ClusterState; toArray (([Ljava/lang/Object;)[Ljava/lang/Object;
+[Lcom/groupbyinc/flux/cluster/ClusterState; states ALjava/util/ArrayList; stats >()Lcom/groupbyinc/flux/discovery/zen/PendingClusterStateStats; :com/groupbyinc/flux/discovery/zen/PendingClusterStateStats (III)V
! clusterStatsContext java/lang/Class% desiredAssertionStatus' D
&( Signature Code LocalVariableTable LineNumberTable
StackMapTable LocalVariableTypeTable
SourceFile InnerClasses !
* + h *? *? Y? ? *+? *? "? , # $ - @ <