
com.groupbyinc.flux.cluster.routing.allocation.command.AllocateReplicaAllocationCommand.class Maven / Gradle / Ivy
???? 4 Wcom/groupbyinc/flux/cluster/routing/allocation/command/AllocateReplicaAllocationCommand Xcom/groupbyinc/flux/cluster/routing/allocation/command/AbstractAllocateAllocationCommand %AllocateReplicaAllocationCommand.java _com/groupbyinc/flux/cluster/routing/allocation/command/AllocateReplicaAllocationCommand$Builder Builder Dcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type ?com/groupbyinc/flux/cluster/routing/allocation/decider/Decision Type NAME Ljava/lang/String; allocate_replica COMMAND_NAME_FIELD 'Lcom/groupbyinc/flux/common/ParseField; REPLICA_PARSER 2Lcom/groupbyinc/flux/common/xcontent/ObjectParser; ?Lcom/groupbyinc/flux/common/xcontent/ObjectParser; ((Ljava/lang/String;ILjava/lang/String;)V
this YLcom/groupbyinc/flux/cluster/routing/allocation/command/AllocateReplicaAllocationCommand; index shardId I node 5(Lcom/groupbyinc/flux/common/io/stream/StreamInput;)V java/io/IOException " !
$ in 2Lcom/groupbyinc/flux/common/io/stream/StreamInput; name ()Ljava/lang/String; fromXContent ?(Lcom/groupbyinc/flux/common/xcontent/XContentParser;)Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocateReplicaAllocationCommand; ()V ,
- parse ?(Lcom/groupbyinc/flux/common/xcontent/XContentParser;)Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocateReplicaAllocationCommand$Builder; / 0
1 build [()Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocateReplicaAllocationCommand; 3 4
5 parser 4Lcom/groupbyinc/flux/common/xcontent/XContentParser; execute ?(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/RerouteExplanation; "java/lang/IllegalArgumentException ; 0com/groupbyinc/flux/index/IndexNotFoundException = 6com/groupbyinc/flux/index/shard/ShardNotFoundException ? @com/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation A nodes 3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; C D
B E G /com/groupbyinc/flux/cluster/node/DiscoveryNodes I resolveNode D(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; K L
J M explainOrThrowRejectedCommand ?(ZLcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Ljava/lang/RuntimeException;)Lcom/groupbyinc/flux/cluster/routing/allocation/RerouteExplanation; O P
Q .com/groupbyinc/flux/cluster/node/DiscoveryNode S routingNodes 4()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes; U V
B W getId Y )
T Z 0com/groupbyinc/flux/cluster/routing/RoutingNodes \ E(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/RoutingNode; ^
] _ explainOrThrowMissingRoutingNode ?(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;ZLcom/groupbyinc/flux/cluster/node/DiscoveryNode;)Lcom/groupbyinc/flux/cluster/routing/allocation/RerouteExplanation; a b
c /com/groupbyinc/flux/cluster/routing/RoutingNode e routingTable 4()Lcom/groupbyinc/flux/cluster/routing/RoutingTable; g h
B i k m 0com/groupbyinc/flux/cluster/routing/RoutingTable o shardRoutingTable Q(Ljava/lang/String;I)Lcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable; q r
p s :com/groupbyinc/flux/cluster/routing/IndexShardRoutingTable u primaryShard 4()Lcom/groupbyinc/flux/cluster/routing/ShardRouting; w x
v y -com/groupbyinc/flux/ResourceNotFoundException { 0com/groupbyinc/flux/cluster/routing/ShardRouting }
unassigned ()Z ?
~ ? java/lang/StringBuilder ?
? - $trying to allocate a replica shard [ ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? ][ ? (I)Ljava/lang/StringBuilder; ? ?
? ? 8], while corresponding primary shard is still unassigned ? toString ? )
? ? ?(ZLcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/allocation/RerouteExplanation; O ?
? 5com/groupbyinc/flux/cluster/routing/ShardRoutingState ?
UNASSIGNED 7Lcom/groupbyinc/flux/cluster/routing/ShardRoutingState; ? ? ? ? replicaShardsWithState J([Lcom/groupbyinc/flux/cluster/routing/ShardRoutingState;)Ljava/util/List; ? ?
v ? java/util/List ? isEmpty ? ? ? ? all copies of [ ? ?] are already assigned. Use the move allocation command instead ? get (I)Ljava/lang/Object; ? ? ? ? deciders M()Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDeciders; ? ?
B ? 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; ? ?
? NO FLcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision$Type; ? ?
? Acom/groupbyinc/flux/cluster/routing/allocation/RerouteExplanation ? ?(Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand;Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision;)V ?
? ? [ ? ( )
? ] allocation of [ ?
] on node ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ? ?
? ? is not allowed, reason: ? (Ljava/lang/String;)V ?
<