All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.groupbyinc.flux.gateway.PrimaryShardAllocator.class Maven / Gradle / Ivy

There is a newer version: 129
Show newest version
????4?1com/groupbyinc/flux/gateway/PrimaryShardAllocator5com/groupbyinc/flux/gateway/BaseGatewayShardAllocatorPrimaryShardAllocator.java3com/groupbyinc/flux/gateway/PrimaryShardAllocator$1=com/groupbyinc/flux/gateway/PrimaryShardAllocator$DecidedNodeDecidedNodeAcom/groupbyinc/flux/gateway/PrimaryShardAllocator$NodesToAllocateNodesToAllocateBcom/groupbyinc/flux/gateway/PrimaryShardAllocator$NodeShardsResultNodeShardsResult[com/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShardsBcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShardsNodeGatewayStartedShards7com/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult+com/groupbyinc/flux/gateway/AsyncShardFetchFetchResultRcom/groupbyinc/flux/cluster/routing/allocation/NodeAllocationResult$ShardStoreInfoCcom/groupbyinc/flux/cluster/routing/allocation/NodeAllocationResultShardStoreInfoCcom/groupbyinc/flux/cluster/routing/UnassignedInfo$AllocationStatus 2com/groupbyinc/flux/cluster/routing/UnassignedInfo"AllocationStatus7com/groupbyinc/flux/cluster/routing/RecoverySource$Type%2com/groupbyinc/flux/cluster/routing/RecoverySource'TypeDcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type*?com/groupbyinc/flux/cluster/routing/allocation/decider/Decision,%java/lang/invoke/MethodHandles$Lookup.java/lang/invoke/MethodHandles0Lookup#NO_STORE_EXCEPTION_FIRST_COMPARATORLjava/util/Comparator;uLjava/util/Comparator;PRIMARY_FIRST_COMPARATOR$assertionsDisabledZ1(Lcom/groupbyinc/flux/common/settings/Settings;)V9:
;this3Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator;settings.Lcom/groupbyinc/flux/common/settings/Settings;isResponsibleFor5(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)Z0com/groupbyinc/flux/cluster/routing/ShardRoutingCprimary()ZEF
DG
unassignedIF
DJrecoverySource6()Lcom/groupbyinc/flux/cluster/routing/RecoverySource;LM
DNgetType;()Lcom/groupbyinc/flux/cluster/routing/RecoverySource$Type;PQ
(REXISTING_STORE9Lcom/groupbyinc/flux/cluster/routing/RecoverySource$Type;TU	&VSNAPSHOTXU	&Yshard2Lcom/groupbyinc/flux/cluster/routing/ShardRouting;makeAllocationDecision?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;)Lcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;AB
_Icom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecisiona	NOT_TAKENKLcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;cd	be@com/groupbyinc/flux/cluster/routing/allocation/RoutingAllocationg
debugDecisioniF
hj	fetchData?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;lm
nhasDatapF
qsetHasPendingAsyncFetch()Vst
hubuildDecisionsForAllNodes?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Ljava/util/List;wx
yjava/util/List{FETCHING_SHARD_DATAELcom/groupbyinc/flux/cluster/routing/UnassignedInfo$AllocationStatus;}~	!no?(Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$AllocationStatus;Ljava/util/List;)Lcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;??
b?metaData1()Lcom/groupbyinc/flux/cluster/metadata/MetaData;??
h?index#()Lcom/groupbyinc/flux/index/Index;??
D?-com/groupbyinc/flux/cluster/metadata/MetaData?getIndexSafeW(Lcom/groupbyinc/flux/index/Index;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;??
??id()I??
D?2com/groupbyinc/flux/cluster/metadata/IndexMetaData?inSyncAllocationIds(I)Ljava/util/Set;??
??
java/util/Set?78	?isEmpty?F??java/lang/AssertionError?9t
??shardId+()Lcom/groupbyinc/flux/index/shard/ShardId;??
D?getIgnoreNodes:(Lcom/groupbyinc/flux/index/shard/ShardId;)Ljava/util/Set;??
h?buildNodeShardsResult(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;ZLjava/util/Set;Ljava/util/Set;Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;)Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator$NodeShardsResult;??
?orderedAllocationCandidatesLjava/util/List;??	?size??|?L[{}][{}]: found {} allocation candidates of {} based on allocation ids: [{}]?java/lang/Integer?valueOf(I)Ljava/lang/Integer;??
??6com/groupbyinc/flux/common/apache/logging/log4j/Logger?debugo(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V????4[{}][{}]: missing local data, will restore from [{}]?K(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V?????[{}][{}]: not allocating, number_of_allocated_shards_found [{}]?allocationsFoundI??	?NO_VALID_SHARD_COPY?~	!?buildNodeDecisions?(Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator$NodesToAllocate;Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;Ljava/util/Set;)Ljava/util/List;??
?buildNodesToAllocate?(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Ljava/util/List;Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Z)Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator$NodesToAllocate;??
?
yesNodeShards??	?|?get(I)Ljava/lang/Object;??|?7[{}][{}]: allocating [{}] to [{}] on primary allocation?nodeShardState]Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;??		?getNode2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;??
?](Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V????allocationId()Ljava/lang/String;??
?.com/groupbyinc/flux/cluster/node/DiscoveryNode?java/lang/String?throttleNodeShards??	?noNodeShards??	>[{}][{}]: allocating [{}] to [{}] on forced primary allocationI[{}][{}]: throttling allocation [{}] to [{}] on forced primary allocation/[{}][{}]: forced primary allocation denied [{}]B[{}][{}]: throttling allocation [{}] to [{}] on primary allocationhasPendingAsyncFetch
F
hyes?(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Ljava/lang/String;Ljava/util/List;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;

bthrottle](Ljava/util/List;)Lcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;
bDECIDERS_NO~	!?(Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$AllocationStatus;Ljava/util/List;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;?
b
nodeDecisionsWLjava/util/List;decidedNode?Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator$DecidedNode;unassignedShard
allocationBLcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;logger8Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;explain
shardState?Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;9Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;
indexMetaData4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;#Ljava/util/Set;Ljava/util/Set;snapshotRestorenodeShardsResultDLcom/groupbyinc/flux/gateway/PrimaryShardAllocator$NodeShardsResult;enoughAllocationsFoundnodesToAllocateCLcom/groupbyinc/flux/gateway/PrimaryShardAllocator$NodesToAllocate;node0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Ljava/lang/String;	throttlednodeResultsjava/util/ArrayList7
8?java/util/HashSet:
;?java/util/stream/Stream=of.([Ljava/lang/Object;)Ljava/util/stream/Stream;?@>A"java/lang/invoke/LambdaMetafactoryCmetafactory?(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;EF
DGH&(Ljava/lang/Object;)Ljava/lang/Object;Jjava/util/CollectionLstream()Ljava/util/stream/Stream;NOMP	Q+(Ljava/util/List;)Ljava/util/stream/Stream;Sapply()Ljava/util/function/Function;UVWflatMap8(Ljava/util/function/Function;)Ljava/util/stream/Stream;YZ>[lambda$buildNodeDecisions$0?(Ljava/util/Set;Ljava/util/Set;Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator$DecidedNode;)Lcom/groupbyinc/flux/cluster/routing/allocation/NodeAllocationResult;]^
_`?(Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator$DecidedNode;)Lcom/groupbyinc/flux/cluster/routing/allocation/NodeAllocationResult;b=(Ljava/util/Set;Ljava/util/Set;)Ljava/util/function/Function;UdemapgZ>hjava/util/stream/CollectorsjtoList()Ljava/util/stream/Collector;lm
kncollect0(Ljava/util/stream/Collector;)Ljava/lang/Object;pq>raddAll(Ljava/util/Collection;)Ztu|vgetData()Ljava/util/Map;xy
z
java/util/Map|values()Ljava/util/Collection;~}?(Ljava/lang/Object;)Z?lambda$buildNodeDecisions$1o(Ljava/util/Set;Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;)Z??
??`(Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;)Z?test/(Ljava/util/Set;)Ljava/util/function/Predicate;???filter9(Ljava/util/function/Predicate;)Ljava/util/stream/Stream;??>?lambda$buildNodeDecisions$2?(Ljava/util/Set;Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;)Lcom/groupbyinc/flux/cluster/routing/allocation/NodeAllocationResult;??
???(Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;)Lcom/groupbyinc/flux/cluster/routing/allocation/NodeAllocationResult;?.(Ljava/util/Set;)Ljava/util/function/Function;U??
discoNodesALjava/util/Set;ineligibleShardsuLjava/util/Collection;Ljava/util/Collection;fetchedShardDatashardStoreInfo?(Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;Ljava/util/Set;)Lcom/groupbyinc/flux/cluster/routing/allocation/NodeAllocationResult$ShardStoreInfo;storeException()Ljava/lang/Exception;??
?contains????java/lang/Exception?+(Ljava/lang/String;ZLjava/lang/Exception;)V9?
?storeErrLjava/lang/Exception;inSynciterator()Ljava/util/Iterator;??M?java/util/Iterator?hasNext?F??next()Ljava/lang/Object;????getId??
??0[{}] on node [{}] has no shard state information?trace9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V????([{}] on node [{}] has allocation id [{}]?????6com/groupbyinc/flux/env/ShardLockObtainFailedException??lambda$buildNodeShardsResult$4?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;Ljava/lang/String;)Ljava/lang/Object;??
???(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/logging/log4j/util/Supplier;???W(Lcom/groupbyinc/flux/common/apache/logging/log4j/util/Supplier;Ljava/lang/Throwable;)V????lambda$buildNodeShardsResult$5??
???java/lang/StringBuilder?
???only allow store that can be opened or that throws a ShardLockObtainFailedException while being opened but got a store throwing ?append-(Ljava/lang/String;)Ljava/lang/StringBuilder;??
??-(Ljava/lang/Object;)Ljava/lang/StringBuilder;??
??toString??
??(Ljava/lang/Object;)V9?
??add??|?lambda$buildNodeShardsResult$6?(Ljava/util/Set;Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;)Ljava/lang/Boolean;??
??r(Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;)Ljava/lang/Boolean;??java/util/Comparator?	comparing5(Ljava/util/function/Function;)Ljava/util/Comparator;?reversed()Ljava/util/Comparator;?34	
thenComparing.(Ljava/util/Comparator;)Ljava/util/Comparator;
?64	sort(Ljava/util/Comparator;)V|isTraceEnabledF? {} candidates for allocation: {}|Plambda$buildNodeShardsResult$7q(Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;)Ljava/lang/String;
W, !joining6(Ljava/lang/CharSequence;)Ljava/util/stream/Collector;#$
k%(Ljava/util/List;I)V9'
(finalAllocationIdmatchingAllocationsFirst
comparator
matchAnyShardignoreNodesnodeShardStatesoLjava/util/List;numberOfAllocationsFound|?routingNodes4()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;34
h50com/groupbyinc/flux/cluster/routing/RoutingNodes7E(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/RoutingNode;29
8:/com/groupbyinc/flux/cluster/routing/RoutingNode<decidersM()Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDeciders;>?
h@Icom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDecidersBcanForceAllocatePrimary?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/RoutingNode;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision;DE
CFcanAllocateHE
CI?(Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision;Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator$1;)V9K
	LtypeH()Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type;NO
-PTHROTTLEFLcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type;RS	+TNOVS	+Wjava/util/CollectionsYunmodifiableList"(Ljava/util/List;)Ljava/util/List;[\
Z]3(Ljava/util/List;Ljava/util/List;Ljava/util/List;)V9_
`1Lcom/groupbyinc/flux/cluster/routing/RoutingNode;decisionALcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision;shardRouting
forceAllocateQLjava/util/List;throttledNodeShardsgetNamei?
?jsjava/lang/Booleanm(Z)Ljava/lang/Boolean;?o
npstateLcom/groupbyinc/flux/common/apache/logging/log4j/message/ParameterizedMessagesf[{}] on node [{}] has allocation id [{}] but the store can not be opened, treating as no allocation idujava/lang/Objectw((Ljava/lang/String;[Ljava/lang/Object;)V9y
tzp[{}] on node [{}] has allocation id [{}] but the store can not be opened as it's locked, treating as valid shard|lambda$static$3??
?(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Lcom/groupbyinc/flux/cluster/routing/allocation/NodeAllocationResult$ShardStoreInfo;Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision;)V9?
?	shardData??cd		?dnodejava/lang/Class?desiredAssertionStatus?F
??~?
??W
G?	W	SignatureCodeLocalVariableTableLineNumberTable
StackMapTableLocalVariableTypeTableW(Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator$NodesToAllocate;Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;Ljava/util/Set;)Ljava/util/List;?(Lcom/groupbyinc/flux/gateway/TransportNodesListGatewayStartedShards$NodeGatewayStartedShards;Ljava/util/Set;)Lcom/groupbyinc/flux/cluster/routing/allocation/NodeAllocationResult$ShardStoreInfo;?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;ZLjava/util/Set;Ljava/util/Set;Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;)Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator$NodeShardsResult;)(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Ljava/util/List;Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Z)Lcom/groupbyinc/flux/gateway/PrimaryShardAllocator$NodesToAllocate;(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;BootstrapMethods
SourceFileInnerClasses!34?564?5789:?>*+??@?
FG
AB?t.*?H?(*?K?!*?O?S?W?*?O?S?Z????.[\?MNPQ-M?(@]^???+?`??f?,?k6*+,?o:?r? ,?v:?*+,?z:?????,??+????:+????:+?O?S?Z??6????????Y???+,+????-??:		??????6
-?+??+????	??????+??
?V?-?+??+????+?O???f?-?+??+????	?Ӹ¹?????ڧ???*,	??+??:::
6????F?????	:-?+??+????+???????:???:
?????????????*,	??+??:????E?????	:??:-+??+????+?????:??:
?e?????#-+??+????+????6?8-+??+????+??? -	+??+????+????6:???:,????????
???	???????(?Z0?/?(???=>?\? !?"#?$8?%'Kc()VX?+jD,8?-.	?/8
4z017w23:t?4
=q58iE6??*(?%&VX?*iE6?2LXZ]^_!`%a(b-c5e>jKkVljn?p?q?p?r?s?t?s?v?w?y?z?y?{????	???"?&?4?7?:?=?J?Z?^?q?v??????????????????????????&?+?1?6?A?I?N?^?c?f?i?n?y????????????????)|??(??@??%@?Im!?Dh???!|?fDh??????v,?|

??????8Y?9N*?{?;Y?<:-?|Y*??SY*??SY*?S?B?X?\,?f?i?o?s?M?wW+?{???Q?????o?s?M:?+?{??:-?Q,???i?o?s?M?wW-??Hl?+????01??'??+?6??&???>l???????&??*?6?&???B????7?D?I?T?Z?t????????????????|?
M??
????-*??M*???+*??????>?Y*??,????*-??-?+(???8?-?*?????
??@?????k
??8Y?9:6?{????:??????:		??:
	??:,
?ù?????	???0??*	????Y?*	?????D:	???ϙ*	??	?????*	??	????:?[???6	???.	???Ϛ#??Y??Y????	???????-	?????
	??W????*-????:		?	?
??
:??	??
:???**?? ?i"?&?s???Y?)????=*4:?23
A??43???	<+4	P,4?[\?-8?.+??+?%'?"#	?/??1?`F,4?H<+5	P,5?.*??*?%&	?/0`F,5??#?	??3?:?A?O?R?Z?_?r?????	?
????	%(,5<PS`"i$s%?'?3
?|??4???'??=?	?*??9?????G
Ի8Y?9:?8Y?9:?8Y?9:,?2:???????:	+?6	??ö;:

?????+?A-
+?G?+?A-
+?J:?	Y	?M:?Q?U???W?%?Q?X???W?
??W??i?Y?^?^?^?a??zJp2b
rHcd?:9???	?=>? !?/??e\?f8	????h?????*?/0	??g?hg??g?N1	23495J6O7R:f;r<?=?>???@?B?D?E?F?E?]?#	h|D|||??.=J-?'-	?		h|D|||????lm??
?2*??k??l??%
???B*+?????q???+r??
???\?tYv?xY*SY+??SY,S?{?? [\??*4?
???\?tY}?xY*SY+??SY,S?{?? [\??*4?
~??E*?????q??r????@
???F?Y+??+*???????+????
???R*+????????+?????@
]^?s)*,????W?Y,???,??+??,?????? )?+)?+)?????(??t?h1???????????	???????C?? ?%?0??@?f
IKRTIKacI???IK??I???I???IK??IKIK??IK????Z	



		!#$@&()@+-)@/12




© 2015 - 2025 Weber Informatics LLC | Privacy Policy