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

com.groupbyinc.flux.cluster.routing.IndexShardRoutingTable.class Maven / Gradle / Ivy

There is a newer version: 198
Show newest version
????4?:com/groupbyinc/flux/cluster/routing/IndexShardRoutingTableZLjava/lang/Object;Ljava/lang/Iterable;java/lang/Objectjava/lang/IterableIndexShardRoutingTable.javaBcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable$Builder	BuilderMcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable$AttributesRoutingsAttributesRoutingsHcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable$AttributesKey
AttributesKeyMcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable$NodeRankComparatorNodeRankComparatorCcom/groupbyinc/flux/node/ResponseCollectorService$ComputedNodeStats1com/groupbyinc/flux/node/ResponseCollectorServiceComputedNodeStatsjava/util/Map$Entry
java/util/MapEntry%java/lang/invoke/MethodHandles$Lookupjava/lang/invoke/MethodHandles!Lookupshuffler3Lcom/groupbyinc/flux/cluster/routing/ShardShuffler;shardId)Lcom/groupbyinc/flux/index/shard/ShardId;primary2Lcom/groupbyinc/flux/cluster/routing/ShardRouting;
primaryAsListLjava/util/List;DLjava/util/List;replicasshardsactiveShardsassignedShardsallAllocationIdsLjava/util/Set;#Ljava/util/Set;	NO_SHARDSallShardsStartedZactiveShardsByAttributesLjava/util/Map;?Ljava/util/Map;initializingShardsByAttributesshardsByAttributeMutexLjava/lang/Object;allInitializingShards<(Lcom/groupbyinc/flux/index/shard/ShardId;Ljava/util/List;)V()V>@
Ajava/util/CollectionsCemptyMap()Ljava/util/Map;EF
DG78	I:8	K;<	M&'	O9com/groupbyinc/flux/cluster/routing/RotationShardShufflerQ%com/groupbyinc/flux/common/RandomnessSget()Ljava/util/Random;UV
TWjava/util/RandomYnextInt()I[\
Z](I)V>_
R`$%	bunmodifiableList"(Ljava/util/List;)Ljava/util/List;de
Df.+	hjava/util/ArrayListj
kAjava/util/HashSetm
nAjava/util/Listpiterator()Ljava/util/Iterator;rsqt'com/groupbyinc/flux/index/shard/ShardIdv0com/groupbyinc/flux/cluster/routing/ShardRoutingx
java/util/Setzjava/util/Iterator|hasNext()Z~}?next()Ljava/lang/Object;??}?(
y?add(Ljava/lang/Object;)Z??q?active?
y?initializing?
y?
relocating?
y?getTargetRelocatingShard4()Lcom/groupbyinc/flux/cluster/routing/ShardRouting;??
y?allocationId4()Lcom/groupbyinc/flux/cluster/routing/AllocationId;??
y?0com/groupbyinc/flux/cluster/routing/AllocationId?getId()Ljava/lang/String;??
??{?assignedToNode?
y?state9()Lcom/groupbyinc/flux/cluster/routing/ShardRoutingState;??
y?5com/groupbyinc/flux/cluster/routing/ShardRoutingState?STARTED7Lcom/groupbyinc/flux/cluster/routing/ShardRoutingState;??	??56	?()	?
singletonList$(Ljava/lang/Object;)Ljava/util/List;??
D?*+	?	emptyList()Ljava/util/List;??
D?-+	?/+	?0+	?=+	?unmodifiableSet (Ljava/util/Set;)Ljava/util/Set;??
D?12	?shardthis?
??shardsIt6(I)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;#(Ljava/util/List;I)Ljava/util/List;??
??seedI activeInitializingShardsRandomItnextSeed?\
??activeInitializingShardsIt??
?isEmpty?q?
k`addAll(Ljava/util/Collection;)Z??
korderedILjava/util/ArrayList;Ljava/util/ArrayList; activeInitializingShardsRankedItw(Lcom/groupbyinc/flux/node/ResponseCollectorService;Ljava/util/Map;)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;%Lcom/groupbyinc/flux/common/Nullable;rankShardsAndUpdateStatsd(Ljava/util/List;Lcom/groupbyinc/flux/node/ResponseCollectorService;Ljava/util/Map;)Ljava/util/List;	

	collector3Lcom/groupbyinc/flux/node/ResponseCollectorService;nodeSearchCounts3Ljava/util/Map;rankedActiveShardsrankedInitializingShards
