
com.groupbyinc.flux.cluster.routing.allocation.AllocationService.class Maven / Gradle / Ivy
???? 3? @com/groupbyinc/flux/cluster/routing/allocation/AllocationService 6com/groupbyinc/flux/common/component/AbstractComponent AllocationService.java Bcom/groupbyinc/flux/cluster/routing/allocation/AllocationService$2 Bcom/groupbyinc/flux/cluster/routing/allocation/AllocationService$1 Gcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation$Result
@com/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation Result Rcom/groupbyinc/flux/cluster/routing/allocation/FailedRerouteAllocation$FailedShard Fcom/groupbyinc/flux/cluster/routing/allocation/FailedRerouteAllocation FailedShard Ecom/groupbyinc/flux/cluster/routing/RoutingNodes$RoutingNodesIterator 0com/groupbyinc/flux/cluster/routing/RoutingNodes RoutingNodesIterator Dcom/groupbyinc/flux/cluster/routing/RoutingNodes$RoutingNodeIterator RoutingNodeIterator 8com/groupbyinc/flux/cluster/routing/RoutingTable$Builder 0com/groupbyinc/flux/cluster/routing/RoutingTable Builder Acom/groupbyinc/flux/cluster/routing/RoutingNodes$UnassignedShards ! UnassignedShards 9com/groupbyinc/flux/cluster/routing/UnassignedInfo$Reason $ 2com/groupbyinc/flux/cluster/routing/UnassignedInfo & Reason Tcom/groupbyinc/flux/cluster/routing/RoutingNodes$UnassignedShards$UnassignedIterator ) UnassignedIterator allocationDeciders KLcom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDeciders; clusterInfoService 0Lcom/groupbyinc/flux/cluster/ClusterInfoService; shardsAllocators KLcom/groupbyinc/flux/cluster/routing/allocation/allocator/ShardsAllocators; $assertionsDisabled Z ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDeciders;Lcom/groupbyinc/flux/cluster/routing/allocation/allocator/ShardsAllocators;Lcom/groupbyinc/flux/cluster/ClusterInfoService;)V *Lcom/groupbyinc/flux/common/inject/Inject; 1(Lcom/groupbyinc/flux/common/settings/Settings;)V 4 7
8 , - : 0 1 < . / > this BLcom/groupbyinc/flux/cluster/routing/allocation/AllocationService; settings .Lcom/groupbyinc/flux/common/settings/Settings; applyStartedShards ?(Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/util/List;)Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation$Result; ?(Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/util/List;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation$Result; D F
G clusterState *Lcom/groupbyinc/flux/cluster/ClusterState;
startedShards ELjava/util/List<+Lcom/groupbyinc/flux/cluster/routing/ShardRouting;>; Ljava/util/List; getMutableRoutingNodes ^(Lcom/groupbyinc/flux/cluster/ClusterState;)Lcom/groupbyinc/flux/cluster/routing/RoutingNodes; N O
P
unassigned E()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes$UnassignedShards; R S
T shuffle ()V V W
" X Gcom/groupbyinc/flux/cluster/routing/allocation/StartedRerouteAllocation Z (com/groupbyinc/flux/cluster/ClusterState \ nodes 3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; ^ _
] ` .com/groupbyinc/flux/cluster/ClusterInfoService b getClusterInfo +()Lcom/groupbyinc/flux/cluster/ClusterInfo; d e c f ?(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDeciders;Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;Ljava/util/List;Lcom/groupbyinc/flux/cluster/ClusterInfo;)V 4 h
[ i I(Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;Ljava/lang/Iterable;)Z D k
l routingTable 4()Lcom/groupbyinc/flux/cluster/routing/RoutingTable; n o
] p 6(ZLcom/groupbyinc/flux/cluster/routing/RoutingTable;)V 4 r
s Icom/groupbyinc/flux/cluster/routing/allocation/allocator/ShardsAllocators u L(Lcom/groupbyinc/flux/cluster/routing/allocation/StartedRerouteAllocation;)V D w
v x reroute E(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Z z {
| 4 W
~ updateNodes n(Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;)Lcom/groupbyinc/flux/cluster/routing/RoutingTable$Builder; ? ?
? build ? o
? metaData 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData; ? ?
] ? validateRaiseException c(Lcom/groupbyinc/flux/cluster/metadata/MetaData;)Lcom/groupbyinc/flux/cluster/routing/RoutingTable; ? ?
? E(Lcom/groupbyinc/flux/cluster/routing/allocation/AllocationService;)V 4 ?
? 'firstListElementsToCommaDelimitedString \(Ljava/util/List;Lcom/groupbyinc/flux/common/google/common/base/Function;)Ljava/lang/String; ? ?
? 5com/groupbyinc/flux/cluster/health/ClusterStateHealth ? -(Lcom/groupbyinc/flux/cluster/ClusterState;)V 4 ?
? ? d(Lcom/groupbyinc/flux/cluster/metadata/MetaData;Lcom/groupbyinc/flux/cluster/routing/RoutingTable;)V 4 ?
? ? java/lang/StringBuilder ?
? ~ shards started [ ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? ] ... ? toString ()Ljava/lang/String; ? ?
? ? logClusterHealthStateChange ?(Lcom/groupbyinc/flux/cluster/health/ClusterStateHealth;Lcom/groupbyinc/flux/cluster/health/ClusterStateHealth;Ljava/lang/String;)V ? ?
? withReroute routingNodes 2Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;
allocation ILcom/groupbyinc/flux/cluster/routing/allocation/StartedRerouteAllocation; changed 2Lcom/groupbyinc/flux/cluster/routing/RoutingTable; result ILcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation$Result; startedShardsAsString Ljava/lang/String; applyFailedShard ?(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation$Result; \(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Ljava/lang/String;Ljava/lang/Throwable;)V 4 ?
? java/util/Collections ?
singletonList $(Ljava/lang/Object;)Ljava/util/List; ? ?
? ? applyFailedShards ? E
? failedShard 2Lcom/groupbyinc/flux/cluster/routing/ShardRouting;
i java/util/List ? iterator ()Ljava/util/Iterator; ? ? ? ? java/util/Iterator ? hasNext ()Z ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? shard ? ? ? ALLOCATION_FAILED ;Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$Reason; ? ? % ? message ? ? ? failure Ljava/lang/Throwable; ? ? ? java/lang/System ? nanoTime ()J ? ?
? ? currentTimeMillis ? ?
? ? g(Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo$Reason;Ljava/lang/String;Ljava/lang/Throwable;JJ)V 4 ?
' ? ?(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Lcom/groupbyinc/flux/cluster/routing/ShardRouting;ZLcom/groupbyinc/flux/cluster/routing/UnassignedInfo;)Z ? ?
? K(Lcom/groupbyinc/flux/cluster/routing/allocation/FailedRerouteAllocation;)V ? ?
v ?
? getMetaData ? ?
] ? shards failed [ TLcom/groupbyinc/flux/cluster/routing/allocation/FailedRerouteAllocation$FailedShard; failedShards fLjava/util/List; HLcom/groupbyinc/flux/cluster/routing/allocation/FailedRerouteAllocation; failedShardsAsString 6com/groupbyinc/flux/common/google/common/base/Function ,
java/lang/Object apply &(Ljava/lang/Object;)Ljava/lang/Object; java/lang/String element TT; Ljava/lang/Object; elements Ljava/util/List; formatter PLcom/groupbyinc/flux/common/google/common/base/Function<-TT;Ljava/lang/String;>; 8Lcom/groupbyinc/flux/common/google/common/base/Function; maxNumberOfElements I currentIndex it Ljava/util/Iterator; Ljava/util/Iterator; msg Ljava/lang/StringBuilder; ?(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommands;)Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation$Result; ?(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommands;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation$Result; z%
& commands KLcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommands; currentNanoTime* ?
+ ?(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDeciders;Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;Lcom/groupbyinc/flux/cluster/ClusterInfo;J)V 4-
.
debugDecision (Z)V01
2
ignoreDisable41
5 Icom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommands7 execute ?(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingExplanations;9:
8; z(ZLcom/groupbyinc/flux/cluster/routing/RoutingTable;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingExplanations;)V 4=
> reroute commands@ explain BLcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation; explanations DLcom/groupbyinc/flux/cluster/routing/allocation/RoutingExplanations; ?(Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation$Result; ?(Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/lang/String;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation$Result; zG
H reason debug getStatus :()Lcom/groupbyinc/flux/cluster/health/ClusterHealthStatus;LM
?N 6com/groupbyinc/flux/cluster/health/ClusterHealthStatusP equals (Ljava/lang/Object;)ZRS
QT logger -Lcom/groupbyinc/flux/common/logging/ESLogger;VW X ?Cluster health status changed from [{}] to [{}] (reason: [{}]).Z +com/groupbyinc/flux/common/logging/ESLogger\ info ((Ljava/lang/String;[Ljava/lang/Object;)V^_]` previousStateHealth 7Lcom/groupbyinc/flux/cluster/health/ClusterStateHealth; newStateHealth previousHealth 8Lcom/groupbyinc/flux/cluster/health/ClusterHealthStatus;
currentHealth deassociateDeadNodesh {
i
applyNewNodes E(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Vkl
m +electPrimariesAndUnassignedDanglingReplicaso {
p 4()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes; ?r
s size ()Iuv
"w B C y !updateLeftDelayOfUnassignedShards s(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Lcom/groupbyinc/flux/common/settings/Settings;)V{|
} allocateUnassigned {
v?
moveShards? {
v? rebalance? {
v? 2 3 ? assertShardStats 5(Lcom/groupbyinc/flux/cluster/routing/RoutingNodes;)Z??
? java/lang/AssertionError?
? ~ X()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes$UnassignedShards$UnassignedIterator; ??
"? 0com/groupbyinc/flux/cluster/routing/ShardRouting?
? index? ?
?? -com/groupbyinc/flux/cluster/metadata/MetaData? H(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;??
?? unassignedInfo 6()Lcom/groupbyinc/flux/cluster/routing/UnassignedInfo;??
?? getCurrentNanoTime? ?
? 2com/groupbyinc/flux/cluster/metadata/IndexMetaData? getSettings 0()Lcom/groupbyinc/flux/common/settings/Settings;??
?? updateDelay `(JLcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/common/settings/Settings;)J??
'? /Lcom/groupbyinc/flux/cluster/metadata/MetaData;
indexMetaData 4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; shardRouting getNumPrimaries?v
"? java/util/ArrayList?
? ~ primary? ?
?? assignedShards H(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)Ljava/lang/Iterable;??
? java/lang/Iterable?? ? initializing? ?
?? add?S ?? )primary failed while replica initializing?
activeReplica f(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)Lcom/groupbyinc/flux/cluster/routing/ShardRouting;??
? swapPrimaryFlag 6([Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)V??
? relocatingNodeId? ?
?? node E(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/RoutingNode;??
? /com/groupbyinc/flux/cluster/routing/RoutingNode?
? ? shardId +()Lcom/groupbyinc/flux/index/shard/ShardId;??
?? 'com/groupbyinc/flux/index/shard/ShardId?
?T isIndexUsingShadowReplicas 1(Lcom/groupbyinc/flux/common/settings/Settings;)Z??
?? reinitShadowPrimary 5(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)V??
? routing
shardEntry shardToFail 1Lcom/groupbyinc/flux/cluster/routing/RoutingNode; candidate shardsToFail DLjava/util/List;
` /com/groupbyinc/flux/cluster/node/DiscoveryNodes? dataNodes 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;??
?? 3com/groupbyinc/flux/common/collect/ImmutableOpenMap? values @()Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectContainer;??
??