
com.groupbyinc.flux.snapshots.RestoreService$2.class Maven / Gradle / Ivy
???? 3? .com/groupbyinc/flux/snapshots/RestoreService$2 2com/groupbyinc/flux/cluster/ClusterStateUpdateTask RestoreService.java ,com/groupbyinc/flux/snapshots/RestoreService updateRestoreStateOnMaster V(Lcom/groupbyinc/flux/snapshots/RestoreService$UpdateIndexShardRestoreStatusRequest;)V 0com/groupbyinc/flux/snapshots/RestoreService$2$1 Qcom/groupbyinc/flux/snapshots/RestoreService$UpdateIndexShardRestoreStatusRequest
$UpdateIndexShardRestoreStatusRequest @com/groupbyinc/flux/cluster/RestoreInProgress$ShardRestoreStatus -com/groupbyinc/flux/cluster/RestoreInProgress ShardRestoreStatus 3com/groupbyinc/flux/cluster/RestoreInProgress$Entry Entry java/util/Map$Entry
java/util/Map Fcom/groupbyinc/flux/snapshots/RestoreService$RestoreCompletionResponse RestoreCompletionResponse /com/groupbyinc/flux/cluster/ClusterState$Custom (com/groupbyinc/flux/cluster/ClusterState ! Custom 3com/groupbyinc/flux/cluster/RestoreInProgress$State $ State 0com/groupbyinc/flux/cluster/ClusterState$Builder ' Builder .com/groupbyinc/flux/snapshots/RestoreService$1 * drainedRequests Ljava/util/List; eLjava/util/List; batchedRestoreInfo Ljava/util/Map;Ljava/util/Map;>;>; $assertionsDisabled Z val$request SLcom/groupbyinc/flux/snapshots/RestoreService$UpdateIndexShardRestoreStatusRequest; this$0 .Lcom/groupbyinc/flux/snapshots/RestoreService; ?(Lcom/groupbyinc/flux/snapshots/RestoreService;Lcom/groupbyinc/flux/snapshots/RestoreService$UpdateIndexShardRestoreStatusRequest;)V 6 7 : 4 5 < ()V 8 >
? java/util/ArrayList A
B ? , - D / 0 F this 0Lcom/groupbyinc/flux/snapshots/RestoreService$2; execute V(Lcom/groupbyinc/flux/cluster/ClusterState;)Lcom/groupbyinc/flux/cluster/ClusterState; processed L 3 M access$1600 T(Lcom/groupbyinc/flux/snapshots/RestoreService;)Ljava/util/concurrent/BlockingQueue; O P
Q "java/util/concurrent/BlockingQueue S drainTo (Ljava/util/Collection;)I U V T W java/util/List Y size ()I [ \ Z ] restore _ custom E(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/ClusterState$Custom; a b
" c entries ()Ljava/util/List; e f
g iterator ()Ljava/util/Iterator; i j Z k java/util/Iterator m hasNext ()Z o p n q next ()Ljava/lang/Object; s t n u get (I)Ljava/lang/Object; w x Z y
snapshotId 3()Lcom/groupbyinc/flux/cluster/metadata/SnapshotId; { |
}
} /com/groupbyinc/flux/cluster/metadata/SnapshotId ? equals (Ljava/lang/Object;)Z ? ?
? ? access$1700 ](Lcom/groupbyinc/flux/snapshots/RestoreService;)Lcom/groupbyinc/flux/common/logging/ESLogger; ? ?
? )[{}] Updating shard [{}] with status [{}] ? java/lang/Object ? shardId +()Lcom/groupbyinc/flux/index/shard/ShardId; ? ?
? status D()Lcom/groupbyinc/flux/cluster/RestoreInProgress$ShardRestoreStatus; ? ?
? state 7()Lcom/groupbyinc/flux/cluster/RestoreInProgress$State; ? ?
? +com/groupbyinc/flux/common/logging/ESLogger ? trace ((Ljava/lang/String;[Ljava/lang/Object;)V ? ? ? ? shards A()Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap; ? ?
? 5com/groupbyinc/flux/common/google/common/collect/Maps ?
newHashMap $(Ljava/util/Map;)Ljava/util/HashMap; ? ?
? ? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? ?
access$500 @(Lcom/groupbyinc/flux/snapshots/RestoreService;Ljava/util/Map;)Z ? ?
? STARTED 5Lcom/groupbyinc/flux/cluster/RestoreInProgress$State; ? ? % ? indices ? f
? =com/groupbyinc/flux/common/google/common/collect/ImmutableMap ? copyOf P(Ljava/util/Map;)Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap; ? ?
? ? ?(Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;Lcom/groupbyinc/flux/cluster/RestoreInProgress$State;Ljava/util/List;Lcom/groupbyinc/flux/common/google/common/collect/ImmutableMap;)V 8 ?
? add ? ? Z ? access$1800 ? ?
? restore [{}] is done ? info ? ? ? ? ()Ljava/util/HashMap; ? ?
? ? 2 3 ? containsKey ? ? ? java/lang/AssertionError ?
? ? (com/groupbyinc/flux/common/collect/Tuple ? )com/groupbyinc/flux/snapshots/RestoreInfo ? getSnapshot ()Ljava/lang/String; ? ?
? ? ]
access$600 @(Lcom/groupbyinc/flux/snapshots/RestoreService;Ljava/util/Map;)I ? ?
? '(Ljava/lang/String;Ljava/util/List;II)V 8 ?
? ? '(Ljava/lang/Object;Ljava/lang/Object;)V 8 ?
? ? access$1900 ? ?
? Dchanged cluster state triggered by {} snapshot restore state updates ? java/lang/Integer ? valueOf (I)Ljava/lang/Integer; ? ?
? ? toArray (([Ljava/lang/Object;)[Ljava/lang/Object; ? ? Z ? 6[Lcom/groupbyinc/flux/cluster/RestoreInProgress$Entry; ? 9([Lcom/groupbyinc/flux/cluster/RestoreInProgress$Entry;)V 8 ?
? builder ^(Lcom/groupbyinc/flux/cluster/ClusterState;)Lcom/groupbyinc/flux/cluster/ClusterState$Builder; ?
" putCustom w(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/ClusterState$Custom;)Lcom/groupbyinc/flux/cluster/ClusterState$Builder;
( build ,()Lcom/groupbyinc/flux/cluster/ClusterState;
( updateSnapshotState i I |Ljava/util/Map; entry 5Lcom/groupbyinc/flux/cluster/RestoreInProgress$Entry; updatedRestore /Lcom/groupbyinc/flux/cluster/RestoreInProgress; changedCount GLjava/util/List; currentState *Lcom/groupbyinc/flux/cluster/ClusterState; batchSize onFailure *(Ljava/lang/String;Ljava/lang/Throwable;)V %Lcom/groupbyinc/flux/common/Nullable; access$2000 ?
1[{}][{}] failed to update snapshot status to [{}] warn =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V ! ?" request source Ljava/lang/String; t Ljava/lang/Throwable; clusterStateProcessed i(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/cluster/ClusterState;)V entrySet ()Ljava/util/Set;+, -
java/util/Set/0 k getKey2 t 3 getValue5 t 6 v18 t
?9 v2; t
?< getRoutingTable 4()Lcom/groupbyinc/flux/cluster/routing/RoutingTable;>?
"@ java/lang/StringB 0com/groupbyinc/flux/cluster/routing/RoutingTableD SUCCESSF ? %G 'com/groupbyinc/flux/index/shard/ShardIdI findPrimaryShard ?(Lcom/groupbyinc/flux/cluster/routing/RoutingTable;Lcom/groupbyinc/flux/index/shard/ShardId;)Lcom/groupbyinc/flux/cluster/routing/ShardRouting;KL
M 0com/groupbyinc/flux/cluster/routing/ShardRoutingO activeQ p
PR access$2100T ?
U '[{}][{}] waiting for the shard to startW isEmptyY p ZZ notifyListeners _(Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;Lcom/groupbyinc/flux/snapshots/RestoreInfo;)V\]
^
access$400 \(Lcom/groupbyinc/flux/snapshots/RestoreService;)Lcom/groupbyinc/flux/cluster/ClusterService;`a
b ?(Lcom/groupbyinc/flux/snapshots/RestoreService$2;Ljava/util/List;Lcom/groupbyinc/flux/cluster/metadata/SnapshotId;Lcom/groupbyinc/flux/snapshots/RestoreInfo;)V 8d
e *com/groupbyinc/flux/cluster/ClusterServiceg addLast 5(Lcom/groupbyinc/flux/cluster/ClusterStateListener;)Vijhk )Lcom/groupbyinc/flux/index/shard/ShardId; shardRouting 2Lcom/groupbyinc/flux/cluster/routing/ShardRouting; shard ?Ljava/util/Map$Entry; Ljava/util/Map$Entry; 1Lcom/groupbyinc/flux/cluster/metadata/SnapshotId; restoreInfo +Lcom/groupbyinc/flux/snapshots/RestoreInfo; routingTable 2Lcom/groupbyinc/flux/cluster/routing/RoutingTable; waitForStarted ;Ljava/util/List;Ljava/util/Map$Entry;>;>; oldState newState getIndex} ?
J~ index K(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/IndexRoutingTable;??
E? id? \
J? 5com/groupbyinc/flux/cluster/routing/IndexRoutingTable? ?(I)Lcom/groupbyinc/flux/cluster/routing/IndexShardRoutingTable;p?
?? :com/groupbyinc/flux/cluster/routing/IndexShardRoutingTable? primaryShard 4()Lcom/groupbyinc/flux/cluster/routing/ShardRouting;??
?? indexShardRoutingTable