getAllNodeIds!(Ljava/util/List;)Ljava/util/Set;
currentNodeId?
ynodeIdsgetNodeStatsS(Ljava/util/Set;Lcom/groupbyinc/flux/node/ResponseCollectorService;)Ljava/util/Map;java/util/HashMap{?
`{tjava/lang/StringgetNodeStatistics((Ljava/lang/String;)Ljava/util/Optional;!"
#put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;%&'nodeIdLjava/lang/String;	nodeStats~Ljava/util/Map;>;	rankNodes/(Ljava/util/Map;Ljava/util/Map;)Ljava/util/Map;?entrySet()Ljava/util/Set;012getValue4?5java/util/Optional7"java/lang/invoke/LambdaMetafactory9metafactory?(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@lambda$rankNodes$0{(Ljava/util/Map$Entry;Ljava/util/Map;Ljava/util/Map;Lcom/groupbyinc/flux/node/ResponseCollectorService$ComputedNodeStats;)VBC
DEH(Lcom/groupbyinc/flux/node/ResponseCollectorService$ComputedNodeStats;)VGacceptR(Ljava/util/Map$Entry;Ljava/util/Map;Ljava/util/Map;)Ljava/util/function/Consumer;IJK	ifPresent (Ljava/util/function/Consumer;)VMN
8O
maybeStats[Ljava/util/Optional;Ljava/util/Optional;entry?Ljava/util/Map$Entry;>;Ljava/util/Map$Entry;	nodeRanks5Ljava/util/Map;adjustStats?(Lcom/groupbyinc/flux/node/ResponseCollectorService;Ljava/util/Map;Ljava/lang/String;Lcom/groupbyinc/flux/node/ResponseCollectorService$ComputedNodeStats;)VgetKey[?\equals^?
 _	isPresenta
8bU?
8d	queueSizef?	gresponseTimeDij	kserviceTimeoj	paddNodeStatistics(Ljava/lang/String;IJJ)Vrs
tstatsELcom/groupbyinc/flux/node/ResponseCollectorService$ComputedNodeStats;updatedQueueupdatedResponseJupdatedService	minNodeIdminStats
~
?-.
?(Ljava/util/Collection;)V>?
k?(Ljava/util/Map;)V>?
?sort)(Ljava/util/List;Ljava/util/Comparator;)V??
D?
k?(I)Ljava/lang/Object;U?
k?started?
y?&(Ljava/lang/Object;)Ljava/lang/Object;U??YZ
?&!lambda$rankShardsAndUpdateStats$14(Ljava/lang/String;Ljava/lang/Long;)Ljava/lang/Long;??
???apply!()Ljava/util/function/BiFunction;???computeE(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;???
maybeMinStatsminShard	nodeCountsortedShardsnoPrimariesActiveq?primaryShardIt primaryActiveInitializingShardIt?
?4+	???
?&primaryFirstActiveInitializingShardsIt
k?set'(ILjava/lang/Object;)Ljava/lang/Object;??
k?shardRouting replicaActiveInitializingShardItjava/util/LinkedList?
?AaddFirst?@
??addLast?@
??replicaJLjava/util/LinkedList;Ljava/util/LinkedList;&replicaFirstActiveInitializingShardsIt"onlyNodeActiveInitializingShardsItG(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;*onlyNodeSelectorActiveInitializingShardsItx(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;y([Ljava/lang/String;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;??
?nodeAttributesdiscoveryNodes1Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;/com/groupbyinc/flux/cluster/node/DiscoveryNodes?resolveNodes(([Ljava/lang/String;)[Ljava/lang/String;??
??(com/groupbyinc/flux/common/util/set/Sets?
newHashSet(([Ljava/lang/Object;)Ljava/util/HashSet;??
??[Ljava/lang/String;?contains??{?
k?java/util/Locale?ROOTLjava/util/Locale;??	??.no data nodes with %s [%s] found for shard: %s?criteria?[Ljava/lang/Object;?	criterion?,?joinE(Ljava/lang/CharSequence;[Ljava/lang/CharSequence;)Ljava/lang/String;??
 ?formatK(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;??
 ?"java/lang/IllegalArgumentException(Ljava/lang/String;)V>
message
selectedNodes$preferNodeActiveInitializingShardsItD(Ljava/util/Set;)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;	preferrednotPreferredgetClass()Ljava/lang/Class;

w_q_othathashCode\
wqresultgetByAllocationIdF(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/ShardRouting;0?
getAllAllocationIdsgetActiveAttribute?(Lcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable$AttributesKey;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;)Lcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable$AttributesRoutings;collectAttributeShards?(Lcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable$AttributesKey;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;Ljava/util/ArrayList;)Ljava/util/List; 
!#(Ljava/util/List;Ljava/util/List;)V>#

$-com/groupbyinc/flux/common/collect/MapBuilder&
newMapBuilder@(Ljava/util/Map;)Lcom/groupbyinc/flux/common/collect/MapBuilder;()
'*U(Ljava/lang/Object;Ljava/lang/Object;)Lcom/groupbyinc/flux/common/collect/MapBuilder;%,
'-immutableMap/F
'0java/lang/Throwable2fromtokeyJLcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable$AttributesKey;nodes
shardRoutingsOLcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable$AttributesRoutings;getInitializingAttribute
attributes<+	=getLocalNode2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;?@
?A.com/groupbyinc/flux/cluster/node/DiscoveryNodeC
getAttributesEF
DF
ktD(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;UI
?JremoveL@}M	fromShard
discoveryNode0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;HLjava/util/Iterator;Ljava/util/Iterator;localAttributeValue	attribute*preferAttributesActiveInitializingShardsItv(Ljava/util/List;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;w(Ljava/util/List;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;I)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;VX
Y$Ljava/util/List;(Ljava/util/List;)V>\
]
_;
a	totalSizec?	
dwithSameAttributef+	
gwithoutSameAttributei+	
jactiveRoutingsinitializingRoutingsprimaryShard
replicaShardsreplicaShardsWithStateJ([Lcom/groupbyinc/flux/cluster/routing/ShardRoutingState;)Ljava/util/List;8[Lcom/groupbyinc/flux/cluster/routing/ShardRoutingState;r
shardEntrystatesshardsWithStateI(Lcom/groupbyinc/flux/cluster/routing/ShardRoutingState;)Ljava/util/List;INITIALIZINGx?	?y
ttoStringjava/lang/StringBuilder}
~AIndexShardRoutingTable(?append-(Ljava/lang/String;)Ljava/lang/StringBuilder;??
~?-(Ljava/lang/Object;)Ljava/lang/StringBuilder;??
~?){?shortSummary??
y?, ?}?|?
~?isbLjava/lang/StringBuilder;	numShardsjava/lang/Long?	longValue()J??
??valueOf(J)Ljava/lang/Long;??
??idconnsLjava/lang/Long;getOrDefault?&?rank(J)D??
?java/lang/Double?(D)Ljava/lang/Double;??
??	SignatureCodeLocalVariableTableLocalVariableTypeTableLineNumberTable
StackMapTablep(Lcom/groupbyinc/flux/index/shard/ShardId;Ljava/util/List;)VJ()Ljava/util/Iterator;F()Ljava/util/List;?(Lcom/groupbyinc/flux/node/ResponseCollectorService;Ljava/util/Map;)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;"RuntimeVisibleParameterAnnotationsi(Ljava/util/List;)Ljava/util/Set;?(Ljava/util/Set;Lcom/groupbyinc/flux/node/ResponseCollectorService;)Ljava/util/Map;>;?(Ljava/util/Map;>;Ljava/util/Map;)Ljava/util/Map;(Lcom/groupbyinc/flux/node/ResponseCollectorService;Ljava/util/Map;>;Ljava/lang/String;Lcom/groupbyinc/flux/node/ResponseCollectorService$ComputedNodeStats;)V?(Ljava/util/List;Lcom/groupbyinc/flux/node/ResponseCollectorService;Ljava/util/Map;)Ljava/util/List;X(Ljava/util/Set;)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;RuntimeVisibleAnnotations%()Ljava/util/Set;
(Lcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable$AttributesKey;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;Ljava/util/ArrayList;)Ljava/util/List;?(Ljava/util/List;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;?(Ljava/util/List;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;I)Lcom/groupbyinc/flux/cluster/routing/ShardIterator;~([Lcom/groupbyinc/flux/cluster/routing/ShardRoutingState;)Ljava/util/List;}(Lcom/groupbyinc/flux/cluster/routing/ShardRoutingState;)Ljava/util/List;BootstrapMethods
SourceFileInnerClasses!$%&'()*+?,-+?,.+?,/+?,0+?,12?34+?,56B78?9B:8?9;<=+?,4>??(q*?B*?H?J*?H?L*?Y?B?N*+?P*?RY?X?^?a?c*,?g?iN?kY?l:?kY?l:?kY?l:?kY?l:?nY?o:6	,?u:

????
???y:???	N?
??W???
??W???
??W???#????W????????W?????W??????W?????6	??V*	??*-??-?*-?????
*????*?g??*?g??*?g??*?g??*?ʵ̱?p???)q??q&'q.+=4()F+-+O"/+X0+a=+j12m56	?>q.,F+-,O"/,X0,a=,j13??*RHIJS"T3U;W=XFYOZX[a\j]m^?_?`?b?d?e?g?h?j?l?m?o?pqstv"w(x-y1z<|C~LU?^?g?p??;?uwqyqqqq{}?#y	'!?
???&??/*?P?????????/*?Ӱ?????rs?4
*?i?u??
???????\?4
*?i????
?????\?/*?ج?????.??/*?i???????????/*?۰???????/??/*?°??????????/*?ư??????????/*?߰???????0??/*?İ??????????/*?İ??????????A??Y*?P*?c*?i???????????:??Y*?P*?i??????????L??Y*?P*?c*?i?????????????6**?c??????????????f*?ƹ????Y*?P*?c*????밻kY*?¹?*?ƹ?`??M,*?c*????W,*?ƶW??Y*?P,??? f??f???'??'?$?PY?$?[?*?c??>*?ƹ?? ??Y*?P*?c*????+,??밻kY*?¹?*?ƹ?`??:*?c*????+,?:?W*??+,?:?W??Y*?P???H????
?8???M<`)+s+?*?M<`),s,?6
%01MV`hns{??1???

??2?nY?oL*?uM,???,???yN+-???W???+?? "?)2.+*2?2.,*3?#$"%-&0'??{}? ??
??=?Y*??M*?N-??? -??? :,+?$?(W???,??*))*=2=
/+8?=3/+,?-.)/80;1??}?%??
-.?M?Y*?/?M*?3?N-???+-???:?6?8:,+?L?P???,??4:QS.TVM+8M8?W8?4:QR.TUM+,M?WX?67.8:9H=K>??}?0??
YZ???,??+?3?:???????:?]? :?6?8:,?`?Q?c?I?e?:-?h?h`l6	-?l?lc?mm7
-?q?qc?mm7*	
?u??{??pZ<vwh.x?	yyz
?{z3c)*?WQS'oTV?
?+8?|*?}w? ?WQR'oTU?+,?2PQ'R3S?TPUZVhWyX?Y?[?]??}?????
	???+?,?
*???*?*?N-?6-+??:,??:?kY*??:?Y???????Q???y:???>?:		???8:

?c?!+	
?e???,	????W??pk4|*	y&?S
\C?)?.+?
?8?2!???(z+80rW8:h??Hy&?R
?.,??3(z+,0rWX:h??Fabfg!i(l0o:pHsQt\wdxkyyz?{?????!??q{k????q6*?????+*?????y???*?????y??????6????2?4??4???:??Y*?P*????????????V*?????Y*?P????*????????????????kY*?¹?*?ƹ?`??L*?c*?¶?uM,???7,???yN+-??W-???++??d+???y??W+-??W???*?ƹ??+*?ƶW??Y*?P+??? ?'?)???p?p?*
????E?L?_?f?i?u?~???,k}9?????m*?????Y*?P???밻?Y??L*?c*????uM,???+,???yN-???+-?ħ-???+-?ǧ?һ?Y*?P+??? B?)m??O??O??*
????B?I?Q?X?]?`????}?!y??????*?????Y*?P???밻kY*?¹?*?ƹ?`??L*?c*????uM,???,???yN-???	+-??W???+*????W*?ƹ??+*?ƶW??Y*?P+??? U
?)???1_?1_?.???1?U?\?b?e?n?z?????+k}????d??kY*?¹?*?ƹ?`??M*?c??>*?c*????u:???%???y:+??`?
,??W???*?c*????u:???%???y:+??`?
,??W??׻?Y*?P,???>L?)??)????)*?#??????.#LX_b??	????6k}(??}(????L*? Y+S,?Ұ? ???*??????^?kY*?¹?*?ƹ?`??N,+?۸?:*?c??6*?c*????u:???(???y:????
-??W???*?c*????u:???(???y:????
-??W???-???????Y+??	??SY?+??SY*??S??:?Y????Y*?P-???\	X?)??)?
*???????%?2.?????%?3?N%.Xgnq ?!?"?$?%?&?)?*?+?&?,?.?v	?B??k{}+??}+????k{? ?????k{? ?? ?i??kY*?¹?*?ƹ?`??M?kY*?¹?*?ƹ?`??N*?c*?¶?u:???1???y:+????
,??W?
-??W???,-?W*?ƹ??,*?ƶW??Y*?P,???4^?)????2?	6r
? ?3?	6r
?.2365^6l7v9};?<?=?>?@??Hkk}?-y????^???A*+??+?*?+???+?M*?P,?P???*?i,?i????? A??A<$??EFHJ-K?M??\?U*?P?<h*?i?`<??????RST5?/*???????[??O*??uM,???=,???yN-????+?`?-?-???-??????+?`?-???????? -?)O??O?*?"`a+b-d4eEfJiMj??
}?"y???1?/*?̰????n???.b*?J+???
N-?Q*?NY:»kY*?·?:+,?":?
Y?g?%N**?J?++-?.?1?Jç:??-?UXX]X?>'+40"5+b??b67b8?T9:?'+40"5,?&	????'?0???R?`???X?
3?;?.b*?L+???
N-?Q*?NY:»kY*?Ʒ?:+,?":?
Y?g?%N**?L?++-?.?1?Lç:??-?UXX]X?>'+40"5+b??b67b8?T9:?'+40"5,?&	????'?0???R?`???X?
3?
 ??
??kY?lN*?>?u:??????? :+?B?G??? :?^,?H:???N???y:+??K:		?
?N?%	?G???`??N-??W?????w-?g??\	]<O)h1PQ	GUrS<`T*)sU*?67?8??4?5? GUrR?4?5?>??)?<?A?Q?]?h?m?w????????????)?k}?3  }?/yD?!????VW?^*+,*?c???Z?? ??<+8??<[????VX?6??Y+?^:*,?`:*,?b:?kY?e?e`??:*?c?h??W*?c?k??W*?c?h??W*?c?k??W??Y*?P???R????<+?8????
?67wl:nm:0Z??<[0Z?&	?
???0?C?V?i?|???n??/*????????o??/*???????????pq? 	]?kY?lM*???uN-???C-???y:+:?66?#2:???,??W???ܧ??,??4???&2t)]??]urU.+?U.,?"??&???I?R?X?[??=?q}?sq}ys ?sq}???vw??D+?z?*?ư?kY?lM*?{N-???#-???y:??+?,??W???,??*-t)D??D??0.+?0.,?"????-?6???B???q}%???|???e?~Y?L+???*?Ӷ????W*?i??=>?-+*?i???y????Wd?+???W????+???W+????*)/??e??]??'>???*
IJK'L.MCNJORLXR`S??)~(?
???Q+?
?	+??
a?????*?????E
BC??.*?]? :+-,
?????????????(W??4.TV.W8.8.vw#)*?:;-<?@???????E??AFH???????:
	

		 "#




© 2015 - 2024 Weber Informatics LLC | Privacy Policy