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

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

There is a newer version: 129
Show newest version
????4?1com/groupbyinc/flux/gateway/ReplicaShardAllocator5com/groupbyinc/flux/gateway/BaseGatewayShardAllocatorReplicaShardAllocator.java?com/groupbyinc/flux/gateway/ReplicaShardAllocator$MatchingNodes
MatchingNodes7com/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult	+com/groupbyinc/flux/gateway/AsyncShardFetchFetchResultYcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaDataFcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaDataStoreFilesMetaData]com/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$NodeStoreFilesMetaDataNodeStoreFilesMetaDatajava/util/Map$Entry
java/util/MapEntryRcom/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"AllocationStatus9com/groupbyinc/flux/cluster/routing/UnassignedInfo$Reason%ReasonDcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type(?com/groupbyinc/flux/cluster/routing/allocation/decider/Decision*Type%java/lang/invoke/MethodHandles$Lookup-java/lang/invoke/MethodHandles/Lookup$assertionsDisabledZ1(Lcom/groupbyinc/flux/common/settings/Settings;)V45
6this3Lcom/groupbyinc/flux/gateway/ReplicaShardAllocator;settings.Lcom/groupbyinc/flux/common/settings/Settings;processExistingRecoveriesE(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)V@com/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation>metaData1()Lcom/groupbyinc/flux/cluster/metadata/MetaData;@A
?BroutingNodes4()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;DE
?Fjava/util/ArrayListH()V4J
IK0com/groupbyinc/flux/cluster/routing/RoutingNodesMiterator()Ljava/util/Iterator;OP
NQ-com/groupbyinc/flux/cluster/metadata/MetaDataSjava/util/ListUjava/util/IteratorWhasNext()ZYZX[next()Ljava/lang/Object;]^X_/com/groupbyinc/flux/cluster/routing/RoutingNodea
bQ0com/groupbyinc/flux/cluster/routing/ShardRoutingdprimaryfZ
eginitializingiZ
ejrelocatingNodeId()Ljava/lang/String;lm
enunassignedInfo6()Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo;pq
er	getReason=()Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$Reason;tu
#v
INDEX_CREATED;Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$Reason;xy	&z	fetchData?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;|}
~hasData?Z

?logger8Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;??	?.{}: fetching new stores for initializing shard?6com/groupbyinc/flux/common/apache/logging/log4j/Logger?trace'(Ljava/lang/String;Ljava/lang/Object;)V????shardId+()Lcom/groupbyinc/flux/index/shard/ShardId;??
e?
activePrimary](Lcom/groupbyinc/flux/index/shard/ShardId;)Lcom/groupbyinc/flux/cluster/routing/ShardRouting;??
N?23	?java/lang/AssertionError?[the replica shard can be allocated on at least one node, so there must be an active primary?(Ljava/lang/Object;)V4?
??	findStore
(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;)Lcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaData;??
?V{}: no primary shard store found or allocated, letting actual allocation figure it out?findMatchingNodesL(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Lcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaData;Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;Z)Lcom/groupbyinc/flux/gateway/ReplicaShardAllocator$MatchingNodes;??
?getNodeWithHighestMatch2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;??
?nodes3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;??
??
currentNodeId?m
e?/com/groupbyinc/flux/cluster/node/DiscoveryNodes?getD(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;??
??getData()Ljava/util/Map;??

?containsKey(Ljava/lang/Object;)Z???&(Ljava/lang/Object;)Ljava/lang/Object;???storeFilesMetaData]()Lcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaData;??
?syncId?m
?.com/groupbyinc/flux/cluster/node/DiscoveryNode?java/lang/String?equals??
??java/util/Objects?'(Ljava/lang/Object;Ljava/lang/Object;)Z??
??isNodeMatchBySyncID3(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)Z??
?Jcancelling allocation of replica on [{}], sync id match found on node [{}]?debug9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V????REALLOCATED_REPLICA?y	&?java/lang/StringBuilder?
?K#existing allocation of replica to [?append-(Ljava/lang/String;)Ljava/lang/StringBuilder;??
??-(Ljava/lang/Object;)Ljava/lang/StringBuilder;??
??*] cancelled, sync id match found on node [?]?toString?m
??getCurrentNanoTime()J??
??java/lang/System?currentTimeMillis??
?
NO_ATTEMPTELcom/groupbyinc/flux/cluster/routing/UnassignedInfo$AllocationStatus;	!?(Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$Reason;Ljava/lang/String;Ljava/lang/Exception;IJJZLcom/groupbyinc/flux/cluster/routing/UnassignedInfo$AllocationStatus;)V4
#"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;


