com.groupbyinc.flux.gateway.GatewayMetaState.class Maven / Gradle / Ivy
???? 4? ,com/groupbyinc/flux/gateway/GatewayMetaState 6com/groupbyinc/flux/common/component/AbstractComponent /com/groupbyinc/flux/cluster/ClusterStateApplier GatewayMetaState.java ?com/groupbyinc/flux/gateway/GatewayMetaState$IndexMetaWriteInfo IndexMetaWriteInfo 5com/groupbyinc/flux/cluster/metadata/MetaData$Builder -com/groupbyinc/flux/cluster/metadata/MetaData
Builder java/util/Map$Entry
java/util/Map Entry 8com/groupbyinc/flux/cluster/metadata/IndexMetaData$State 2com/groupbyinc/flux/cluster/metadata/IndexMetaData State 4com/groupbyinc/flux/cluster/metadata/MetaData$Custom Custom %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup nodeEnv )Lcom/groupbyinc/flux/env/NodeEnvironment; metaStateService .Lcom/groupbyinc/flux/gateway/MetaStateService; previousMetaData /Lcom/groupbyinc/flux/cluster/metadata/MetaData; %Lcom/groupbyinc/flux/common/Nullable; previouslyWrittenIndices Ljava/util/Set; 2Ljava/util/Set; ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/env/NodeEnvironment;Lcom/groupbyinc/flux/gateway/MetaStateService;Lcom/groupbyinc/flux/cluster/metadata/MetaDataIndexUpgradeService;Lcom/groupbyinc/flux/plugins/MetaDataUpgrader;)V java/io/IOException . java/lang/Exception 0 1(Lcom/groupbyinc/flux/common/settings/Settings;)V , 2
3 java/util/Collections 5 emptySet ()Ljava/util/Set; 7 8
6 9 ) * ; " # = $ % ? .com/groupbyinc/flux/cluster/node/DiscoveryNode A
isDataNode 1(Lcom/groupbyinc/flux/common/settings/Settings;)Z C D
B E ensureNoPre019ShardState ,(Lcom/groupbyinc/flux/env/NodeEnvironment;)V G H
I ,com/groupbyinc/flux/common/settings/Settings K 'com/groupbyinc/flux/env/NodeEnvironment M ,com/groupbyinc/flux/gateway/MetaStateService O @com/groupbyinc/flux/cluster/metadata/MetaDataIndexUpgradeService Q ,com/groupbyinc/flux/plugins/MetaDataUpgrader S isMasterNode U D
B V ensureAtomicMoveSupported ()V X Y
N Z ensureNoPre019State \ Y
] 3com/groupbyinc/flux/common/util/IndexFolderUpgrader _ upgradeIndicesIfNeeded Z(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/env/NodeEnvironment;)V a b
` c
loadFullState 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData; e f
P g upgradeMetaData ?(Lcom/groupbyinc/flux/cluster/metadata/MetaData;Lcom/groupbyinc/flux/cluster/metadata/MetaDataIndexUpgradeService;Lcom/groupbyinc/flux/plugins/MetaDataUpgrader;)Lcom/groupbyinc/flux/cluster/metadata/MetaData; i j
k isGlobalStateEquals a(Lcom/groupbyinc/flux/cluster/metadata/MetaData;Lcom/groupbyinc/flux/cluster/metadata/MetaData;)Z m n
o upgrade q writeGlobalState D(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/metadata/MetaData;)V s t
P u iterator ()Ljava/util/Iterator; w x
y java/util/Iterator { hasNext ()Z } ~ | next ()Ljava/lang/Object; ? ? | ? hasIndexMetaData 7(Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;)Z ? ?
?
writeIndex I(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;)V ? ?
P ? java/lang/System ? nanoTime ()J ? ?
? ? logger !Lorg/apache/logging/log4j/Logger; ? ? ? took {} to load state ? )com/groupbyinc/flux/common/unit/TimeValue ?
nsecToMSec (J)J ? ?
? ? timeValueMillis .(J)Lcom/groupbyinc/flux/common/unit/TimeValue; ? ?
? ? org/apache/logging/log4j/Logger ? debug '(Ljava/lang/String;Ljava/lang/Object;)V ? ? ? ? &failed to read local state, exiting... ? error *(Ljava/lang/String;Ljava/lang/Throwable;)V ? ? ? ?
indexMetaData 4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; metaData upgradedMetaData startNS J e Ljava/lang/Exception; this .Lcom/groupbyinc/flux/gateway/GatewayMetaState; settings .Lcom/groupbyinc/flux/common/settings/Settings; metaDataIndexUpgradeService BLcom/groupbyinc/flux/cluster/metadata/MetaDataIndexUpgradeService; metaDataUpgrader .Lcom/groupbyinc/flux/plugins/MetaDataUpgrader;
loadMetaState applyClusterState 4(Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;)V /com/groupbyinc/flux/cluster/ClusterChangedEvent ? state ,()Lcom/groupbyinc/flux/cluster/ClusterState; ? ?
? ? (com/groupbyinc/flux/cluster/ClusterState ? blocks 3()Lcom/groupbyinc/flux/cluster/block/ClusterBlocks; ? ?
? ? /com/groupbyinc/flux/cluster/block/ClusterBlocks ? disableStatePersistence ? ~
? ? &