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 ;com/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder 3com/groupbyinc/flux/common/collect/ImmutableOpenMap Builder 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 . java/lang/invoke/MethodHandles 0 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 G J
K 7 8 M 9 : O ; < Q = > S ? @ U 2com/groupbyinc/flux/cluster/service/ClusterService W addStateApplier 4(Lcom/groupbyinc/flux/cluster/ClusterStateApplier;)V Y Z
X [ A B ] logger 8Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger; _ ` a ;(Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;)V G c
d C D f 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 n
access$000 Q(Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;)Ljava/lang/String; p q
r 4com/groupbyinc/flux/repositories/RepositoriesService t
repository A(Ljava/lang/String;)Lcom/groupbyinc/flux/repositories/Repository; v w
u x +com/groupbyinc/flux/repositories/Repository z 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 ? q
? $cannot restore incompatible snapshot ? 9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V G ?
? ? 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 G ?
? ? *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; ? ?
? ? resolveIndices "(Ljava/util/List;)Ljava/util/List; ? ?
? ? getSnapshotMetaData m(Lcom/groupbyinc/flux/snapshots/SnapshotInfo;Ljava/util/List;)Lcom/groupbyinc/flux/cluster/metadata/MetaData; ? ? { ? validateSnapshotRestorable A(Ljava/lang/String;Lcom/groupbyinc/flux/snapshots/SnapshotInfo;)V ? ?
? 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 G ?
? submitStateUpdateTask I(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/ClusterStateTaskConfig;)V ? ?
X ? )com/groupbyinc/flux/action/ActionListener ? lambda$restoreSnapshot$2 Q(Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;)Ljava/lang/Object;
~(Lcom/groupbyinc/flux/snapshots/RestoreService$RestoreRequest;)Lcom/groupbyinc/flux/common/apache/logging/log4j/util/Supplier; ?
6com/groupbyinc/flux/common/apache/logging/log4j/Logger warn W(Lcom/groupbyinc/flux/common/apache/logging/log4j/util/Supplier;Ljava/lang/Throwable;)V
onFailure (Ljava/lang/Exception;)V -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; filteredIndices $Ljava/util/List; Ljava/util/List; 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/ArrayList3 ()V G5
46 entries8 ?
9 java/util/List; iterator ()Ljava/util/Iterator;=><? java/util/IteratorA hasNextC ?BD nextF ?BG shards 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;IJ
K
? Gcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectObjectCursorN key Ljava/lang/Object;PQ OR 'com/groupbyinc/flux/index/shard/ShardIdT getIndex #()Lcom/groupbyinc/flux/index/Index;VW
UX
java/util/SetZ contains\ ?[] builder t(Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap$Builder;_`
a FAILURE 5Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;cd $e index was deletedg \(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;Ljava/lang/String;)V Gi
!j put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;lm
n buildpJ
q *()Lcom/groupbyinc/flux/snapshots/Snapshot;!s
t STARTEDvd $w overallState ?(Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;yz
{
? ?(Lcom/groupbyinc/flux/snapshots/Snapshot;Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;Ljava/util/List;Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)V G~
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 G?
? 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;??
,? 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? ?
$? E F ? 8(Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;)Z??
? java/lang/AssertionError? 0state says completed but restore entries are not? (Ljava/lang/Object;)V G?
?? clean up snapshot restore state? +(Lcom/groupbyinc/flux/snapshots/Snapshot;)V G?
'? #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;p??? ?(Ljava/lang/String;Ljava/lang/Object;Lcom/groupbyinc/flux/cluster/ClusterStateTaskConfig;Lcom/groupbyinc/flux/cluster/ClusterStateTaskExecutor;Lcom/groupbyinc/flux/cluster/ClusterStateTaskListener;)V ??
X? event 1Lcom/groupbyinc/flux/cluster/ClusterChangedEvent; values @()Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectContainer;??
?