com.groupbyinc.flux.discovery.zen.UnicastZenPing.class Maven / Gradle / Ivy
???? 4? 0com/groupbyinc/flux/discovery/zen/UnicastZenPing 6com/groupbyinc/flux/common/component/AbstractComponent )com/groupbyinc/flux/discovery/zen/ZenPing UnicastZenPing.java Dcom/groupbyinc/flux/discovery/zen/UnicastZenPing$UnicastPingResponse UnicastPingResponse Ccom/groupbyinc/flux/discovery/zen/UnicastZenPing$UnicastPingRequest UnicastPingRequest Jcom/groupbyinc/flux/discovery/zen/UnicastZenPing$UnicastPingRequestHandler UnicastPingRequestHandler =com/groupbyinc/flux/discovery/zen/UnicastZenPing$PingingRound PingingRound 2com/groupbyinc/flux/discovery/zen/UnicastZenPing$4 2com/groupbyinc/flux/discovery/zen/UnicastZenPing$3 2com/groupbyinc/flux/discovery/zen/UnicastZenPing$2 2com/groupbyinc/flux/discovery/zen/UnicastZenPing$1 6com/groupbyinc/flux/discovery/zen/ZenPing$PingResponse PingResponse 8com/groupbyinc/flux/discovery/zen/ZenPing$PingCollection PingCollection /com/groupbyinc/flux/threadpool/ThreadPool$Names " )com/groupbyinc/flux/threadpool/ThreadPool $ Names 4com/groupbyinc/flux/common/settings/Setting$Property ' +com/groupbyinc/flux/common/settings/Setting ) Property :com/groupbyinc/flux/transport/TransportRequestOptions$Type , 5com/groupbyinc/flux/transport/TransportRequestOptions . Type %java/lang/invoke/MethodHandles$Lookup 1 java/lang/invoke/MethodHandles 3 Lookup ACTION_NAME Ljava/lang/String; internal:discovery/zen/unicast 8 (DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING -Lcom/groupbyinc/flux/common/settings/Setting; SLcom/groupbyinc/flux/common/settings/Setting;>; 6DISCOVERY_ZEN_PING_UNICAST_CONCURRENT_CONNECTS_SETTING BLcom/groupbyinc/flux/common/settings/Setting; 0DISCOVERY_ZEN_PING_UNICAST_HOSTS_RESOLVE_TIMEOUT ZLcom/groupbyinc/flux/common/settings/Setting; LIMIT_FOREIGN_PORTS_COUNT I LIMIT_LOCAL_PORTS_COUNT
threadPool +Lcom/groupbyinc/flux/threadpool/ThreadPool; transportService 0Lcom/groupbyinc/flux/transport/TransportService; clusterName )Lcom/groupbyinc/flux/cluster/ClusterName; configuredHosts Ljava/util/List; $Ljava/util/List; limitPortCounts contextProvider 7Lcom/groupbyinc/flux/discovery/zen/PingContextProvider; pingingRoundIdGenerator +Ljava/util/concurrent/atomic/AtomicInteger; UNICAST_NODE_PREFIX
#zen_unicast_ U activePingingRounds Ljava/util/Map; cLjava/util/Map; temporalResponses Ljava/util/Queue; KLjava/util/Queue;
hostsProvider 8Lcom/groupbyinc/flux/discovery/zen/UnicastHostsProvider; unicastZenPingExecutorService ALcom/groupbyinc/flux/common/util/concurrent/EsThreadPoolExecutor; resolveTimeout +Lcom/groupbyinc/flux/common/unit/TimeValue; closed Z $assertionsDisabled ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/transport/TransportService;Lcom/groupbyinc/flux/discovery/zen/UnicastHostsProvider;Lcom/groupbyinc/flux/discovery/zen/PingContextProvider;)V 1(Lcom/groupbyinc/flux/common/settings/Settings;)V f h
i )java/util/concurrent/atomic/AtomicInteger k ()V f m
l n R S p @com/groupbyinc/flux/common/util/concurrent/ConcurrentCollections r newConcurrentMap &()Ljava/util/concurrent/ConcurrentMap; t u
s v W X x newQueue ()Ljava/util/Queue; z {
s | Z [ ~ c d ? F G ? H I ? 'com/groupbyinc/flux/cluster/ClusterName ? CLUSTER_NAME_SETTING ? ; ? ? get B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object; ? ?
* ? J K ? ] ^ ? P Q ? = ; ? java/lang/Integer ? intValue ()I ? ?
? ? : ; ? exists 1(Lcom/groupbyinc/flux/common/settings/Settings;)Z ? ?
* ? java/util/List ? L M ? O B ? ,com/groupbyinc/flux/common/settings/Settings ? .com/groupbyinc/flux/transport/TransportService ? 6com/groupbyinc/flux/discovery/zen/UnicastHostsProvider ? 5com/groupbyinc/flux/discovery/zen/PingContextProvider ? getLocalAddresses ()Ljava/util/List; ? ?
? ? ? ; ? )com/groupbyinc/flux/common/unit/TimeValue ? a b ? logger 8Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger; ? ? ? Kusing initial hosts {}, with concurrent_connects [{}], resolve_timeout [{}] ? valueOf (I)Ljava/lang/Integer; ? ?
? ? 6com/groupbyinc/flux/common/apache/logging/log4j/Logger ? debug K(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V ? ? ? ? "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; ?
n ? G()Lcom/groupbyinc/flux/discovery/zen/UnicastZenPing$UnicastPingRequest; ? ()Ljava/util/function/Supplier; ? ? ? same ? 5(Lcom/groupbyinc/flux/discovery/zen/UnicastZenPing;)V f ?
? registerRequestHandler {(Ljava/lang/String;Ljava/util/function/Supplier;Ljava/lang/String;Lcom/groupbyinc/flux/transport/TransportRequestHandler;)V ? ?
? ? [unicast_connect] ? 6com/groupbyinc/flux/common/util/concurrent/EsExecutors ? daemonThreadFactory f(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/lang/String;)Ljava/util/concurrent/ThreadFactory; ? ?
? ? unicast_connect ? < java/util/concurrent/TimeUnit ? SECONDS Ljava/util/concurrent/TimeUnit; ? ? ? ? getThreadContext <()Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext; ? ?
% ?
newScaling ?(Ljava/lang/String;IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/ThreadFactory;Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;)Lcom/groupbyinc/flux/common/util/concurrent/EsThreadPoolExecutor; ? ?
? ? _ ` ? this 2Lcom/groupbyinc/flux/discovery/zen/UnicastZenPing; settings .Lcom/groupbyinc/flux/common/settings/Settings; unicastHostsProvider concurrentConnects
threadFactory $Ljava/util/concurrent/ThreadFactory; resolveHostsLists ?(Ljava/util/concurrent/ExecutorService;Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;Ljava/util/List;ILcom/groupbyinc/flux/transport/TransportService;Ljava/lang/String;Lcom/groupbyinc/flux/common/unit/TimeValue;)Ljava/util/List; java/lang/InterruptedException
'java/util/concurrent/ExecutionException java/util/Objects requireNonNull &(Ljava/lang/Object;)Ljava/lang/Object;
nanos ()J
? "java/lang/IllegalArgumentException java/lang/StringBuilder
n .resolve timeout must be non-negative but was [ append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
! -(Ljava/lang/Object;)Ljava/lang/StringBuilder;#
$ ]& toString ()Ljava/lang/String;()
* (Ljava/lang/String;)V f,
- stream ()Ljava/util/stream/Stream;/0 ?1 lambda$resolveHostsLists$1 d(Lcom/groupbyinc/flux/transport/TransportService;ILjava/lang/String;)Ljava/util/concurrent/Callable;45
67 3(Ljava/lang/String;)Ljava/util/concurrent/Callable;9 apply P(Lcom/groupbyinc/flux/transport/TransportService;I)Ljava/util/function/Function;;< = java/util/stream/Stream? map 8(Ljava/util/function/Function;)Ljava/util/stream/Stream;AB@C java/util/stream/CollectorsE toList ()Ljava/util/stream/Collector;GH
FI collect 0(Ljava/util/stream/Collector;)Ljava/lang/Object;KL@M NANOSECONDSO ? ?P $java/util/concurrent/ExecutorServiceR invokeAll H(Ljava/util/Collection;JLjava/util/concurrent/TimeUnit;)Ljava/util/List;TUSV java/util/ArrayListX
Y n java/util/HashSet[
\ n boundAddress >()Lcom/groupbyinc/flux/common/transport/BoundTransportAddress;^_
?` :com/groupbyinc/flux/common/transport/BoundTransportAddressb publishAddress 9()Lcom/groupbyinc/flux/common/transport/TransportAddress;de
cf
java/util/Seth add (Ljava/lang/Object;)Zjkil boundAddresses :()[Lcom/groupbyinc/flux/common/transport/TransportAddress;no
cp java/util/Arraysr asList %([Ljava/lang/Object;)Ljava/util/List;tu
sv addAll (Ljava/util/Collection;)Zxyiz iterator ()Ljava/util/Iterator;|} ?~ java/lang/String? java/util/Iterator? hasNext ()Z???? next? ??? java/util/concurrent/Future? isCancelled???? e d ? isDone???? java/lang/AssertionError?
? n ? ??? 8[Lcom/groupbyinc/flux/common/transport/TransportAddress;? resolved host [{}] to {}? trace 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V?? ?? contains?ki? .com/groupbyinc/flux/cluster/node/DiscoveryNode? _? (I)Ljava/lang/StringBuilder;?
? #? java/util/Collections? emptyMap ()Ljava/util/Map;??
?? emptySet ()Ljava/util/Set;??
?? com/groupbyinc/flux/Version? CURRENT Lcom/groupbyinc/flux/Version;?? ?? minimumCompatibilityVersion ()Lcom/groupbyinc/flux/Version;??
?? ?(Ljava/lang/String;Lcom/groupbyinc/flux/common/transport/TransportAddress;Ljava/util/Map;Ljava/util/Set;Lcom/groupbyinc/flux/Version;)V f?
?? ?l getCause ()Ljava/lang/Throwable;??
? failed to resolve host [? warn *(Ljava/lang/String;Ljava/lang/Throwable;)V?? ?? (timed out after [{}] resolving host [{}]??? ?? address 7Lcom/groupbyinc/flux/common/transport/TransportAddress; addressId addresses message e )Ljava/util/concurrent/ExecutionException; hostname future WLjava/util/concurrent/Future<[Lcom/groupbyinc/flux/common/transport/TransportAddress;>; Ljava/util/concurrent/Future; executorService &Ljava/util/concurrent/ExecutorService; hosts
nodeId_prefix callables kLjava/util/List;>; futures iLjava/util/List;>; discoveryNodes BLjava/util/List; localAddresses HLjava/util/Set; Ljava/util/Set; it (Ljava/util/Iterator; Ljava/util/Iterator; close
terminate I(Ljava/util/concurrent/ExecutorService;JLjava/util/concurrent/TimeUnit;)Z??
%?
java/util/Map? values ()Ljava/util/Collection;???? ,com/groupbyinc/flux/common/lease/Releasables? (Ljava/lang/Iterable;)V??
?? start clearTemporalResponses java/util/Queue clear m ping K(Ljava/util/function/Consumer;Lcom/groupbyinc/flux/common/unit/TimeValue;)V v(Ljava/util/function/Consumer;Lcom/groupbyinc/flux/common/unit/TimeValue;Lcom/groupbyinc/flux/common/unit/TimeValue;)V
resultsConsumer YLjava/util/function/Consumer; Ljava/util/function/Consumer; duration
java/lang/RuntimeException (Ljava/lang/Throwable;)V f
buildDynamicNodes ? ? ?z clusterState ,()Lcom/groupbyinc/flux/cluster/ClusterState; ? (com/groupbyinc/flux/cluster/ClusterState nodes 3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;"#
!$ /com/groupbyinc/flux/cluster/node/DiscoveryNodes& getMasterNodes 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap;()
'* 3com/groupbyinc/flux/common/collect/ImmutableOpenMap, @()Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectContainer;?.
-/