
com.groupbyinc.flux.gateway.ReplicaShardAllocator.class Maven / Gradle / Ivy
???? 3 1com/groupbyinc/flux/gateway/ReplicaShardAllocator 6com/groupbyinc/flux/common/component/AbstractComponent ReplicaShardAllocator.java ?com/groupbyinc/flux/gateway/ReplicaShardAllocator$MatchingNodes
MatchingNodes 7com/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult +com/groupbyinc/flux/gateway/AsyncShardFetch FetchResult Ycom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaData Fcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData StoreFilesMetaData Dcom/groupbyinc/flux/cluster/routing/RoutingNodes$RoutingNodeIterator 0com/groupbyinc/flux/cluster/routing/RoutingNodes RoutingNodeIterator Ecom/groupbyinc/flux/cluster/routing/RoutingNodes$RoutingNodesIterator RoutingNodesIterator ]com/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$NodeStoreFilesMetaData NodeStoreFilesMetaData Acom/groupbyinc/flux/cluster/routing/RoutingNodes$UnassignedShards UnassignedShards Tcom/groupbyinc/flux/cluster/routing/RoutingNodes$UnassignedShards$UnassignedIterator ! UnassignedIterator java/util/Map$Entry $
java/util/Map & Entry 9com/groupbyinc/flux/cluster/routing/UnassignedInfo$Reason ) 2com/groupbyinc/flux/cluster/routing/UnassignedInfo + Reason Dcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type . ?com/groupbyinc/flux/cluster/routing/allocation/decider/Decision 0 Type $assertionsDisabled Z 1(Lcom/groupbyinc/flux/common/settings/Settings;)V 5 6
7 this 3Lcom/groupbyinc/flux/gateway/ReplicaShardAllocator; settings .Lcom/groupbyinc/flux/common/settings/Settings; processExistingRecoveries E(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Z @com/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation ? routingNodes 4()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes; A B
@ C nodes I()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes$RoutingNodesIterator; E F
G hasNext ()Z I J
K next 3()Lcom/groupbyinc/flux/cluster/routing/RoutingNode; M N
O
nodeShards H()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes$RoutingNodeIterator; Q R
S
K 4()Lcom/groupbyinc/flux/cluster/routing/ShardRouting; M V
W 0com/groupbyinc/flux/cluster/routing/ShardRouting Y primary [ J
Z \ initializing ^ J
Z _ relocatingNodeId ()Ljava/lang/String; a b
Z c allocatedPostIndexCreate e J
Z f fetchData ?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult; h i
j hasData l J
m logger -Lcom/groupbyinc/flux/common/logging/ESLogger; o p q .{}: fetching new stores for initializing shard s java/lang/Object u +com/groupbyinc/flux/common/logging/ESLogger w trace ((Ljava/lang/String;[Ljava/lang/Object;)V y z x {
activePrimary f(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)Lcom/groupbyinc/flux/cluster/routing/ShardRouting; } ~
3 4 ? 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 5 ?
? ? 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; ? ?
? allocated ? J
? V{}: no primary shard store found or allocated, letting actual allocation figure it out ? findMatchingNodesK(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;)Lcom/groupbyinc/flux/gateway/ReplicaShardAllocator$MatchingNodes; ? ?
? getNodeWithHighestMatch 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; ? ?
? 3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; E ?
@ ?
currentNodeId ? b
Z ? /com/groupbyinc/flux/cluster/node/DiscoveryNodes ? get D(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; ? ?
? ? .com/groupbyinc/flux/cluster/node/DiscoveryNode ? equals (Ljava/lang/Object;)Z ? ?
? ? isNodeMatchBySyncID 3(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)Z ? ?
? Jcancelling allocation of replica on [{}], sync id match found on node [{}] ? debug ? z x ? REALLOCATED_REPLICA ;Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$Reason; ? ? * ? java/lang/StringBuilder ? ()V 5 ?
? ? #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 ? b
? ? getCurrentNanoTime ()J ? ?
@ ? java/lang/System ? currentTimeMillis ? ?
? ? g(Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$Reason;Ljava/lang/String;Ljava/lang/Throwable;JJ)V 5 ?
, ? moveToUnassigned 7(Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo;)V ? ?
? currentNode 0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; nodeWithHighestMatch shard 2Lcom/groupbyinc/flux/cluster/routing/ShardRouting; shardStores ?Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult; 9Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult; primaryShard primaryStore [Lcom/groupbyinc/flux/indices/store/TransportNodesListShardStoreMetaData$StoreFilesMetaData;
matchingNodes ALcom/groupbyinc/flux/gateway/ReplicaShardAllocator$MatchingNodes; it FLcom/groupbyinc/flux/cluster/routing/RoutingNodes$RoutingNodeIterator; GLcom/groupbyinc/flux/cluster/routing/RoutingNodes$RoutingNodesIterator;
allocation BLcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation; changed allocateUnassigned
unassigned E()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes$UnassignedShards; ? ?
? iterator X()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes$UnassignedShards$UnassignedIterator; ? ?
?
" K
" W canBeAllocatedToAtLeastOneNode w(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Z ? ?
? 7{}: ignoring allocation, can't be allocated on any node removeAndIgnore ?
" 4{}: ignoring allocation, still fetching shard stores setHasPendingAsyncFetch ?
@ id b
? node E(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/RoutingNode;
deciders M()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;
type H()Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type;
1 THROTTLE FLcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type; ! /" _[{}][{}]: throttling allocation [{}] to [{}] in order to reuse its unallocated persistent store$ index&