
com.groupbyinc.flux.cluster.routing.allocation.decider.AwarenessAllocationDecider.class Maven / Gradle / Ivy
???? 3C Qcom/groupbyinc/flux/cluster/routing/allocation/decider/AwarenessAllocationDecider Hcom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDecider AwarenessAllocationDecider.java _com/groupbyinc/flux/cluster/routing/allocation/decider/AwarenessAllocationDecider$ApplySettings
ApplySettings java/util/Map$Entry
java/util/Map Entry 4com/groupbyinc/flux/common/settings/Settings$Builder ,com/groupbyinc/flux/common/settings/Settings Builder >com/groupbyinc/flux/node/settings/NodeSettingsService$Listener 5com/groupbyinc/flux/node/settings/NodeSettingsService Listener NAME Ljava/lang/String; awareness /CLUSTER_ROUTING_ALLOCATION_AWARENESS_ATTRIBUTES /cluster.routing.allocation.awareness.attributes 0CLUSTER_ROUTING_ALLOCATION_AWARENESS_FORCE_GROUP +cluster.routing.allocation.awareness.force. awarenessAttributes [Ljava/lang/String; forcedAwarenessAttributes Ljava/util/Map; 6Ljava/util/Map; ()V EMPTY_SETTINGS .Lcom/groupbyinc/flux/common/settings/Settings; ) * + 1(Lcom/groupbyinc/flux/common/settings/Settings;)V ' -
. this SLcom/groupbyinc/flux/cluster/routing/allocation/decider/AwarenessAllocationDecider;
. h(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/node/settings/NodeSettingsService;)V ' 3
4 settings *Lcom/groupbyinc/flux/common/inject/Inject;
.
getAsArray '(Ljava/lang/String;)[Ljava/lang/String; 9 :
; " # = 5com/groupbyinc/flux/common/google/common/collect/Maps ?
newHashMap ()Ljava/util/HashMap; A B
@ C $ % E getGroups #(Ljava/lang/String;)Ljava/util/Map; G H
I entrySet ()Ljava/util/Set; K L M
java/util/Set O iterator ()Ljava/util/Iterator; Q R P S java/util/Iterator U hasNext ()Z W X V Y next ()Ljava/lang/Object; [ \ V ] getValue _ \
` values b getKey d \
e put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; g h i V(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AwarenessAllocationDecider;)V ' k
l addListener C(Lcom/groupbyinc/flux/node/settings/NodeSettingsService$Listener;)V n o
p aValues entry WLjava/util/Map$Entry; Ljava/util/Map$Entry; nodeSettingsService 7Lcom/groupbyinc/flux/node/settings/NodeSettingsService; forceGroups QLjava/util/Map; ()[Ljava/lang/String; 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;
underCapacity ?(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;Lcom/groupbyinc/flux/cluster/routing/RoutingNode;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision; } ~
shardRouting 2Lcom/groupbyinc/flux/cluster/routing/ShardRouting; node 1Lcom/groupbyinc/flux/cluster/routing/RoutingNode;
allocation BLcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation; canRemain ?com/groupbyinc/flux/cluster/routing/allocation/decider/Decision ? YES ALcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision; ? ? ? ? no allocation awareness enabled ? java/lang/Object ? @com/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation ? 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; ? ?
? ? metaData 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData; ? ?
? ? 0com/groupbyinc/flux/cluster/routing/ShardRouting ? index ()Ljava/lang/String; ? ?
? ? -com/groupbyinc/flux/cluster/metadata/MetaData ? H(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; ? ?
? ? 2com/groupbyinc/flux/cluster/metadata/IndexMetaData ? getNumberOfReplicas ()I ? ?
? ? /com/groupbyinc/flux/cluster/routing/RoutingNode ? # 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; ? ?
? ? .com/groupbyinc/flux/cluster/node/DiscoveryNode ?
attributes A()Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap; ? ?
? ? =com/groupbyinc/flux/common/google/common/collect/ImmutableMap ? containsKey (Ljava/lang/Object;)Z ? ?
? ? NO ? ? ? ? /node does not contain awareness attribute: [%s] ? java/lang/String ? routingNodes 4()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes; ? ?
? ? 0com/groupbyinc/flux/cluster/routing/RoutingNodes ? nodesPerAttributesCounts S(Ljava/lang/String;)Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectIntHashMap; ? ?
? ? =com/groupbyinc/flux/common/carrotsearch/hppc/ObjectIntHashMap ? ' (
? ? assignedShards H(Lcom/groupbyinc/flux/cluster/routing/ShardRouting;)Ljava/lang/Iterable; ? ?
? ? java/lang/Iterable ? ? S started ? X
? ? initializing ? X
? ?
currentNodeId ? ?
? ? E(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/RoutingNode; ? ?
? ? get &(Ljava/lang/Object;)Ljava/lang/Object; ? ?
? ? addTo (Ljava/lang/Object;I)I ? ?
? ? assignedToNode ? X
? ?
relocating ? X
? ? relocatingNodeId ? ?
? ? nodeId ? ?
? ? equals ? ?
? ? putOrAdd (Ljava/lang/Object;II)I ? ?
? size ?
? ?
? ? (Ljava/lang/Object;)I ?
? ktoo many shards on node for attribute: [%s], required per attribute: [%d], node count: [%d], leftover: [%d]
java/lang/Integer valueOf (I)Ljava/lang/Integer;
!node meets awareness requirements routingNode
assignedShard fullValue requiredCountPerAttribute I nodesPerAttribute SLcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectIntHashMap; ?Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectIntHashMap; shardPerAttribute numberOfAttributes
fullValues averagePerAttribute
totalLeftover leftoverPerAttribute currentNodeCount awarenessAttribute
moveToNode Z
indexMetaData 4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;
shardCount
access$000 h(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AwarenessAllocationDecider;)[Ljava/lang/String; x0
access$100 ?(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AwarenessAllocationDecider;)Lcom/groupbyinc/flux/common/logging/ESLogger; logger -Lcom/groupbyinc/flux/common/logging/ESLogger;./ 0
access$002 {(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AwarenessAllocationDecider;[Ljava/lang/String;)[Ljava/lang/String; x1
access$200 d(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AwarenessAllocationDecider;)Ljava/util/Map;
access$202 s(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/AwarenessAllocationDecider;Ljava/util/Map;)Ljava/util/Map;
ConstantValue Signature Code LocalVariableTable LineNumberTable LocalVariableTypeTable
StackMapTable RuntimeVisibleAnnotations
SourceFile InnerClasses ! 9 9 9 ! " # $ % : &