
com.groupbyinc.flux.gateway.MetaStateService.class Maven / Gradle / Ivy
???? 3- ,com/groupbyinc/flux/gateway/MetaStateService 6com/groupbyinc/flux/common/component/AbstractComponent MetaStateService.java .com/groupbyinc/flux/gateway/MetaStateService$2 .com/groupbyinc/flux/gateway/MetaStateService$1 5com/groupbyinc/flux/common/xcontent/ToXContent$Params
.com/groupbyinc/flux/common/xcontent/ToXContent Params 5com/groupbyinc/flux/cluster/metadata/MetaData$Builder -com/groupbyinc/flux/cluster/metadata/MetaData Builder 8com/groupbyinc/flux/common/xcontent/ToXContent$MapParams MapParams FORMAT_SETTING Ljava/lang/String; gateway.format GLOBAL_STATE_FILE_PREFIX global- INDEX_STATE_FILE_PREFIX state- nodeEnv )Lcom/groupbyinc/flux/env/NodeEnvironment; format 2Lcom/groupbyinc/flux/common/xcontent/XContentType; formatParams 7Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params; gatewayModeFormatParams indexStateFormat 1Lcom/groupbyinc/flux/gateway/MetaDataStateFormat; gLcom/groupbyinc/flux/gateway/MetaDataStateFormat; globalStateFormat bLcom/groupbyinc/flux/gateway/MetaDataStateFormat; Z(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/env/NodeEnvironment;)V *Lcom/groupbyinc/flux/common/inject/Inject; 1(Lcom/groupbyinc/flux/common/settings/Settings;)V - 0
1 ! " 3 smile 5 ,com/groupbyinc/flux/common/settings/Settings 7 get 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; 9 :
8 ; 0com/groupbyinc/flux/common/xcontent/XContentType = fromRestContentType F(Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentType; ? @
> A # $ C SMILE E $ > F 5com/groupbyinc/flux/common/google/common/collect/Maps H
newHashMap ()Ljava/util/HashMap; J K
I L binary N true P
java/util/Map R put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; T U S V (Ljava/util/Map;)V - X
Y % & [ context_mode ] CONTEXT_MODE_GATEWAY _ ` ' & b 'com/groupbyinc/flux/env/NodeEnvironment d EMPTY_PARAMS f &
g ?(Lcom/groupbyinc/flux/common/xcontent/XContentType;Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params;)Lcom/groupbyinc/flux/gateway/MetaDataStateFormat; ( i
j ( ) l + i
n + ) p params 5Ljava/util/Map; Ljava/util/Map; gatewayModeParams this .Lcom/groupbyinc/flux/gateway/MetaStateService; settings .Lcom/groupbyinc/flux/common/settings/Settings;
loadFullState 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData; java/lang/Exception | loadGlobalState ~ {
builder h(Lcom/groupbyinc/flux/cluster/metadata/MetaData;)Lcom/groupbyinc/flux/cluster/metadata/MetaData$Builder; ? ?
? 9()Lcom/groupbyinc/flux/cluster/metadata/MetaData$Builder; ? ?
? findAllIndices ()Ljava/util/Set; ? ?
e ?
java/util/Set ? iterator ()Ljava/util/Iterator; ? ? ? ? java/util/Iterator ? hasNext ()Z ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? java/lang/String ? loadIndexState H(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; ? ?
? logger -Lcom/groupbyinc/flux/common/logging/ESLogger; ? ? ? 8[{}] failed to find metadata for existing index location ? java/lang/Object ? +com/groupbyinc/flux/common/logging/ESLogger ? debug ((Ljava/lang/String;[Ljava/lang/Object;)V ? ? ? ? 2com/groupbyinc/flux/cluster/metadata/IndexMetaData ? n(Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;Z)Lcom/groupbyinc/flux/cluster/metadata/MetaData$Builder; T ?
? build ? {
? metaDataBuilder 7Lcom/groupbyinc/flux/cluster/metadata/MetaData$Builder;
indexMetaData 4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; index globalMetaData /Lcom/groupbyinc/flux/cluster/metadata/MetaData; indices #Ljava/util/Set; Ljava/util/Set; java/io/IOException ? %Lcom/groupbyinc/flux/common/Nullable; com/groupbyinc/flux/index/Index ? (Ljava/lang/String;)V - ?
? ?
indexPaths 8(Lcom/groupbyinc/flux/index/Index;)[Ljava/nio/file/Path; ? ?
e ? /com/groupbyinc/flux/gateway/MetaDataStateFormat ? loadLatestState V(Lcom/groupbyinc/flux/common/logging/ESLogger;[Ljava/nio/file/Path;)Ljava/lang/Object; ? ?
? ?
nodeDataPaths ()[Ljava/nio/file/Path; ? ?
e ? addDefaultUnitsIfNeeded ?(Lcom/groupbyinc/flux/common/logging/ESLogger;Lcom/groupbyinc/flux/cluster/metadata/MetaData;)Lcom/groupbyinc/flux/cluster/metadata/MetaData; ? ?
? globalState
writeIndex }(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;)V java/lang/Throwable ? [{}] writing state, reason [{}] ? getIndex ()Ljava/lang/String; ? ?
? ? trace ? ? ? ?
getVersion ()J ? ?
? ? write +(Ljava/lang/Object;J[Ljava/nio/file/Path;)V ? ?
? ? ![{}]: failed to write index state ? warn =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V ? ? ? ? java/lang/StringBuilder ? ()V - ?
? ? failed to write state for [ ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ?
? ] toString ?
? *(Ljava/lang/String;Ljava/lang/Throwable;)V -
? ex Ljava/lang/Throwable; reason previousIndexMetaData writeGlobalState D(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/metadata/MetaData;)V $[_global] writing state, reason [{}] version ?
'[_global]: failed to write global state failed to write global state metaData ~(Lcom/groupbyinc/flux/common/xcontent/XContentType;Ljava/lang/String;Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params;)V -
ConstantValue Signature Code LocalVariableTable LocalVariableTypeTable LineNumberTable
StackMapTable RuntimeVisibleAnnotations
Exceptions "RuntimeVisibleParameterAnnotations ?(Lcom/groupbyinc/flux/common/xcontent/XContentType;Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params;)Lcom/groupbyinc/flux/gateway/MetaDataStateFormat; ?(Lcom/groupbyinc/flux/common/xcontent/XContentType;Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params;)Lcom/groupbyinc/flux/gateway/MetaDataStateFormat;
SourceFile InnerClasses ! ! " # $ % &