
com.groupbyinc.flux.gateway.DanglingIndicesState.class Maven / Gradle / Ivy
???? 3 ? 0com/groupbyinc/flux/gateway/DanglingIndicesState 6com/groupbyinc/flux/common/component/AbstractComponent DanglingIndicesState.java 2com/groupbyinc/flux/gateway/DanglingIndicesState$1 :com/groupbyinc/flux/cluster/metadata/IndexMetaData$Builder 2com/groupbyinc/flux/cluster/metadata/IndexMetaData
Builder @com/groupbyinc/flux/gateway/LocalAllocateDangledIndices$Listener
7com/groupbyinc/flux/gateway/LocalAllocateDangledIndices Listener nodeEnv )Lcom/groupbyinc/flux/env/NodeEnvironment; metaStateService .Lcom/groupbyinc/flux/gateway/MetaStateService; allocateDangledIndices 9Lcom/groupbyinc/flux/gateway/LocalAllocateDangledIndices; danglingIndices Ljava/util/Map; WLjava/util/Map; ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/env/NodeEnvironment;Lcom/groupbyinc/flux/gateway/MetaStateService;Lcom/groupbyinc/flux/gateway/LocalAllocateDangledIndices;)V *Lcom/groupbyinc/flux/common/inject/Inject; 1(Lcom/groupbyinc/flux/common/settings/Settings;)V
@com/groupbyinc/flux/common/util/concurrent/ConcurrentCollections ! newConcurrentMap &()Ljava/util/concurrent/ConcurrentMap; # $
" % ' ) + - this 2Lcom/groupbyinc/flux/gateway/DanglingIndicesState; settings .Lcom/groupbyinc/flux/common/settings/Settings; processDanglingIndices 2(Lcom/groupbyinc/flux/cluster/metadata/MetaData;)V 'com/groupbyinc/flux/env/NodeEnvironment 5 hasNodeFile ()Z 7 8
6 9 cleanupAllocatedDangledIndices ; 4
< findNewAndAddDanglingIndices > 4
? allocateDanglingIndices ()V A B
C metaData /Lcom/groupbyinc/flux/cluster/metadata/MetaData; getDanglingIndices ()Ljava/util/Map; =com/groupbyinc/flux/common/google/common/collect/ImmutableMap I copyOf P(Ljava/util/Map;)Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap; K L
J M
java/util/Map O keySet ()Ljava/util/Set; Q R P S
java/util/Set U iterator ()Ljava/util/Iterator; W X V Y java/util/Iterator [ hasNext ] 8 \ ^ next ()Ljava/lang/Object; ` a \ b java/lang/String d -com/groupbyinc/flux/cluster/metadata/MetaData f hasIndex (Ljava/lang/String;)Z h i
g j logger -Lcom/groupbyinc/flux/common/logging/ESLogger; l m n >[{}] no longer dangling (created), removing from dangling list p java/lang/Object r +com/groupbyinc/flux/common/logging/ESLogger t debug ((Ljava/lang/String;[Ljava/lang/Object;)V v w u x remove &(Ljava/lang/Object;)Ljava/lang/Object; z { P |
danglingIndex Ljava/lang/String; findNewDanglingIndices @(Lcom/groupbyinc/flux/cluster/metadata/MetaData;)Ljava/util/Map; ? ?
? putAll (Ljava/util/Map;)V ? ? P ? java/lang/Throwable ? findAllIndices ? R
6 ? failed to list dangling indices ? warn =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V ? ? u ? of A()Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap; ? ?
J ? 5com/groupbyinc/flux/common/google/common/collect/Maps ?
newHashMap ()Ljava/util/HashMap; ? ?
? ? containsKey (Ljava/lang/Object;)Z ? ? P ? ,com/groupbyinc/flux/gateway/MetaStateService ? loadIndexState H(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; ? ?
? ? k[{}] dangling index, exists on local file system, but not in cluster metadata, auto import to cluster state ? info ? w u ? getIndex ()Ljava/lang/String; ? ?
? equals ? ?
e ? Tdangled index directory name is [{}], state name is [{}], renaming to directory name ? builder r(Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData$Builder; ? ?
? index P(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData$Builder; ? ?
? build 6()Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; ? ?
? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? P ? :[{}] dangling index directory detected, but no state found ? :[{}] failed to load index state for detected dangled index ? indices #Ljava/util/Set; Ljava/util/Set; e Ljava/lang/Throwable;
indexMetaData 4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; t indexName
newIndices isEmpty ? 8 P ? java/util/ArrayList ? values ()Ljava/util/Collection; ? ? P ? (Ljava/util/Collection;)V ?
? ? java/util/Collections ? unmodifiableCollection .(Ljava/util/Collection;)Ljava/util/Collection; ? ?
? ? 5(Lcom/groupbyinc/flux/gateway/DanglingIndicesState;)V ?
? allocateDangled [(Ljava/util/Collection;Lcom/groupbyinc/flux/gateway/LocalAllocateDangledIndices$Listener;)V ? ?
? failed to send allocate dangled ?
access$000 a(Lcom/groupbyinc/flux/gateway/DanglingIndicesState;)Lcom/groupbyinc/flux/common/logging/ESLogger; x0
access$100 Signature Code LocalVariableTable LineNumberTable RuntimeVisibleAnnotations
StackMapTable Y()Ljava/util/Map; LocalVariableTypeTable ?(Lcom/groupbyinc/flux/cluster/metadata/MetaData;)Ljava/util/Map;
SourceFile InnerClasses ! ? ? ? *+? *? &? (*,? **-? ,*? .? ? 4 / 0 1 2 ? 4 / 5 6 7 8 ? 3 4 ? k *? *? :? ?*+? =*+? @*? D? ? / 0 E F ? ?
@ B C D E ? G H ? 2 *? (? N? ? / 0 ? K ? ? ; 4 ? ? L*? (? T ? Z M,? _ ? 6,? c ? eN+-? k? !*? oq? sY-S? y *? (-? } W??DZ ? " &