All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.groupbyinc.flux.snapshots.SnapshotShardsService.class Maven / Gradle / Ivy

There is a newer version: 59
Show newest version
????3?3com/groupbyinc/flux/snapshots/SnapshotShardsService?Lcom/groupbyinc/flux/common/component/AbstractLifecycleComponent;Lcom/groupbyinc/flux/cluster/ClusterStateListener;?com/groupbyinc/flux/common/component/AbstractLifecycleComponent0com/groupbyinc/flux/cluster/ClusterStateListenerSnapshotShardsService.java5com/groupbyinc/flux/snapshots/SnapshotShardsService$3	Ucom/groupbyinc/flux/snapshots/SnapshotShardsService$UpdateSnapshotStateRequestHandler!UpdateSnapshotStateRequestHandlerYcom/groupbyinc/flux/snapshots/SnapshotShardsService$UpdateIndexShardSnapshotStatusRequest%UpdateIndexShardSnapshotStatusRequestBcom/groupbyinc/flux/snapshots/SnapshotShardsService$SnapshotShardsSnapshotShards5com/groupbyinc/flux/snapshots/SnapshotShardsService$25com/groupbyinc/flux/snapshots/SnapshotShardsService$1java/util/Map$Entry
java/util/MapEntryEcom/groupbyinc/flux/common/google/common/collect/ImmutableMap$Builder=com/groupbyinc/flux/common/google/common/collect/ImmutableMapBuilder5com/groupbyinc/flux/cluster/SnapshotsInProgress$Entry"/com/groupbyinc/flux/cluster/SnapshotsInProgress$Ccom/groupbyinc/flux/cluster/SnapshotsInProgress$ShardSnapshotStatus&ShardSnapshotStatus/com/groupbyinc/flux/threadpool/ThreadPool$Names))com/groupbyinc/flux/threadpool/ThreadPool+Names/com/groupbyinc/flux/cluster/ClusterState$Custom.(com/groupbyinc/flux/cluster/ClusterState0Custom5com/groupbyinc/flux/cluster/SnapshotsInProgress$State3StateBcom/groupbyinc/flux/index/snapshots/IndexShardSnapshotStatus$Stage6;updatedSnapshotStateQueue$Ljava/util/concurrent/BlockingQueue;?Ljava/util/concurrent/BlockingQueue;(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/cluster/ClusterService;Lcom/groupbyinc/flux/snapshots/SnapshotsService;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/transport/TransportService;Lcom/groupbyinc/flux/indices/IndicesService;)V*Lcom/groupbyinc/flux/common/inject/Inject;1(Lcom/groupbyinc/flux/common/settings/Settings;)VSV
W(java/util/concurrent/locks/ReentrantLockY()VS[
Z\IJ	^java/util/concurrent/locks/Lock`newCondition(()Ljava/util/concurrent/locks/Condition;bcadKL	fofA()Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap;hi
 jMN	l@com/groupbyinc/flux/common/util/concurrent/ConcurrentCollectionsnnewBlockingQueue&()Ljava/util/concurrent/BlockingQueue;pq
orPQ	tAB	vCD	xEF	z?@	|GH	~.com/groupbyinc/flux/cluster/node/DiscoveryNode?dataNode1(Lcom/groupbyinc/flux/common/settings/Settings;)Z??
??*com/groupbyinc/flux/cluster/ClusterService?addLast5(Lcom/groupbyinc/flux/cluster/ClusterStateListener;)V????,com/groupbyinc/flux/common/settings/Settings?.com/groupbyinc/flux/snapshots/SnapshotsService?.com/groupbyinc/flux/transport/TransportService?*com/groupbyinc/flux/indices/IndicesService?
masterNode??
??same?8(Lcom/groupbyinc/flux/snapshots/SnapshotShardsService;)VS?
?registerRequestHandlero(Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;Lcom/groupbyinc/flux/transport/TransportRequestHandler;)V??
??this5Lcom/groupbyinc/flux/snapshots/SnapshotShardsService;settings.Lcom/groupbyinc/flux/common/settings/Settings;doStartdoStopjava/lang/InterruptedException?lock?[a?isEmpty()Z??
 ?java/util/concurrent/TimeUnit?SECONDSLjava/util/concurrent/TimeUnit;??	??$java/util/concurrent/locks/Condition?await#(JLjava/util/concurrent/TimeUnit;)Z????unlock?[a?java/lang/Thread?
currentThread()Ljava/lang/Thread;??
??	interrupt?[
??java/lang/Throwable?ex Ljava/lang/InterruptedException;doCloseremove????clusterChanged4(Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;)V/com/groupbyinc/flux/cluster/ClusterChangedEvent?
previousState,()Lcom/groupbyinc/flux/cluster/ClusterState;??
??	snapshots?customE(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/ClusterState$Custom;??
1?state??
??processIndexShardSnapshots??
?equals(Ljava/lang/Object;)Z??
%?nodes3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;??
1?/com/groupbyinc/flux/cluster/node/DiscoveryNodes?masterNodeId()Ljava/lang/String;??
??java/lang/String?
??syncShardStatsOnNewMaster??
?logger-Lcom/groupbyinc/flux/common/logging/ESLogger;??	? Failed to update snapshot state ?java/lang/Object?+com/groupbyinc/flux/common/logging/ESLoggerwarn=(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)Vprev1Lcom/groupbyinc/flux/cluster/SnapshotsInProgress;currtLjava/lang/Throwable;event1Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;currentSnapshotShardsB(Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;)Ljava/util/Map;get&(Ljava/lang/Object;)Ljava/lang/Object;
 
access$000U(Lcom/groupbyinc/flux/snapshots/SnapshotShardsService$SnapshotShards;)Ljava/util/Map;

snapshotId1Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;snapshotShardsDLcom/groupbyinc/flux/snapshots/SnapshotShardsService$SnapshotShards;5com/groupbyinc/flux/common/google/common/collect/Maps
newHashMap()Ljava/util/HashMap;
 entrySetA()Lcom/groupbyinc/flux/common/google/common/collect/ImmutableSet;"#
 $=com/groupbyinc/flux/common/google/common/collect/ImmutableSet&iteratorI()Lcom/groupbyinc/flux/common/google/common/collect/UnmodifiableIterator;()
'*java/util/Iterator,hasNext.?-/next()Ljava/lang/Object;12-3getKey526/com/groupbyinc/flux/cluster/metadata/SnapshotId8snapshotj(Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;)Lcom/groupbyinc/flux/cluster/SnapshotsInProgress$Entry;:;
%<getValue>2?put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;ABC	localNode2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;EF?GidI?
?Jentries()Ljava/util/List;LM
%Njava/util/ListP()Ljava/util/Iterator;(RQS9()Lcom/groupbyinc/flux/cluster/SnapshotsInProgress$State;?U
#VSTARTED7Lcom/groupbyinc/flux/cluster/SnapshotsInProgress$State;XY	4Z3()Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;\
#]shards_i
#`nodeIdb?
'c
'VINITfY	4gcontainsKeyi?j [{}] - Adding shard to the queueltrace((Ljava/lang/String;[Ljava/lang/Object;)Vnop
9\?builderI()Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap$Builder;tu
 vputAllX(Ljava/util/Map;)Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap$Builder;xy
zbuild|i
}y(Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap;Lcom/groupbyinc/flux/snapshots/SnapshotShardsService$1;)VS
?copyOfP(Ljava/util/Map;)Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap;??
 ?ABORTED?Y	4?K$SwitchMap$org$elasticsearch$index$snapshots$IndexShardSnapshotStatus$Stage[I??	
?stageF()Lcom/groupbyinc/flux/index/snapshots/IndexShardSnapshotStatus$Stage;??
9?ordinal()I??
7?abort?[
9?R[{}] trying to cancel snapshot on shard [{}] that is finalizing, letting it finish?debug?o?d[{}] trying to cancel snapshot on the shard [{}] that is already done, updating status on the master?'com/groupbyinc/flux/index/shard/ShardId?localNodeId??
??SUCCESS?Y	4?L(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/SnapshotsInProgress$State;)VS?
'?updateIndexShardSnapshotStatus?(Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;Lcom/groupbyinc/flux/index/shard/ShardId;Lcom/groupbyinc/flux/cluster/SnapshotsInProgress$ShardSnapshotStatus;)V??
?g[{}] trying to cancel snapshot on the shard [{}] that has already failed, updating status on the master?FAILED?Y	4?failure??
9?^(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/SnapshotsInProgress$State;Ljava/lang/String;)VS?
'?java/lang/IllegalStateException?java/lang/StringBuilder?
?\Unknown snapshot shard stage ?append-(Ljava/lang/String;)Ljava/lang/StringBuilder;??
??-(Ljava/lang/Object;)Ljava/lang/StringBuilder;??
??toString??
??(Ljava/lang/String;)VS?
??	signalAll?[??:executor3(Ljava/lang/String;)Ljava/util/concurrent/Executor;??
,?()Ljava/util/Set;"??
java/util/Set??Sjava/util/concurrent/Executor?getIndex??
??indexServiceSafe<(Ljava/lang/String;)Lcom/groupbyinc/flux/index/IndexService;??
??I?
??&com/groupbyinc/flux/index/IndexService?shard/(I)Lcom/groupbyinc/flux/index/shard/IndexShard;??
???(Lcom/groupbyinc/flux/snapshots/SnapshotShardsService;Lcom/groupbyinc/flux/index/shard/IndexShard;Ljava/util/Map$Entry;Ljava/util/Map$Entry;Lcom/groupbyinc/flux/index/shard/ShardId;Ljava/lang/String;)VS?
?execute(Ljava/lang/Runnable;)V????$com/groupbyinc/flux/ExceptionsHelper?detailedMessage)(Ljava/lang/Throwable;)Ljava/lang/String;??
??entry?Ljava/util/Map$Entry;Ljava/util/Map$Entry;?Ljava/util/Map$Entry;?Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap$Builder;GLcom/groupbyinc/flux/common/google/common/collect/ImmutableMap$Builder;
startedShardsxLjava/util/Map;Ljava/util/Map;snapshotStatus>Lcom/groupbyinc/flux/index/snapshots/IndexShardSnapshotStatus;7Lcom/groupbyinc/flux/cluster/SnapshotsInProgress$Entry;
indexShard,Lcom/groupbyinc/flux/index/shard/IndexShard;shardId)Lcom/groupbyinc/flux/index/shard/ShardId;
shardEntry~Ljava/util/Map$Entry;?Ljava/util/Map$Entry;>;Ljava/util/concurrent/Executor;snapshotsInProgress	survivors?Ljava/util/Map;newSnapshots?Ljava/util/Map;>;?(Lcom/groupbyinc/flux/index/shard/IndexShard;Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;Lcom/groupbyinc/flux/index/snapshots/IndexShardSnapshotStatus;)V>com/groupbyinc/flux/index/engine/SnapshotFailedEngineExceptionEcom/groupbyinc/flux/index/snapshots/IndexShardSnapshotFailedExceptiongetRepositoriesService8()Lcom/groupbyinc/flux/repositories/RepositoriesService;
?
getRepository?
94com/groupbyinc/flux/repositories/RepositoriesServiceindexShardRepositoryN(Ljava/lang/String;)Lcom/groupbyinc/flux/index/snapshots/IndexShardRepository;!"
 #*com/groupbyinc/flux/index/shard/IndexShard%+()Lcom/groupbyinc/flux/index/shard/ShardId;'
&(routingEntry4()Lcom/groupbyinc/flux/cluster/routing/ShardRouting;*+
&,0com/groupbyinc/flux/cluster/routing/ShardRouting.primary0?
/1,snapshot should be performed only on primary3>(Lcom/groupbyinc/flux/index/shard/ShardId;Ljava/lang/String;)VS5
68com/groupbyinc/flux/index/snapshots/IndexShardRepository8
relocating:?
/; cannot snapshot while relocating=3()Lcom/groupbyinc/flux/index/shard/IndexShardState;??
&@/com/groupbyinc/flux/index/shard/IndexShardStateBCREATED1Lcom/groupbyinc/flux/index/shard/IndexShardState;DE	CF
RECOVERINGHE	CIshard didn't fully recover yetK
snapshotIndexA(Z)Lcom/groupbyinc/flux/index/deletionpolicy/SnapshotIndexCommit;MN
&O?(Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;Lcom/groupbyinc/flux/index/shard/ShardId;Lcom/groupbyinc/flux/index/deletionpolicy/SnapshotIndexCommit;Lcom/groupbyinc/flux/index/snapshots/IndexShardSnapshotStatus;)V:Q9RisDebugEnabledT?U
snapshot (WgetSnapshotY?
9Z) completed to \, took [^time()J`a
9b)com/groupbyinc/flux/common/unit/TimeValuedtimeValueMillis.(J)Lcom/groupbyinc/flux/common/unit/TimeValue;fg
eh]
j    index    : version [lindexVersionna
9o(J)Ljava/lang/StringBuilder;?q
?r], number_of_files [t
numberOfFilesv?
9w(I)Ljava/lang/StringBuilder;?y
?z] with total_size [|-com/groupbyinc/flux/common/unit/ByteSizeValue~	totalSize?a
9?(J)VS?
?Lcom/groupbyinc/flux/index/deletionpolicy/SnapshotIndexCommit;e@Lcom/groupbyinc/flux/index/engine/SnapshotFailedEngineException;GLcom/groupbyinc/flux/index/snapshots/IndexShardSnapshotFailedException;:Lcom/groupbyinc/flux/index/snapshots/IndexShardRepository;
?	completed??
4?DONEDLcom/groupbyinc/flux/index/snapshots/IndexShardSnapshotStatus$Stage;??	7?s[{}] new master thinks the shard [{}] is not completed but the shard is done locally, updating status on the master?FAILURE??	7?n[{}] new master thinks the shard [{}] is not completed but the shard failed locally, updating status on master?localShardStatusmasterShardELcom/groupbyinc/flux/cluster/SnapshotsInProgress$ShardSnapshotStatus;
localShardmasterShards?Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap;localShardsS?
???localNodeMaster??
??innerUpdateSnapshotState^(Lcom/groupbyinc/flux/snapshots/SnapshotShardsService$UpdateIndexShardSnapshotStatusRequest;)V??
??F
??;com/groupbyinc/flux/transport/EmptyTransportResponseHandler?
INSTANCE_SAME=Lcom/groupbyinc/flux/transport/EmptyTransportResponseHandler;??	??sendRequest?(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Ljava/lang/String;Lcom/groupbyinc/flux/transport/TransportRequest;Lcom/groupbyinc/flux/transport/TransportResponseHandler;)V??
??)[{}] [{}] failed to update snapshot state?
]statusG()Lcom/groupbyinc/flux/cluster/SnapshotsInProgress$ShardSnapshotStatus;??
?request[Lcom/groupbyinc/flux/snapshots/SnapshotShardsService$UpdateIndexShardSnapshotStatusRequest;,received updated snapshot restore state [{}]?"java/util/concurrent/BlockingQueue?add????update snapshot state??(Lcom/groupbyinc/flux/snapshots/SnapshotShardsService;Lcom/groupbyinc/flux/snapshots/SnapshotShardsService$UpdateIndexShardSnapshotStatusRequest;)VS?
?submitStateUpdateTaskI(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/ClusterStateUpdateTask;)V????
access$200?(Lcom/groupbyinc/flux/snapshots/SnapshotShardsService;Lcom/groupbyinc/flux/index/shard/IndexShard;Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;Lcom/groupbyinc/flux/index/snapshots/IndexShardSnapshotStatus;)V:
?x0x1x2x3
access$300d(Lcom/groupbyinc/flux/snapshots/SnapshotShardsService;)Lcom/groupbyinc/flux/common/logging/ESLogger;
access$400[(Lcom/groupbyinc/flux/snapshots/SnapshotShardsService;)Ljava/util/concurrent/BlockingQueue;
access$500
access$600g(Lcom/groupbyinc/flux/snapshots/SnapshotShardsService;)Lcom/groupbyinc/flux/snapshots/SnapshotsService;
access$700
access$800
access$900access$1000
ConstantValue	SignatureCodeLocalVariableTableLineNumberTable
StackMapTableRuntimeVisibleAnnotations?(Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;)Ljava/util/Map;LocalVariableTypeTable
SourceFileInnerClasses!
;<?>?@ABCDEFGHIJKLBMN?OPQ?RST?3p*+?X*?ZY?]?_**?_?e?g*?k?m*?s?u*?w*-?y*?{*,?}*?+???
,*??+???>??Y*??????Hp??p??p?@pCDpGHpEFpAB?>fZ\^$`+g1h6i<jAkGlNoUr\tow??U???,???U?[?+?????|?[??T*?_??*?m???*?g?????????*?_???"L?Ŷ?*?_???M*?_??,??	(4?	(G4;G?5??T???*
?	?(?1?4?5?;?D?G?S??
	K?R??[?9*?}*???????
?
????&t+??ڶ??%M+??ڶ??%N,?-?*+??,-??*+??+????:?+?ض????*+???M*???,???_b??>
RE	C?<c
t??t
?:?
???"?*?2?7?C?Z?_?b?c?s???*%%?'B??o*?m+??M,??,??? ???????????????	
H+??ڶ??%M?!N*?m?%?+:?0?<?4?:,?),?7?9?=?-?7?@?DW????!:*?}?H?K:,??,?O?T:?0???4?#:?W?[??!:*?m?^??:	?a?%?+:

?0??
?4?:?@?'?d???_?@?'?e?h?L	?	??7?k?3*??m?Y?7S?q?7?9Y?r?DW??y?s?d?^?DW	?7?w:

	??{W
?{W-?^?Y
?~???DW?-?^?Y?????DW?~?W???s*?m?^??:?]?a?%?+:		?0?F	?4?:
?
?7???9:???????.??##+P?????*????Y?^SY
?7S????*????Y?^SY
?7S??*?^
?7???'Y+???????????t*????Y?^SY
?7S??*?^
?7???'Y+?????????????#??Y??Y????????ǶʷͿ?????I*?_??*-???m*?m???*?g??*?_???:*?_????s??*?Ѷ?:????:?0???4?:?@?????:		?0?s	?4?:

?7??:*?w??????:?Y*
????&:*?7?9?'Y?????????????Z?E`llnl????3*???q??s,_?
??	4??
?_??? !
?U	?a
?
???????
H??H

;7e?s??<?\	3*???q??s,_?
?4??
?a

???7e??"H?
??3?H?]?`?e?s?w??????????????7?M?P?Z?i?n?s?~??????????????????L?Q?T?v?y???????????6
9
<EMW`ilz?? ?!?"?$%53 4A6D7G9???%-???!?-?C?%?-#-?V?/??Q??--?_9$?K?P???#K?
?#?-?+-?S?%??--???"??:??	9*?y?,??$:+?):+?-?2??Y4?7?+?-??7?+?A?G?
+?A?J??YL?7?+?P:,-?S*???V????Y??:X??,?[??]????_??-?c?i??k??Wm??-?p?su??-?x?{}?ĻY-??????k??W*??????????
:????:?:?:?Y?????lee"e'??p?z??l?????$??)?9??999)!?#	?jBCD E-G7IDKXMeRlTyU?V?W?X?Y\
]\d^_"`$a'b)c8e?(?-9????G??	BDD?????Z+??ڶ??%M,??,?O?TN-?0?7-?4?#:?W?[??W???*?^??:??a:????:?0???4?:?7??:	?@?9:
	??':???e????
?????B*????Y?^SY	S??*?^	?'Y+???????????W?@?9?????D*????Y?^SY	S??*?^	?'Y+??????
??????????Ʊ?f
??		???
????????]??NQ?0&:Z??Z

M? ???]???Q??jk
lmo0pFqQrVs]t?u?v?w?x?z?|?}?~?}??/?<?P?S?V?Y????%?	-?)#?$ -???%-# -?9'?S?%-# -??%-????l?Y+,-??:*?}??????*??? *?{*?}?????>???ħ':*????Y??SY??S??DG??>I"
l??ll	l??`???"???'?D?G?I?k???'B?#???u5*????Y+S?q*?u+??W*?}ֻY*+?ٹ???5??5??????4<???P*+,-???*??????L???/*???????L???/*?u?????L???/*???????L???/*?y?????L???/*???????L???/*???????L???/*???????L???:*+?????????L???r

	
	 !	#%	'%(	*,-	/12	4%5@79:@




© 2015 - 2025 Weber Informatics LLC | Privacy Policy