com.groupbyinc.flux.index.reindex.TransportReindexAction.class Maven / Gradle / Ivy
???? 4l 8com/groupbyinc/flux/index/reindex/TransportReindexAction ?Lcom/groupbyinc/flux/action/support/HandledTransportAction; 9com/groupbyinc/flux/action/support/HandledTransportAction TransportReindexAction.java Qcom/groupbyinc/flux/index/reindex/TransportReindexAction$AsyncIndexBySearchAction AsyncIndexBySearchAction java/util/Map$Entry
java/util/Map Entry Jcom/groupbyinc/flux/common/apache/http/client/config/RequestConfig$Builder Bcom/groupbyinc/flux/common/apache/http/client/config/RequestConfig Builder 4com/groupbyinc/flux/common/settings/Setting$Property +com/groupbyinc/flux/common/settings/Setting Property Bcom/groupbyinc/flux/client/RestClientBuilder$RequestConfigCallback ,com/groupbyinc/flux/client/RestClientBuilder RequestConfigCallback Ecom/groupbyinc/flux/client/RestClientBuilder$HttpClientConfigCallback HttpClientConfigCallback Ocom/groupbyinc/flux/common/apache/http/impl/nio/reactor/IOReactorConfig$Builder ! Gcom/groupbyinc/flux/common/apache/http/impl/nio/reactor/IOReactorConfig # %java/lang/invoke/MethodHandles$Lookup % java/lang/invoke/MethodHandles ' Lookup REMOTE_CLUSTER_WHITELIST -Lcom/groupbyinc/flux/common/settings/Setting; SLcom/groupbyinc/flux/common/settings/Setting;>; clusterService 4Lcom/groupbyinc/flux/cluster/service/ClusterService;
scriptService *Lcom/groupbyinc/flux/script/ScriptService; autoCreateIndex 4Lcom/groupbyinc/flux/action/support/AutoCreateIndex; client #Lcom/groupbyinc/flux/client/Client; remoteWhitelist OLcom/groupbyinc/flux/common/apache/lucene/util/automaton/CharacterRunAutomaton; ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/action/support/ActionFilters;Lcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver;Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/script/ScriptService;Lcom/groupbyinc/flux/action/support/AutoCreateIndex;Lcom/groupbyinc/flux/client/Client;Lcom/groupbyinc/flux/transport/TransportService;)V *Lcom/groupbyinc/flux/common/inject/Inject; indices:data/write/reindex : "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; > ?
= @ A ()Ljava/lang/Object; C 0com/groupbyinc/flux/index/reindex/ReindexRequest E ()V 7 G
F H I 4()Lcom/groupbyinc/flux/index/reindex/ReindexRequest; K get ()Ljava/util/function/Supplier; M N O/(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/lang/String;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/transport/TransportService;Lcom/groupbyinc/flux/action/support/ActionFilters;Lcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver;Ljava/util/function/Supplier;)V 7 Q
R - . T / 0 V 1 2 X 3 4 Z * + \ B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object; M ^
_ java/util/List a buildRemoteWhitelist a(Ljava/util/List;)Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/CharacterRunAutomaton; c d
e 5 6 g this :Lcom/groupbyinc/flux/index/reindex/TransportReindexAction; settings .Lcom/groupbyinc/flux/common/settings/Settings;
threadPool +Lcom/groupbyinc/flux/threadpool/ThreadPool;
actionFilters 2Lcom/groupbyinc/flux/action/support/ActionFilters; indexNameExpressionResolver BLcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver; transportService 0Lcom/groupbyinc/flux/transport/TransportService; doExecute ?(Lcom/groupbyinc/flux/tasks/Task;Lcom/groupbyinc/flux/index/reindex/ReindexRequest;Lcom/groupbyinc/flux/action/ActionListener;)V getSlices ()I w x
F y taskManager 'Lcom/groupbyinc/flux/tasks/TaskManager; { | } /com/groupbyinc/flux/index/reindex/ReindexAction INSTANCE 1Lcom/groupbyinc/flux/index/reindex/ReindexAction; ? ? ? ? 2com/groupbyinc/flux/cluster/service/ClusterService ? localNode 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; ? ?
? ? .com/groupbyinc/flux/cluster/node/DiscoveryNode ? getId ()Ljava/lang/String; ? ?
? ? 8com/groupbyinc/flux/index/reindex/ParentBulkByScrollTask ? Ccom/groupbyinc/flux/index/reindex/BulkByScrollParallelizationHelper ? startSlices&(Lcom/groupbyinc/flux/client/Client;Lcom/groupbyinc/flux/tasks/TaskManager;Lcom/groupbyinc/flux/action/Action;Ljava/lang/String;Lcom/groupbyinc/flux/index/reindex/ParentBulkByScrollTask;Lcom/groupbyinc/flux/index/reindex/AbstractBulkByScrollRequest;Lcom/groupbyinc/flux/action/ActionListener;)V ? ?
? ?
getRemoteInfo 0()Lcom/groupbyinc/flux/index/reindex/RemoteInfo; ? ?
F ? checkRemoteWhitelist ?(Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/CharacterRunAutomaton;Lcom/groupbyinc/flux/index/reindex/RemoteInfo;)V ? ?
? state ,()Lcom/groupbyinc/flux/cluster/ClusterState; ? ?
? ? getSearchRequest 3()Lcom/groupbyinc/flux/action/search/SearchRequest; ? ?
F ? getDestination 1()Lcom/groupbyinc/flux/action/index/IndexRequest; ? ?
F ? q r ? validateAgainstAliases1(Lcom/groupbyinc/flux/action/search/SearchRequest;Lcom/groupbyinc/flux/action/index/IndexRequest;Lcom/groupbyinc/flux/index/reindex/RemoteInfo;Lcom/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolver;Lcom/groupbyinc/flux/action/support/AutoCreateIndex;Lcom/groupbyinc/flux/cluster/ClusterState;)V ? ?
? 4com/groupbyinc/flux/client/ParentTaskAssigningClient ? v(Lcom/groupbyinc/flux/client/Client;Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Lcom/groupbyinc/flux/tasks/Task;)V 7 ?
? ? 9com/groupbyinc/flux/index/reindex/WorkingBulkByScrollTask ? logger 8Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger; ? ? ? m n ??(Lcom/groupbyinc/flux/index/reindex/WorkingBulkByScrollTask;Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;Lcom/groupbyinc/flux/client/ParentTaskAssigningClient;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/index/reindex/ReindexRequest;Lcom/groupbyinc/flux/script/ScriptService;Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/action/ActionListener;)V 7 ?
? start ? G
? *Lcom/groupbyinc/flux/cluster/ClusterState; 6Lcom/groupbyinc/flux/client/ParentTaskAssigningClient; task Lcom/groupbyinc/flux/tasks/Task; request 2Lcom/groupbyinc/flux/index/reindex/ReindexRequest; listener eLcom/groupbyinc/flux/action/ActionListener; +Lcom/groupbyinc/flux/action/ActionListener; `(Lcom/groupbyinc/flux/index/reindex/ReindexRequest;Lcom/groupbyinc/flux/action/ActionListener;)V 'java/lang/UnsupportedOperationException ?
task required ? (Ljava/lang/String;)V 7 ?
? ? java/lang/StringBuilder ?
? H ,com/groupbyinc/flux/index/reindex/RemoteInfo ? getHost ? ?
? ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? (C)Ljava/lang/StringBuilder; ? ?
? ? getPort ? x
? ? (I)Ljava/lang/StringBuilder; ? ?
? ? toString ? ?
? ? Mcom/groupbyinc/flux/common/apache/lucene/util/automaton/CharacterRunAutomaton ? run (Ljava/lang/String;)Z ? ?
? ? java/lang/String ? "java/lang/IllegalArgumentException ? ] not whitelisted in ? getKey ? ?
?
? ? whitelist
remoteInfo .Lcom/groupbyinc/flux/index/reindex/RemoteInfo; check Ljava/lang/String; isEmpty ()Z b @com/groupbyinc/flux/common/apache/lucene/util/automaton/Automata makeEmpty E()Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/Automaton;
F(Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/Automaton;)V 7
? "com/groupbyinc/flux/common/Strings EMPTY_ARRAY [Ljava/lang/String; toArray (([Ljava/lang/Object;)[Ljava/lang/Object; b &com/groupbyinc/flux/common/regex/Regex simpleMatchToAutomaton X([Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/Automaton;
Ncom/groupbyinc/flux/common/apache/lucene/util/automaton/MinimizationOperations" minimize ?(Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/Automaton;I)Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/Automaton;$%
#& Bcom/groupbyinc/flux/common/apache/lucene/util/automaton/Operations( isTotal F(Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/Automaton;)Z*+
), $Refusing to start because whitelist . -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ?0
?1 ? accepts all addresses. This would allow users to reindex-from-remote any URL they like effectively having Elasticsearch make HTTP GETs for them.3 Acom/groupbyinc/flux/common/apache/lucene/util/automaton/Automaton5 $Ljava/util/List; Ljava/util/List; automaton CLcom/groupbyinc/flux/common/apache/lucene/util/automaton/Automaton; -com/groupbyinc/flux/action/index/IndexRequest; index= ?
<> 2com/groupbyinc/flux/action/support/AutoCreateIndex@ shouldAutoCreate ?(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/ClusterState;)ZBC
AD @com/groupbyinc/flux/cluster/metadata/IndexNameExpressionResolverF concreteIndexNames j(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/action/IndicesRequest;)[Ljava/lang/String;HI
GJ equals (Ljava/lang/Object;)ZLM
?N ;com/groupbyinc/flux/action/ActionRequestValidationExceptionP
Q H 5reindex cannot write into an index its reading from [S addValidationErrorU ?
QV e =Lcom/groupbyinc/flux/action/ActionRequestValidationException; sourceIndex source 1Lcom/groupbyinc/flux/action/search/SearchRequest; destination /Lcom/groupbyinc/flux/action/index/IndexRequest; clusterState target buildRestClient h(Lcom/groupbyinc/flux/index/reindex/RemoteInfo;JLjava/util/List;)Lcom/groupbyinc/flux/client/RestClient;
getHeaders ()Ljava/util/Map;cd
?e sizeg x
h -com/groupbyinc/flux/common/apache/http/Headerj entrySet ()Ljava/util/Set;lm
n
java/util/Setp iterator ()Ljava/util/Iterator;rsqt 0[Lcom/groupbyinc/flux/common/apache/http/Header;v java/util/Iteratorx hasNextzy{ next} Cy~ :com/groupbyinc/flux/common/apache/http/message/BasicHeader? ? C ? getValue? C ? '(Ljava/lang/String;Ljava/lang/String;)V 7?
?? /com/groupbyinc/flux/common/apache/http/HttpHost? getScheme? ?
?? ((Ljava/lang/String;ILjava/lang/String;)V 7?
?? %com/groupbyinc/flux/client/RestClient? builder b([Lcom/groupbyinc/flux/common/apache/http/HttpHost;)Lcom/groupbyinc/flux/client/RestClientBuilder;??
?? setDefaultHeaders `([Lcom/groupbyinc/flux/common/apache/http/Header;)Lcom/groupbyinc/flux/client/RestClientBuilder;??
? ?(Lcom/groupbyinc/flux/common/apache/http/client/config/RequestConfig$Builder;)Lcom/groupbyinc/flux/common/apache/http/client/config/RequestConfig$Builder;? lambda$buildRestClient$0 ?(Lcom/groupbyinc/flux/index/reindex/RemoteInfo;Lcom/groupbyinc/flux/common/apache/http/client/config/RequestConfig$Builder;)Lcom/groupbyinc/flux/common/apache/http/client/config/RequestConfig$Builder;??
?? customizeRequestConfig t(Lcom/groupbyinc/flux/index/reindex/RemoteInfo;)Lcom/groupbyinc/flux/client/RestClientBuilder$RequestConfigCallback;?? ? setRequestConfigCallback t(Lcom/groupbyinc/flux/client/RestClientBuilder$RequestConfigCallback;)Lcom/groupbyinc/flux/client/RestClientBuilder;??
? ?(Lcom/groupbyinc/flux/common/apache/http/impl/nio/client/HttpAsyncClientBuilder;)Lcom/groupbyinc/flux/common/apache/http/impl/nio/client/HttpAsyncClientBuilder;? lambda$buildRestClient$2 ?(Lcom/groupbyinc/flux/index/reindex/RemoteInfo;JLjava/util/List;Lcom/groupbyinc/flux/common/apache/http/impl/nio/client/HttpAsyncClientBuilder;)Lcom/groupbyinc/flux/common/apache/http/impl/nio/client/HttpAsyncClientBuilder;??
?? customizeHttpClient ?(Lcom/groupbyinc/flux/index/reindex/RemoteInfo;JLjava/util/List;)Lcom/groupbyinc/flux/client/RestClientBuilder$HttpClientConfigCallback;?? ? setHttpClientConfigCallback w(Lcom/groupbyinc/flux/client/RestClientBuilder$HttpClientConfigCallback;)Lcom/groupbyinc/flux/client/RestClientBuilder;??
? build )()Lcom/groupbyinc/flux/client/RestClient;??
? header ;Ljava/util/Map$Entry; Ljava/util/Map$Entry; taskId J threadCollector $Ljava/util/List;
clientHeaders i I X(Lcom/groupbyinc/flux/action/ActionRequest;Lcom/groupbyinc/flux/action/ActionListener;)V u ?
? x(Lcom/groupbyinc/flux/tasks/Task;Lcom/groupbyinc/flux/action/ActionRequest;Lcom/groupbyinc/flux/action/ActionListener;)V u v
? getUsername? ?
?? Gcom/groupbyinc/flux/common/apache/http/auth/UsernamePasswordCredentials? getPassword? ?
??
?? Kcom/groupbyinc/flux/common/apache/http/impl/client/BasicCredentialsProvider?
? H 5com/groupbyinc/flux/common/apache/http/auth/AuthScope? ANY 7Lcom/groupbyinc/flux/common/apache/http/auth/AuthScope;?? ?? Acom/groupbyinc/flux/common/apache/http/client/CredentialsProvider? setCredentials s(Lcom/groupbyinc/flux/common/apache/http/auth/AuthScope;Lcom/groupbyinc/flux/common/apache/http/auth/Credentials;)V???? Mcom/groupbyinc/flux/common/apache/http/impl/nio/client/HttpAsyncClientBuilder? setDefaultCredentialsProvider ?(Lcom/groupbyinc/flux/common/apache/http/client/CredentialsProvider;)Lcom/groupbyinc/flux/common/apache/http/impl/nio/client/HttpAsyncClientBuilder;??
?? )java/util/concurrent/atomic/AtomicInteger?
? H ((Ljava/lang/Runnable;)Ljava/lang/Thread;?
lambda$null$1 d(JLjava/util/concurrent/atomic/AtomicInteger;Ljava/util/List;Ljava/lang/Runnable;)Ljava/lang/Thread;??
?? newThread b(JLjava/util/concurrent/atomic/AtomicInteger;Ljava/util/List;)Ljava/util/concurrent/ThreadFactory;?? ? setThreadFactory u(Ljava/util/concurrent/ThreadFactory;)Lcom/groupbyinc/flux/common/apache/http/impl/nio/client/HttpAsyncClientBuilder;??
?? custom S()Lcom/groupbyinc/flux/common/apache/http/impl/nio/reactor/IOReactorConfig$Builder;??
$ setIoThreadCount T(I)Lcom/groupbyinc/flux/common/apache/http/impl/nio/reactor/IOReactorConfig$Builder;
" K()Lcom/groupbyinc/flux/common/apache/http/impl/nio/reactor/IOReactorConfig;?
" setDefaultIOReactorConfig ?(Lcom/groupbyinc/flux/common/apache/http/impl/nio/reactor/IOReactorConfig;)Lcom/groupbyinc/flux/common/apache/http/impl/nio/client/HttpAsyncClientBuilder;
? creds ILcom/groupbyinc/flux/common/apache/http/auth/UsernamePasswordCredentials; credentialsProvider CLcom/groupbyinc/flux/common/apache/http/client/CredentialsProvider; c OLcom/groupbyinc/flux/common/apache/http/impl/nio/client/HttpAsyncClientBuilder; threads +Ljava/util/concurrent/atomic/AtomicInteger;
es-client- (J)Ljava/lang/StringBuilder; ?
? - getAndIncrement x
? java/lang/Thread )(Ljava/lang/Runnable;Ljava/lang/String;)V 7!
" add$M b% r Ljava/lang/Runnable; name t Ljava/lang/Thread; getConnectTimeout -()Lcom/groupbyinc/flux/common/unit/TimeValue;,-
?. )com/groupbyinc/flux/common/unit/TimeValue0 millis ()J23
14 java/lang/Math6
toIntExact (J)I89
7: setConnectTimeout O(I)Lcom/groupbyinc/flux/common/apache/http/client/config/RequestConfig$Builder;<=
> getSocketTimeout@-
?A setSocketTimeoutC=
D LLcom/groupbyinc/flux/common/apache/http/client/config/RequestConfig$Builder; reindex.remote.whitelistH java/util/CollectionsJ emptyList ()Ljava/util/List;LM
KN java/util/function/FunctionP identity ()Ljava/util/function/Function;RSQT NodeScope 6Lcom/groupbyinc/flux/common/settings/Setting$Property;VW X listSetting ?(Ljava/lang/String;Ljava/util/List;Ljava/util/function/Function;[Lcom/groupbyinc/flux/common/settings/Setting$Property;)Lcom/groupbyinc/flux/common/settings/Setting;Z[
\ Signature Code LocalVariableTable LineNumberTable RuntimeVisibleAnnotations LocalVariableTypeTable
StackMapTable ?(Lcom/groupbyinc/flux/tasks/Task;Lcom/groupbyinc/flux/index/reindex/ReindexRequest;Lcom/groupbyinc/flux/action/ActionListener;)V ?(Lcom/groupbyinc/flux/index/reindex/ReindexRequest;Lcom/groupbyinc/flux/action/ActionListener;)V u(Ljava/util/List;)Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/CharacterRunAutomaton; |(Lcom/groupbyinc/flux/index/reindex/RemoteInfo;JLjava/util/List;)Lcom/groupbyinc/flux/client/RestClient; BootstrapMethods
SourceFile InnerClasses ! * + ^ , - . / 0 1 2 3 4 5 6
7 8 _ ?
<*+;, -? P ? S*? U*? W*? Y*? [*? ]+? `? b? f? h? ` f
<