
com.groupbyinc.flux.cluster.routing.allocation.decider.ShardsLimitAllocationDecider.class Maven / Gradle / Ivy
???? 3 ? Scom/groupbyinc/flux/cluster/routing/allocation/decider/ShardsLimitAllocationDecider Hcom/groupbyinc/flux/cluster/routing/allocation/decider/AllocationDecider !ShardsLimitAllocationDecider.java acom/groupbyinc/flux/cluster/routing/allocation/decider/ShardsLimitAllocationDecider$ApplySettings
ApplySettings >com/groupbyinc/flux/node/settings/NodeSettingsService$Listener 5com/groupbyinc/flux/node/settings/NodeSettingsService Listener NAME Ljava/lang/String; shards_limit clusterShardLimit I INDEX_TOTAL_SHARDS_PER_NODE .index.routing.allocation.total_shards_per_node CLUSTER_TOTAL_SHARDS_PER_NODE 0cluster.routing.allocation.total_shards_per_node h(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/node/settings/NodeSettingsService;)V *Lcom/groupbyinc/flux/common/inject/Inject; 1(Lcom/groupbyinc/flux/common/settings/Settings;)V
java/lang/Integer valueOf (I)Ljava/lang/Integer; " #
! $ ,com/groupbyinc/flux/common/settings/Settings & getAsInt :(Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/Integer; ( )
' * intValue ()I , -
! . 0 X(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/ShardsLimitAllocationDecider;)V 2
3 addListener C(Lcom/groupbyinc/flux/node/settings/NodeSettingsService$Listener;)V 5 6
7 this ULcom/groupbyinc/flux/cluster/routing/allocation/decider/ShardsLimitAllocationDecider; settings .Lcom/groupbyinc/flux/common/settings/Settings; nodeSettingsService 7Lcom/groupbyinc/flux/node/settings/NodeSettingsService; 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 A routingNodes 4()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes; C D
B E 0com/groupbyinc/flux/cluster/routing/RoutingNodes G metaData 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData; I J
H K 0com/groupbyinc/flux/cluster/routing/ShardRouting M index ()Ljava/lang/String; O P
N Q -com/groupbyinc/flux/cluster/metadata/MetaData S H(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; O U
T V 2com/groupbyinc/flux/cluster/metadata/IndexMetaData X getSettings 0()Lcom/groupbyinc/flux/common/settings/Settings; Z [
Y \ ?com/groupbyinc/flux/cluster/routing/allocation/decider/Decision ^ YES ALcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision; ` a _ b 9total shard limit disabled: [index: %d, cluster: %d] <= 0 d java/lang/Object f 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; h i
B j /com/groupbyinc/flux/cluster/routing/RoutingNode l iterator ()Ljava/util/Iterator; n o
m p java/util/Iterator r hasNext ()Z t u s v next ()Ljava/lang/Object; x y s z
relocating | u
N } java/lang/String equals (Ljava/lang/Object;)Z ? ?
? ? NO ? a _ ? /too many shards for this node [%d], limit: [%d] ? =too many shards for this index [%s] on node [%d], limit: [%d] ? Oshard count under index limit [%d] and node limit [%d] of total shards per node ? nodeShard 2Lcom/groupbyinc/flux/cluster/routing/ShardRouting; shardRouting node 1Lcom/groupbyinc/flux/cluster/routing/RoutingNode;
allocation BLcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation; indexMd 4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; indexShardLimit indexShardCount nodeShardCount canRemain ?(Lcom/groupbyinc/flux/cluster/routing/RoutingNode;Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;)Lcom/groupbyinc/flux/cluster/routing/allocation/decider/Decision; .total shard limit disabled: [cluster: %d] <= 0 ? :shard count under node limit [%d] of total shards per node ?
access$000 X(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/ShardsLimitAllocationDecider;)I x0
access$100 ?(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/ShardsLimitAllocationDecider;)Lcom/groupbyinc/flux/common/logging/ESLogger; logger -Lcom/groupbyinc/flux/common/logging/ESLogger; ? ? ?
access$002 Y(Lcom/groupbyinc/flux/cluster/routing/allocation/decider/ShardsLimitAllocationDecider;I)I x1
ConstantValue Code LocalVariableTable LineNumberTable RuntimeVisibleAnnotations
StackMapTable
SourceFile InnerClasses ! ? B ? ? ? m #*+? *+? %? +? /? 1,? Y*? 4? 8? ? # 9 : # ; <