com.groupbyinc.flux.action.ingest.IngestActionForwarder.class Maven / Gradle / Ivy
???? 4 ? 7com/groupbyinc/flux/action/ingest/IngestActionForwarder java/lang/Object /com/groupbyinc/flux/cluster/ClusterStateApplier IngestActionForwarder.java %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles
Lookup transportService 0Lcom/groupbyinc/flux/transport/TransportService; ingestNodeGenerator +Ljava/util/concurrent/atomic/AtomicInteger; ingestNodes 1[Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; 3(Lcom/groupbyinc/flux/transport/TransportService;)V ()V
)java/util/concurrent/atomic/AtomicInteger %com/groupbyinc/flux/common/Randomness get ()Ljava/util/Random;
java/util/Random nextInt ()I " #
! $ (I)V &
' )
+ .com/groupbyinc/flux/cluster/node/DiscoveryNode - / this 9Lcom/groupbyinc/flux/action/ingest/IngestActionForwarder; forwardIngestRequest {(Lcom/groupbyinc/flux/action/Action;Lcom/groupbyinc/flux/action/ActionRequest;Lcom/groupbyinc/flux/action/ActionListener;)V randomIngestNode 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; 5 6
7 !com/groupbyinc/flux/action/Action 9 name ()Ljava/lang/String; ; <
: = 8com/groupbyinc/flux/action/ActionListenerResponseHandler ? getClass ()Ljava/lang/Class; A B
C "java/lang/invoke/LambdaMetafactory E 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; G H
F I J ()Ljava/lang/Object; L (com/groupbyinc/flux/action/GenericAction N newResponse -()Lcom/groupbyinc/flux/action/ActionResponse; P Q
O R S B(Lcom/groupbyinc/flux/action/Action;)Ljava/util/function/Supplier; U V K(Lcom/groupbyinc/flux/action/ActionListener;Ljava/util/function/Supplier;)V X
@ Y .com/groupbyinc/flux/transport/TransportService [ sendRequest ?(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Ljava/lang/String;Lcom/groupbyinc/flux/transport/TransportRequest;Lcom/groupbyinc/flux/transport/TransportResponseHandler;)V ] ^
\ _ action (Lcom/groupbyinc/flux/action/Action<***>; #Lcom/groupbyinc/flux/action/Action; request *Lcom/groupbyinc/flux/action/ActionRequest; listener .Lcom/groupbyinc/flux/action/ActionListener<*>; +Lcom/groupbyinc/flux/action/ActionListener; java/lang/IllegalStateException i WThere are no ingest nodes in this cluster, unable to forward request to an ingest node. k (Ljava/lang/String;)V m
j n incrementAndGet q #
r java/lang/Math t floorMod (II)I v w
u x nodes applyClusterState 4(Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;)V /com/groupbyinc/flux/cluster/ClusterChangedEvent } state ,()Lcom/groupbyinc/flux/cluster/ClusterState; ?
~ ? (com/groupbyinc/flux/cluster/ClusterState ? getNodes 3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; ? ?
? ? /com/groupbyinc/flux/cluster/node/DiscoveryNodes ? getIngestNodes 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; ? ?
? ? 3com/groupbyinc/flux/common/collect/ImmutableOpenMap ? values @()Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectContainer; ? ?
? ?