
com.groupbyinc.flux.cluster.routing.allocation.decider.SameShardAllocationDecider.class Maven / Gradle / Ivy
???? 3 ? Qcom/groupbyinc/flux/cluster/routing/allocation/decider/SameShardAllocationDecider Hcom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDecider SameShardAllocationDecider.java NAME Ljava/lang/String;
same_shard SAME_HOST_SETTING *cluster.routing.allocation.same_shard.host sameHost Z 1(Lcom/groupbyinc/flux/common/settings/Settings;)V *Lcom/groupbyinc/flux/common/inject/Inject;
java/lang/Boolean valueOf (Z)Ljava/lang/Boolean;
,com/groupbyinc/flux/common/settings/Settings getAsBoolean :(Ljava/lang/String;Ljava/lang/Boolean;)Ljava/lang/Boolean;
booleanValue ()Z !
"
$ this SLcom/groupbyinc/flux/cluster/routing/allocation/decider/SameShardAllocationDecider; settings .Lcom/groupbyinc/flux/common/settings/Settings; 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; @com/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation , routingNodes 4()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes; . /
- 0 0com/groupbyinc/flux/cluster/routing/RoutingNodes 2 assignedShards H(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)Ljava/lang/Iterable; 4 5
3 6 java/lang/Iterable 8 iterator ()Ljava/util/Iterator; : ; 9 < java/util/Iterator > hasNext @ ! ? A next ()Ljava/lang/Object; C D ? E 0com/groupbyinc/flux/cluster/routing/ShardRouting G /com/groupbyinc/flux/cluster/routing/RoutingNode I nodeId ()Ljava/lang/String; K L
J M
currentNodeId O L
H P java/lang/String R equals (Ljava/lang/Object;)Z T U
S V ?com/groupbyinc/flux/cluster/routing/allocation/decider/Decision X NO ALcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision; Z [ Y \ @shard cannot be allocated on same node [%s] it already exists on ^ java/lang/Object ` decision ?(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision; b c
- d node 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; f g
J h
3 < .com/groupbyinc/flux/cluster/node/DiscoveryNode k getHostAddress m L
l n "com/groupbyinc/flux/common/Strings p hasLength (Ljava/lang/String;)Z r s
q t getHostName v L
l w @shard cannot be allocated on same host [%s] it already exists on y YES { [ Y | +shard is not allocated to same node or host ~
assignedShard 2Lcom/groupbyinc/flux/cluster/routing/ShardRouting; checkNodeOnSameHost checkNode 1Lcom/groupbyinc/flux/cluster/routing/RoutingNode; shardRouting
allocation BLcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation; HLjava/lang/Iterable; Ljava/lang/Iterable;
ConstantValue Code LocalVariableTable LineNumberTable RuntimeVisibleAnnotations LocalVariableTypeTable
StackMapTable
SourceFile ! ?
?
? S *+? *+? ? ? #? %? ? &