com.groupbyinc.flux.gateway.AsyncShardFetch.class Maven / Gradle / Ivy
???? 4 +com/groupbyinc/flux/gateway/AsyncShardFetch ~Ljava/lang/Object;Lcom/groupbyinc/flux/common/lease/Releasable; java/lang/Object +com/groupbyinc/flux/common/lease/Releasable AsyncShardFetch.java 5com/groupbyinc/flux/gateway/AsyncShardFetch$NodeEntry NodeEntry 7com/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult FetchResult 2com/groupbyinc/flux/gateway/AsyncShardFetch$Lister Lister -com/groupbyinc/flux/gateway/AsyncShardFetch$1 java/util/Map$Entry
java/util/Map Entry %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup logger !Lorg/apache/logging/log4j/Logger; type Ljava/lang/String; shardId )Lcom/groupbyinc/flux/index/shard/ShardId; action 4Lcom/groupbyinc/flux/gateway/AsyncShardFetch$Lister; zLcom/groupbyinc/flux/gateway/AsyncShardFetch$Lister;TT;>; cache Ljava/util/Map; _Ljava/util/Map;>;
nodesToIgnore Ljava/util/Set; #Ljava/util/Set; round (Ljava/util/concurrent/atomic/AtomicLong; closed Z $assertionsDisabled ?(Lorg/apache/logging/log4j/Logger;Ljava/lang/String;Lcom/groupbyinc/flux/index/shard/ShardId;Lcom/groupbyinc/flux/gateway/AsyncShardFetch$Lister;)V ()V 2 4
5 java/util/HashMap 7
8 5 ' ( : java/util/HashSet <
= 5 * + ? &java/util/concurrent/atomic/AtomicLong A
B 5 - . D F ! H " # J $ % L this 2Lcom/groupbyinc/flux/gateway/AsyncShardFetch; -Lcom/groupbyinc/flux/gateway/AsyncShardFetch; {Lcom/groupbyinc/flux/gateway/AsyncShardFetch$Lister<+Lcom/groupbyinc/flux/action/support/nodes/BaseNodesResponse;TT;>; close / 0 S getNumberOfInFlightFetches ()I values ()Ljava/util/Collection; W X Y java/util/Collection [ iterator ()Ljava/util/Iterator; ] ^ \ _ java/util/Iterator a hasNext ()Z c d b e next ()Ljava/lang/Object; g h b i
isFetching k d
l nodeEntry ; 7Lcom/groupbyinc/flux/gateway/AsyncShardFetch$NodeEntry; count I fetchData {(Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;Ljava/util/Set;)Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult; java/lang/IllegalStateException u java/lang/StringBuilder w
x 5 append -(Ljava/lang/Object;)Ljava/lang/StringBuilder; z {
x | (: can't fetch data on closed async fetch ~ -(Ljava/lang/String;)Ljava/lang/StringBuilder; z ?
x ? toString ()Ljava/lang/String; ? ?
x ? (Ljava/lang/String;)V 2 ?
v ?
java/util/Set ? addAll (Ljava/util/Collection;)Z ? ? ? ? fillShardCacheWithDataNodes C(Ljava/util/Map;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;)V ? ?
? findNodesToFetch !(Ljava/util/Map;)Ljava/util/List; ? ?
? java/util/List ? isEmpty ? d ? ? incrementAndGet ()J ? ?
B ? ? _ markAsFetching (J)V ? ?
? 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;)Ljava/lang/Object; ? getNodeId ? ?
? ? K(Lcom/groupbyinc/flux/gateway/AsyncShardFetch$NodeEntry;)Ljava/lang/String; ? apply ()Ljava/util/function/Function; ? ? ? java/util/stream/Stream ? map 8(Ljava/util/function/Function;)Ljava/util/stream/Stream; ? ? ? ? getClass ()Ljava/lang/Class; ? ?
? /com/groupbyinc/flux/cluster/node/DiscoveryNodes ? get D(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; ? ?
? ? ? ? P(Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;)Ljava/util/function/Function; ? ? ? (I)Ljava/lang/Object; ? lambda$fetchData$0 4(I)[Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; ? ?
? ? ? "()Ljava/util/function/IntFunction; ? ? ? toArray 5(Ljava/util/function/IntFunction;)[Ljava/lang/Object; ? ? ? ? 1[Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; ?
asyncFetch 5([Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;J)V ? ?
? hasAnyNodeFetching (Ljava/util/Map;)Z ? ?
? java/util/Collections ? emptySet ()Ljava/util/Set; ? ?
? ? J(Lcom/groupbyinc/flux/index/shard/ShardId;Ljava/util/Map;Ljava/util/Set;)V 2 ?
? entrySet ? ? ? ? _ getKey ? h ? java/lang/String ? getValue ? h ? isFailed d
remove 4 b add (Ljava/lang/Object;)Z ? .com/groupbyinc/flux/cluster/node/DiscoveryNode
? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
(Ljava/util/Collection;)V 2
= unmodifiableSet (Ljava/util/Set;)Ljava/util/Set;
? clear 4 ? ? ? nodes failed [ size V ? (I)Ljava/lang/StringBuilder; z!
x" ], ignored [$ ]& reroute >(Lcom/groupbyinc/flux/index/shard/ShardId;Ljava/lang/String;)V()
*
fetchingRound J discoNodesToFetch entry eLjava/util/Map$Entry;>; Ljava/util/Map$Entry; nodeId node 0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; it {Ljava/util/Iterator;>;>; Ljava/util/Iterator; DLjava/util/Map; failedNodes allIgnoreNodes nodes 1Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; ignoreNodes nodesToFetch NLjava/util/List;>; Ljava/util/List; processAsyncFetch $(Ljava/util/List;Ljava/util/List;J)V 0{} ignoring fetched [{}] results, already closedC org/apache/logging/log4j/LoggerE trace 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)VGHFI "{} processing fetched [{}] resultsK 9com/groupbyinc/flux/action/support/nodes/BaseNodeResponseM getNode 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;OP
NQ getIdS ?
T ? ? V getFetchingRoundX ?
Y 1 0 [ java/lang/AssertionError] *node entries only replaced by newer rounds_ (Ljava/lang/Object;)V 2a
^b a{} received response for [{}] from node {} for an older fetching round (expected: {} but was: {})d java/lang/Longf valueOf (J)Ljava/lang/Long;hi
gj o(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)VGlFm -{} node {} has failed for [{}] (failure [{}])o
getFailure ()Ljava/lang/Throwable;qr
s ](Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)VGuFv .{} marking {} as done for [{}], result is [{}]x doneFetchingza
{ .com/groupbyinc/flux/action/FailedNodeException} !{} processing failure {} for [{}] K(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)VG?F?2 ?
~? `{} received failure for [{}] from node {} for an older fetching round (expected: {} but was: {})? getCause?r
~? $com/groupbyinc/flux/ExceptionsHelper? unwrapCause ,(Ljava/lang/Throwable;)Ljava/lang/Throwable;??
?? Gcom/groupbyinc/flux/common/util/concurrent/EsRejectedExecutionException? >com/groupbyinc/flux/transport/ReceiveTimeoutTransportException? 1com/groupbyinc/flux/ElasticsearchTimeoutException? java/lang/Throwable? restartFetching? 4
? h lambda$processAsyncFetch$1 D(Lcom/groupbyinc/flux/action/FailedNodeException;)Ljava/lang/Object;??
?? ?(Lcom/groupbyinc/flux/gateway/AsyncShardFetch;Lcom/groupbyinc/flux/action/FailedNodeException;)Lorg/apache/logging/log4j/util/Supplier; ?? ? warn @(Lorg/apache/logging/log4j/util/Supplier;Ljava/lang/Throwable;)V??F? (Ljava/lang/Throwable;)Vz?
?
post_response? response TT; ;Lcom/groupbyinc/flux/action/support/nodes/BaseNodeResponse; unwrappedCause Ljava/lang/Throwable; failure 0Lcom/groupbyinc/flux/action/FailedNodeException; responses Ljava/util/List; failures BLjava/util/List; getDataNodes 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;??
?? 3com/groupbyinc/flux/common/collect/ImmutableOpenMap?
? _ Gcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectObjectCursor? value Ljava/lang/Object;?? ?? containsKey? ?
? keySet? ? ?
nodeExists (Ljava/lang/String;)Z??
?? cursor ?Lcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectObjectCursor; ILcom/groupbyinc/flux/common/carrotsearch/hppc/cursors/ObjectObjectCursor; (Ljava/util/Iterator;
shardCache java/util/ArrayList?
? 5 hasData? d
? ? {} fetching [{}] from {}? b(Lcom/groupbyinc/flux/gateway/AsyncShardFetch;J[Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)V 2?
? list ?(Lcom/groupbyinc/flux/index/shard/ShardId;[Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Lcom/groupbyinc/flux/action/ActionListener;)V?? ? 5org/apache/logging/log4j/message/ParameterizedMessage? ,{}: failed to list shard for {} on node [{}]? ((Ljava/lang/String;[Ljava/lang/Object;)V 2?
?? x$0 java/lang/Class? desiredAssertionStatus? d
?? Signature Code LocalVariableTable LocalVariableTypeTable LineNumberTable ?(Lorg/apache/logging/log4j/Logger;Ljava/lang/String;Lcom/groupbyinc/flux/index/shard/ShardId;Lcom/groupbyinc/flux/gateway/AsyncShardFetch$Lister<+Lcom/groupbyinc/flux/action/support/nodes/BaseNodesResponse;TT;>;)V
StackMapTable ?(Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;Ljava/util/Set;)Lcom/groupbyinc/flux/gateway/AsyncShardFetch$FetchResult; [(Ljava/util/List;Ljava/util/List;J)V ?(Ljava/util/Map;>;Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;)V ?(Ljava/util/Map;>;)Ljava/util/List;>; b(Ljava/util/Map;>;)Z BootstrapMethods
SourceFile InnerClasses! ! " # $ % ? &