J"lambda$processExistingRecoveries$0(Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo;Lcom/groupbyinc/flux/cluster/metadata/MetaData;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)V
runR(Lcom/groupbyinc/flux/gateway/ReplicaShardAllocator;Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo;Lcom/groupbyinc/flux/cluster/metadata/MetaData;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Ljava/lang/Runnable;add?VVQjava/lang/RunnableJ 
currentSyncIdLjava/lang/String;4Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo;currentNode0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;nodeWithHighestMatchshardStores?Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;9Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;primaryShard2Lcom/groupbyinc/flux/cluster/routing/ShardRouting;primaryStore[Lcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaData;
matchingNodesALcom/groupbyinc/flux/gateway/ReplicaShardAllocator$MatchingNodes;shardroutingNode1Lcom/groupbyinc/flux/cluster/routing/RoutingNode;actionLjava/lang/Runnable;
allocationBLcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;/Lcom/groupbyinc/flux/cluster/metadata/MetaData;2Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;shardCancellationActions&Ljava/util/List;Ljava/util/List;isResponsibleFor5(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)Z
unassigned?Z
e@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;=>
DIcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecisionF	NOT_TAKENKLcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;HI	GJ
debugDecisionLZ
?McanBeAllocatedToAtLeastOneNode?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Lcom/groupbyinc/flux/common/collect/Tuple;OP
Q(com/groupbyinc/flux/common/collect/TupleSv1U^
TVtypeH()Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type;XY
+ZYESFLcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type;\]	)^hasInitiatedFetching`>
a7{}: ignoring allocation, can't be allocated on any nodecfromDecision?(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type;)Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$AllocationStatus;ef
!gv2i^
Tjvalues()Ljava/util/Collection;lmn(Ljava/util/Collection;)V4p
Iqno?(Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$AllocationStatus;Ljava/util/List;)Lcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;st
Gu4{}: ignoring allocation, still fetching shard storeswsetHasPendingAsyncFetchyJ
?zbuildDecisionsForAllNodes?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Ljava/util/List;|}
~FETCHING_SHARD_DATA?	!??primary should only be null here if we are in explain mode, so we didn't exit early when canBeAllocatedToAtLeastOneNode didn't return a YES decision?
access$000R(Lcom/groupbyinc/flux/gateway/ReplicaShardAllocator$MatchingNodes;)Ljava/util/Map;??
?7in explain mode, we must have individual node decisions? augmentExplanationsWithStoreInfo0(Ljava/util/Map;Ljava/util/Map;)Ljava/util/List;??
?getId?m
??nodeE(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/RoutingNode;??
N?decidersM()Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDeciders;??
??Icom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDeciders?canAllocate?(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;??
??THROTTLE?]	)?_[{}][{}]: throttling allocation [{}] to [{}] in order to reuse its unallocated persistent store?index#()Lcom/groupbyinc/flux/index/Index;??
e?id()I??
e?java/lang/Integer?valueOf(I)Ljava/lang/Integer;??
????
b?](Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V????throttle](Ljava/util/List;)Lcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;??
G?T[{}][{}]: allocating [{}] to [{}] in order to reuse its unallocated persistent store?yes?(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Ljava/lang/String;Ljava/util/List;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;??
G?
hasAnyData?Z
?	isDelayed?Z
#?!{}: allocation of [{}] is delayed?W(Lcom/groupbyinc/flux/index/Index;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;??
T?'INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING-Lcom/groupbyinc/flux/common/settings/Setting;??	#?2com/groupbyinc/flux/cluster/metadata/IndexMetaData?getSettings0()Lcom/groupbyinc/flux/common/settings/Settings;??
??+com/groupbyinc/flux/common/settings/Setting?B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object;??
??)com/groupbyinc/flux/common/unit/TimeValue?	getMillis??
??nanoTime??
??getRemainingDelay2(JLcom/groupbyinc/flux/common/settings/Settings;)J??
#?timeValueNanos.(J)Lcom/groupbyinc/flux/common/unit/TimeValue;??
??millis??
??delayed_(JJLjava/util/List;)Lcom/groupbyinc/flux/cluster/routing/allocation/AllocateUnassignedDecision;??
G?
nodeDecisionsWLjava/util/List;decisionALcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision;metadata
indexMetaData4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;remainingDelayNanosJremainingDelayMillistotalDelayMillisunassignedShardexplainresult?Lcom/groupbyinc/flux/common/collect/Tuple;>;*Lcom/groupbyinc/flux/common/collect/Tuple;allocateDecisionNO?	+java/util/HashMap
KgetDataNodes7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;

?3com/groupbyinc/flux/common/collect/ImmutableOpenMap@()Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectContainer;l
;CLcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectCursor;madeDecisionhLjava/util/Map;Ljava/util/Map;entrySet()Ljava/util/Set;234
java/util/Set67QgetKey9^:getValue<^=entrynLjava/util/Map$Entry;Ljava/util/Map$Entry;withShardStores	augmented
?KdataprimaryNodeprimaryNodeFilesStore_Lcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$NodeStoreFilesMetaData;>com/groupbyinc/flux/common/carrotsearch/hppc/ObjectLongHashMapI
JK:com/groupbyinc/flux/common/carrotsearch/hppc/ObjectLongMapLisEmptyNZ
O????????computeMatchingBytes?(Lcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaData;Lcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaData;)JST
U(J)V4W
X(Ljava/lang/Object;J)J(ZM[isTraceEnabled]Z?^???????,{}: node [{}] has same sync id {} as primarybgetNamedm
?eK(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V?g?h1{}: node [{}] has [{}/{}] bytes of re-usable dataj-com/groupbyinc/flux/common/unit/ByteSizeValuel
mXjava/lang/Longo(J)Ljava/lang/Long;?q
pr???tN(Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectLongMap;Ljava/util/Map;)V4v
wshardStoreInfoTLcom/groupbyinc/flux/cluster/routing/allocation/NodeAllocationResult$ShardStoreInfo;	discoNode
matchingBytesnodeStoreEntry?Ljava/util/Map$Entry;nodesToSizenLcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectLongMap;()Lcom/groupbyinc/flux/cluster/routing/RoutingChangesObserver;??
??	failShard(Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo;Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;Lcom/groupbyinc/flux/cluster/routing/RoutingChangesObserver;)V??
N?java/lang/Class?desiredAssertionStatus?Z
??CodeLocalVariableTableLineNumberTableLocalVariableTypeTable
StackMapTable	SignatureK(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Lcom/groupbyinc/flux/common/collect/Tuple;>;)(Ljava/util/Map;Ljava/util/Map;)Ljava/util/List;k(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;)Lcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaData;?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Lcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaData;Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;Z)Lcom/groupbyinc/flux/gateway/ReplicaShardAllocator$MatchingNodes;(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult;BootstrapMethods
SourceFileInnerClasses!23
45?>*+?7??89:;?
<=<=??+?CM+?GN?IY?L:-?R:?\???`?b:?c:?\???`?e:?h?????k?????o?????s??s?w?{????*+?:		???*????????+?G????:
???
?
??Y????*
+	??:?*???????O*+	??:????+??????:
??:	??
???	??
????ɶ?:?:
?Ӛz?̸ؚm?ܙc*???
???#Y???Y????
??????????+?????:*-,+??W??t??T?:?\??`?:?!?????;"#?p$?%&
?'&A?"#?3(*	?
+,
??-.??/0Lv1,/?23?45?89?67?@8
?D9?:<??3()	?:;??+EF
GH/ILJTKWM_NbPjQmU?V?Y?Z?[?\?_?`?a?b?e?f?i?jklo$p>rAtOu\vbyq{?}????????????????TNVX?bX? e

? 
?"e??S???????TNVXbX???X?
=>?b!*?h?*?A?*?s?w?{????!1,???? ??@BC?P]+?E??K?,?G:,?N6*+,?R:?W?+:?[?_?F?*+?b?9-d+???[?h?k??IY?k??o?r??v?*+,?:???*-x+??,?{:	?*+,?:	??	?v?+????:		?9??????Y?????[?h?IY?k??o?r?v?*	,??:

?-?+???K?*+,
??:?????????Y????*?k?????:?[?_??[?h?v????s,?G??????:
,??+
,??:?[???#-?+??+????+
???????-?+??+????+
????
??????Ěs+?s?Ǚi-?+??+??	7	7?F+?s:,?C:+????:???ֶ??ݶ?7???ֶ?7???7??K?????<	?_'3
?R??=p$7?8#,??E
??U??R??]89]?,]67]??LD9F?3>)4??(*??+,	?^-.
>/0P
?<?*???	>?()P
????<??????)?;?A?K?U?s?w???????????????????????????????
???=?P?[?i?q???????????????????????????????#?6?E?O?Y????5e??NT+p!?e??NT+!V?-
V??%e??+?+V?Pb+?&?me??NT+
eV?	
e??NT+
eVOP??
ײN,?N6?
?Y?	?:,???
??:?\???`?:,?G??ζ???:????,??+,??:		?[?_? -?[?_??		N?#	??-?[?!?	?[???	N??$?Y??	?'?+W??`-???\	Wv?3la??	C?,.?89?1,?67?/?
??3??1?C?,-??0?J??
??C?W\_l???
??
?????-	?+@?X?1b?,+? ??????0o+?,???IY?LN+?5?8:?\?G?`?:,?;???-,?;???W?-?>?W???-??455?Ao89o?1oB1]C<?*55?@o?0oB0]C??&	
 5!E"\$j&m'??VX?<?
???????F???+?????Y?D?,??+????:??-?????:???ɰ?>F89F1,F67FE*"$F&9
GH?FE)?"./"0'1)394>5@7??????????I?JY?K:?
?Y?	?:???5?8:?\?
?`?:		?;??:
	?>???:?P????,?G
????:????,??+,??:
Q7?0-?V7?Y?Y:?$?Y

?'?+W
?[?!???_	??-?V7
?\X*???_?F`??*??c+
?f?̹i?#*??k+
?f?mY?n?s?u???Y?x????yzN?{&
]??.v??3????
??|?B?}A	I89I1,I67I-.IE*I?3	@?.?1?*B?}~	IE)	@?.?0?v>	?@BANB]DeEhHvI{J~P?R?S?T?U?V?Y?Z?]?^?`?a?bce$f5e:i=k?T?M@?X?;??b?C+
:?	e?
MX???
ST?	g*??M+??N-?-,???`?	7+??:?\?:?`??:??:*???*?????
??a7?????H@!?#9(??J??g-.g?.b?#
]?#?.pq
stvw9x@yWza|d}?????X=?|}??`>?u+*??,-,??????????>89D91,p$@867??J?4????????9?@???R


				!#$@&#'@)+,@.01




© 2015 - 2025 Weber Informatics LLC | Privacy Policy