com.groupbyinc.flux.cluster.routing.allocation.DiskThresholdMonitor.class Maven / Gradle / Ivy
???? 4? Ccom/groupbyinc/flux/cluster/routing/allocation/DiskThresholdMonitor 6com/groupbyinc/flux/common/component/AbstractComponent DiskThresholdMonitor.java 4com/groupbyinc/flux/common/settings/Settings$Builder ,com/groupbyinc/flux/common/settings/Settings Builder %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles
Lookup diskThresholdSettings FLcom/groupbyinc/flux/cluster/routing/allocation/DiskThresholdSettings; client #Lcom/groupbyinc/flux/client/Client; nodeHasPassedWatermark Ljava/util/Set; #Ljava/util/Set; clusterStateSupplier Ljava/util/function/Supplier; ILjava/util/function/Supplier; lastRunNS J ?(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/util/function/Supplier;Lcom/groupbyinc/flux/common/settings/ClusterSettings;Lcom/groupbyinc/flux/client/Client;)V 1(Lcom/groupbyinc/flux/common/settings/Settings;)V
(com/groupbyinc/flux/common/util/set/Sets ! newConcurrentHashSet ()Ljava/util/Set; # $
" % ' ) Dcom/groupbyinc/flux/cluster/routing/allocation/DiskThresholdSettings + f(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/common/settings/ClusterSettings;)V -
, . 0 2 this ELcom/groupbyinc/flux/cluster/routing/allocation/DiskThresholdMonitor; settings .Lcom/groupbyinc/flux/common/settings/Settings; clusterSettings 5Lcom/groupbyinc/flux/common/settings/ClusterSettings; warnAboutDiskIfNeeded *(Lcom/groupbyinc/flux/cluster/DiskUsage;)V %com/groupbyinc/flux/cluster/DiskUsage < getFreeBytes ()J > ?
= @ getFreeBytesThresholdFloodStage 1()Lcom/groupbyinc/flux/common/unit/ByteSizeValue; B C
, D -com/groupbyinc/flux/common/unit/ByteSizeValue F getBytes H ?
G I logger !Lorg/apache/logging/log4j/Logger; K L M aflood stage disk watermark [{}] exceeded on {}, all indices on this node will be marked read-only O org/apache/logging/log4j/Logger Q warn 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V S T R U getFreeBytesThresholdHigh W C
, X Uhigh disk watermark [{}] exceeded on {}, shards will be relocated away from this node Z getFreeBytesThresholdLow \ C
, ] Rlow disk watermark [{}] exceeded on {}, replicas will not be assigned to this node _ info a T R b getFreeDiskAsPercentage ()D d e
= f getFreeDiskThresholdFloodStage ()Ljava/lang/Double; h i
, j java/lang/Double l doubleValue n e
m o@Y % s "com/groupbyinc/flux/common/Strings u format1Decimals '(DLjava/lang/String;)Ljava/lang/String; w x
v y getFreeDiskThresholdHigh { i
, | getFreeDiskThresholdLow ~ i
, usage 'Lcom/groupbyinc/flux/cluster/DiskUsage; onNewInfo ,(Lcom/groupbyinc/flux/cluster/ClusterInfo;)V 'com/groupbyinc/flux/cluster/ClusterInfo ? getNodeLeastAvailableDiskUsages 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; ? ?
? ? ? 3com/groupbyinc/flux/common/collect/ImmutableOpenMap ? keys F()Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectLookupContainer; ? ?
? ?
java/util/Set ? iterator ()Ljava/util/Iterator; ? ? ? ? java/lang/String ? Bcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectLookupContainer ? java/util/Iterator ? hasNext ()Z ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? contains (Ljava/lang/Object;)Z ? ? ? ? remove ? ? ? ? java/util/function/Supplier ? get ? ? ? ? (com/groupbyinc/flux/cluster/ClusterState ? java/util/HashSet ? ()V ?
? ?
? ? Gcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectObjectCursor ? key Ljava/lang/Object; ? ? ? ? value ? ? ? ? : ;
? getRoutingNodes 4()Lcom/groupbyinc/flux/cluster/routing/RoutingNodes; ? ?
? ? 0com/groupbyinc/flux/cluster/routing/RoutingNodes ? node E(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/RoutingNode; ? ?
? ? /com/groupbyinc/flux/cluster/routing/RoutingNode ?
? ? 0com/groupbyinc/flux/cluster/routing/ShardRouting ? index #()Lcom/groupbyinc/flux/index/Index; ? ?
? ? com/groupbyinc/flux/index/Index ? getName ()Ljava/lang/String; ? ?
? ? add ? ? ? ? java/lang/System ? nanoTime ? ?
? ? ? getRerouteInterval -()Lcom/groupbyinc/flux/common/unit/TimeValue; ? ?
, ? )com/groupbyinc/flux/common/unit/TimeValue ? nanos ? ?
? ? 1high disk watermark exceeded on one or more nodes ? khigh disk watermark exceeded on {} but an automatic reroute has occurred in the last [{}], skipping reroute ? debug ? T R ? ? ? :one or more nodes has gone under the high or low watermark ? l{} has gone below a disk threshold, but an automatic reroute has occurred in the last [{}], skipping reroute ? rerouting shards: [{}] ? '(Ljava/lang/String;Ljava/lang/Object;)V a R reroute ?
"java/lang/invoke/LambdaMetafactory metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
? lambda$onNewInfo$0 ?(Lcom/groupbyinc/flux/cluster/ClusterState;Ljava/lang/String;)Z
(Ljava/lang/String;)Z test J(Lcom/groupbyinc/flux/cluster/ClusterState;)Ljava/util/function/Predicate; removeIf !(Ljava/util/function/Predicate;)Z ? isEmpty ? ? markIndicesReadOnly (Ljava/util/Set;)V !
" Ljava/lang/String; routing 2Lcom/groupbyinc/flux/cluster/routing/ShardRouting; routingNode 1Lcom/groupbyinc/flux/cluster/routing/RoutingNode; entry ?Lcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectObjectCursor; ILcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectObjectCursor; Z explanation nodes XLcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectLookupContainer; DLcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectLookupContainer; state *Lcom/groupbyinc/flux/cluster/ClusterState; indicesToMarkReadOnly )Lcom/groupbyinc/flux/cluster/ClusterInfo; usages pLcom/groupbyinc/flux/common/collect/ImmutableOpenMap; 5Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; !com/groupbyinc/flux/client/Client8 admin *()Lcom/groupbyinc/flux/client/AdminClient;:;9< &com/groupbyinc/flux/client/AdminClient> indices 1()Lcom/groupbyinc/flux/client/IndicesAdminClient;@A?B EMPTY_ARRAY [Ljava/lang/String;DE vF toArray (([Ljava/lang/Object;)[Ljava/lang/Object;HI ?JE -com/groupbyinc/flux/client/IndicesAdminClientM prepareUpdateSettings i([Ljava/lang/String;)Lcom/groupbyinc/flux/action/admin/indices/settings/put/UpdateSettingsRequestBuilder;OPNQ builder 8()Lcom/groupbyinc/flux/common/settings/Settings$Builder;ST
U #index.blocks.read_only_allow_deleteW put K(Ljava/lang/String;Z)Lcom/groupbyinc/flux/common/settings/Settings$Builder;YZ
[ build 0()Lcom/groupbyinc/flux/common/settings/Settings;]^
_ Rcom/groupbyinc/flux/action/admin/indices/settings/put/UpdateSettingsRequestBuildera setSettings ?(Lcom/groupbyinc/flux/common/settings/Settings;)Lcom/groupbyinc/flux/action/admin/indices/settings/put/UpdateSettingsRequestBuilder;cd
be execute +()Lcom/groupbyinc/flux/action/ActionFuture;gh
bi cluster 1()Lcom/groupbyinc/flux/client/ClusterAdminClient;kl?m -com/groupbyinc/flux/client/ClusterAdminCliento prepareReroute Q()Lcom/groupbyinc/flux/action/admin/cluster/reroute/ClusterRerouteRequestBuilder;qrps Mcom/groupbyinc/flux/action/admin/cluster/reroute/ClusterRerouteRequestBuilderu
vi getBlocks 3()Lcom/groupbyinc/flux/cluster/block/ClusterBlocks;xy
?z 3com/groupbyinc/flux/cluster/block/ClusterBlockLevel| WRITE 5Lcom/groupbyinc/flux/cluster/block/ClusterBlockLevel;~ }? /com/groupbyinc/flux/cluster/block/ClusterBlocks? indexBlocked J(Lcom/groupbyinc/flux/cluster/block/ClusterBlockLevel;Ljava/lang/String;)Z??
?? Signature Code LocalVariableTable LocalVariableTypeTable LineNumberTable ?(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/util/function/Supplier;Lcom/groupbyinc/flux/common/settings/ClusterSettings;Lcom/groupbyinc/flux/client/Client;)V
StackMapTable &(Ljava/util/Set;)V BootstrapMethods
SourceFile InnerClasses ! ? ? ? ? %*+? *? &? (*,? **? ,Y+-? /? 1*? 3? ? 4 % 4 5 % 6 7 % % 8 9 % ? % ? 9 3 : ; <