com.groupbyinc.flux.snapshots.RestoreService.class Maven / Gradle / Ivy
???? 4 ,com/groupbyinc/flux/snapshots/RestoreService 6com/groupbyinc/flux/common/component/AbstractComponent /com/groupbyinc/flux/cluster/ClusterStateApplier RestoreService.java ;com/groupbyinc/flux/snapshots/RestoreService$RestoreRequest RestoreRequest Jcom/groupbyinc/flux/snapshots/RestoreService$CleanRestoreStateTaskExecutor CleanRestoreStateTaskExecutor Ecom/groupbyinc/flux/snapshots/RestoreService$RestoreInProgressUpdater RestoreInProgressUpdater Fcom/groupbyinc/flux/snapshots/RestoreService$RestoreCompletionResponse RestoreCompletionResponse .com/groupbyinc/flux/snapshots/RestoreService$1 5com/groupbyinc/flux/cluster/metadata/MetaData$Builder -com/groupbyinc/flux/cluster/metadata/MetaData Builder ;com/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder 3com/groupbyinc/flux/common/collect/ImmutableOpenMap 3com/groupbyinc/flux/cluster/RestoreInProgress$Entry -com/groupbyinc/flux/cluster/RestoreInProgress ! Entry @com/groupbyinc/flux/cluster/RestoreInProgress$ShardRestoreStatus $ ShardRestoreStatus 3com/groupbyinc/flux/cluster/RestoreInProgress$State ' State Ocom/groupbyinc/flux/snapshots/RestoreService$CleanRestoreStateTaskExecutor$Task * Task /com/groupbyinc/flux/cluster/ClusterState$Custom - (com/groupbyinc/flux/cluster/ClusterState / Custom %java/lang/invoke/MethodHandles$Lookup 2 java/lang/invoke/MethodHandles 4 Lookup UNMODIFIABLE_SETTINGS Ljava/util/Set; #Ljava/util/Set; UNREMOVABLE_SETTINGS clusterService 4Lcom/groupbyinc/flux/cluster/service/ClusterService; repositoriesService 6Lcom/groupbyinc/flux/repositories/RepositoriesService; allocationService BLcom/groupbyinc/flux/cluster/routing/allocation/AllocationService; createIndexService ALcom/groupbyinc/flux/cluster/metadata/MetaDataCreateIndexService; metaDataIndexUpgradeService BLcom/groupbyinc/flux/cluster/metadata/MetaDataIndexUpgradeService; clusterSettings 5Lcom/groupbyinc/flux/common/settings/ClusterSettings; cleanRestoreStateTaskExecutor LLcom/groupbyinc/flux/snapshots/RestoreService$CleanRestoreStateTaskExecutor; $assertionsDisabled Z ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/repositories/RepositoriesService;Lcom/groupbyinc/flux/cluster/routing/allocation/AllocationService;Lcom/groupbyinc/flux/cluster/metadata/MetaDataCreateIndexService;Lcom/groupbyinc/flux/cluster/metadata/MetaDataIndexUpgradeService;Lcom/groupbyinc/flux/common/settings/ClusterSettings;)V *Lcom/groupbyinc/flux/common/inject/Inject; 1(Lcom/groupbyinc/flux/common/settings/Settings;)V K N
O ; < Q = > S ? @ U A B W C D Y 2com/groupbyinc/flux/cluster/service/ClusterService [ addStateApplier 4(Lcom/groupbyinc/flux/cluster/ClusterStateApplier;)V ] ^
\ _ E F a logger !Lorg/apache/logging/log4j/Logger; c d e $(Lorg/apache/logging/log4j/Logger;)V K g
h G H j this .Lcom/groupbyinc/flux/snapshots/RestoreService; settings .Lcom/groupbyinc/flux/common/settings/Settings; restoreSnapshot k(Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;Lcom/groupbyinc/flux/action/ActionListener;)V java/lang/Exception r
access$000 Q(Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;)Ljava/lang/String; t u
v 4com/groupbyinc/flux/repositories/RepositoriesService x
repository A(Ljava/lang/String;)Lcom/groupbyinc/flux/repositories/Repository; z {
y | +com/groupbyinc/flux/repositories/Repository ~ getRepositoryData 3()Lcom/groupbyinc/flux/repositories/RepositoryData; ? ? ? /com/groupbyinc/flux/repositories/RepositoryData ? getIncompatibleSnapshotIds ()Ljava/util/Collection; ? ?
? ? java/util/Collection ? stream ()Ljava/util/stream/Stream; ? ? ? ? "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; ? ?
? ? ? (Ljava/lang/Object;)Z ? lambda$restoreSnapshot$0 j(Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;Lcom/groupbyinc/flux/snapshots/SnapshotId;)Z ? ?
? ? -(Lcom/groupbyinc/flux/snapshots/SnapshotId;)Z ? test ](Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;)Ljava/util/function/Predicate; ? ? ? java/util/stream/Stream ? filter 9(Ljava/util/function/Predicate;)Ljava/util/stream/Stream; ? ? ? ? findFirst ()Ljava/util/Optional; ? ? ? ? java/util/Optional ? isPresent ()Z ? ?
? ? 6com/groupbyinc/flux/snapshots/SnapshotRestoreException ?
access$100 ? u
? $cannot restore incompatible snapshot ? 9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V K ?
? ? getSnapshotIds ? ?
? ? lambda$restoreSnapshot$1 ? ?
? ? ? snapshot does not exist ? get ()Ljava/lang/Object; ? ?
? ? (com/groupbyinc/flux/snapshots/SnapshotId ? getSnapshotInfo X(Lcom/groupbyinc/flux/snapshots/SnapshotId;)Lcom/groupbyinc/flux/snapshots/SnapshotInfo; ? ? ? &com/groupbyinc/flux/snapshots/Snapshot ? ?(Ljava/lang/String;Lcom/groupbyinc/flux/snapshots/SnapshotId;)V K ?
? ? validateSnapshotRestorable A(Ljava/lang/String;Lcom/groupbyinc/flux/snapshots/SnapshotInfo;)V ? ?
? *com/groupbyinc/flux/snapshots/SnapshotInfo ? indices ()Ljava/util/List; ? ?
? ? ()[Ljava/lang/String; ? ?
? indicesOptions 5()Lcom/groupbyinc/flux/action/support/IndicesOptions; ? ?
? +com/groupbyinc/flux/snapshots/SnapshotUtils ?
filterIndices h(Ljava/util/List;[Ljava/lang/String;Lcom/groupbyinc/flux/action/support/IndicesOptions;)Ljava/util/List; ? ?
? ? includeGlobalState ? ?
? getSnapshotGlobalMetaData [(Lcom/groupbyinc/flux/snapshots/SnapshotId;)Lcom/groupbyinc/flux/cluster/metadata/MetaData; ? ? ? builder h(Lcom/groupbyinc/flux/cluster/metadata/MetaData;)Lcom/groupbyinc/flux/cluster/metadata/MetaData$Builder; ? ?
? )com/groupbyinc/flux/action/ActionListener ? java/util/List ? 9()Lcom/groupbyinc/flux/cluster/metadata/MetaData$Builder; ? ?
? resolveIndices "(Ljava/util/List;)Ljava/util/List;
? iterator ()Ljava/util/Iterator; ? java/util/Iterator hasNext
? next
? (com/groupbyinc/flux/repositories/IndexId getSnapshotIndexMetaData ?(Lcom/groupbyinc/flux/snapshots/SnapshotId;Lcom/groupbyinc/flux/repositories/IndexId;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; put n(Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;Z)Lcom/groupbyinc/flux/cluster/metadata/MetaData$Builder;
build 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData;
renamedIndices ^(Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;Ljava/util/List;)Ljava/util/Map;
cause ()Ljava/lang/String;"#
$U(Lcom/groupbyinc/flux/snapshots/RestoreService;Lcom/groupbyinc/flux/snapshots/Snapshot;Ljava/util/Map;Lcom/groupbyinc/flux/snapshots/SnapshotInfo;Lcom/groupbyinc/flux/cluster/metadata/MetaData;Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;Lcom/groupbyinc/flux/snapshots/SnapshotId;Lcom/groupbyinc/flux/action/ActionListener;)V K&
' submitStateUpdateTask I(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/ClusterStateTaskConfig;)V)*
\+ ,()Lorg/apache/logging/log4j/message/Message;- lambda$restoreSnapshot$2 i(Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;)Lorg/apache/logging/log4j/message/Message;/0
12 n(Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;)Lorg/apache/logging/log4j/util/MessageSupplier; ?4 5 org/apache/logging/log4j/Logger7 warn G(Lorg/apache/logging/log4j/util/MessageSupplier;Ljava/lang/Throwable;)V9:8; onFailure (Ljava/lang/Exception;)V=> ?? metaDataBuilder 7Lcom/groupbyinc/flux/cluster/metadata/MetaData$Builder; indexId *Lcom/groupbyinc/flux/repositories/IndexId; -Lcom/groupbyinc/flux/repositories/Repository; repositoryData 1Lcom/groupbyinc/flux/repositories/RepositoryData; incompatibleSnapshotId @Ljava/util/Optional; Ljava/util/Optional; matchingSnapshotId
snapshotId *Lcom/groupbyinc/flux/snapshots/SnapshotId; snapshotInfo ,Lcom/groupbyinc/flux/snapshots/SnapshotInfo; snapshot (Lcom/groupbyinc/flux/snapshots/Snapshot; indicesInSnapshot $Ljava/util/List; Ljava/util/List; indexIdsInSnapshot ; metaData /Lcom/groupbyinc/flux/cluster/metadata/MetaData; 5Ljava/util/Map; Ljava/util/Map; e Ljava/lang/Exception; request =Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest; listener uLcom/groupbyinc/flux/action/ActionListener; +Lcom/groupbyinc/flux/action/ActionListener; $updateRestoreStateWithDeletedIndices o(Lcom/groupbyinc/flux/cluster/RestoreInProgress;Ljava/util/Set;)Lcom/groupbyinc/flux/cluster/RestoreInProgress; java/util/ArrayListd ()V Kf
eg entriesi ?
"j shards 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;lm
n
Gcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectObjectCursorq key Ljava/lang/Object;st ru 'com/groupbyinc/flux/index/shard/ShardIdw getIndex #()Lcom/groupbyinc/flux/index/Index;yz
x{
java/util/Set} contains ?~? t(Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder; ??
? FAILURE 5Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;?? (? index was deleted? \(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;Ljava/lang/String;)V K?
%? 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;?
?m
? *()Lcom/groupbyinc/flux/snapshots/Snapshot;P?
? STARTED?? (? overallState ?(Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;??
?
? ?(Lcom/groupbyinc/flux/snapshots/Snapshot;Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;Ljava/util/List;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)V K?
? add? ? ?? size ()I?? ?? toArray (([Ljava/lang/Object;)[Ljava/lang/Object;?? ?? 6[Lcom/groupbyinc/flux/cluster/RestoreInProgress$Entry;? 9([Lcom/groupbyinc/flux/cluster/RestoreInProgress$Entry;)V K?
"? shardId )Lcom/groupbyinc/flux/index/shard/ShardId; cursor ?Lcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectObjectCursor; ILcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectObjectCursor; ?Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; 5Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;
shardsBuilder ?Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder; =Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder; entry 5Lcom/groupbyinc/flux/cluster/RestoreInProgress$Entry;
oldRestore /Lcom/groupbyinc/flux/cluster/RestoreInProgress; deletedIndices 2Ljava/util/Set; changesMade GLjava/util/List; restoreInProgress ?(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/snapshots/Snapshot;)Lcom/groupbyinc/flux/cluster/RestoreInProgress$Entry; restore? custom E(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/ClusterState$Custom;??
0? equals? ?
?? state *Lcom/groupbyinc/flux/cluster/ClusterState; cleanupRestoreState 4(Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;)V /com/groupbyinc/flux/cluster/ClusterChangedEvent? ,()Lcom/groupbyinc/flux/cluster/ClusterState;??
?? 7()Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;??
? completed? ?
(? I J ? 8(Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)Z??
? java/lang/AssertionError? 0state says completed but restore entries are not? (Ljava/lang/Object;)V K?
?? clean up snapshot restore state? +(Lcom/groupbyinc/flux/snapshots/Snapshot;)V K?
+? #com/groupbyinc/flux/common/Priority? URGENT %Lcom/groupbyinc/flux/common/Priority;?? ?? 2com/groupbyinc/flux/cluster/ClusterStateTaskConfig? [(Lcom/groupbyinc/flux/common/Priority;)Lcom/groupbyinc/flux/cluster/ClusterStateTaskConfig;??? ?(Ljava/lang/String;Ljava/lang/Object;Lcom/groupbyinc/flux/cluster/ClusterStateTaskConfig;Lcom/groupbyinc/flux/cluster/ClusterStateTaskExecutor;Lcom/groupbyinc/flux/cluster/ClusterStateTaskListener;)V)?
\? event 1Lcom/groupbyinc/flux/cluster/ClusterChangedEvent; values @()Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectContainer;??