com.groupbyinc.flux.tasks.TaskResultsService.class Maven / Gradle / Ivy
???? 4? ,com/groupbyinc/flux/tasks/TaskResultsService 6com/groupbyinc/flux/common/component/AbstractComponent TaskResultsService.java .com/groupbyinc/flux/tasks/TaskResultsService$3 .com/groupbyinc/flux/tasks/TaskResultsService$2 .com/groupbyinc/flux/tasks/TaskResultsService$1
5com/groupbyinc/flux/common/xcontent/ToXContent$Params .com/groupbyinc/flux/common/xcontent/ToXContent Params 4com/groupbyinc/flux/common/settings/Settings$Builder ,com/groupbyinc/flux/common/settings/Settings Builder %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup
TASK_INDEX Ljava/lang/String; .tasks TASK_TYPE task TASK_RESULT_INDEX_MAPPING_FILE task-index-mapping.json # client #Lcom/groupbyinc/flux/client/Client; clusterService 4Lcom/groupbyinc/flux/cluster/service/ClusterService; createIndexAction LLcom/groupbyinc/flux/action/admin/indices/create/TransportCreateIndexAction; ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/client/Client;Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/action/admin/indices/create/TransportCreateIndexAction;)V *Lcom/groupbyinc/flux/common/inject/Inject; 1(Lcom/groupbyinc/flux/common/settings/Settings;)V + .
/ % & 1 ' ( 3 ) * 5 this .Lcom/groupbyinc/flux/tasks/TaskResultsService; settings .Lcom/groupbyinc/flux/common/settings/Settings; storeResult T(Lcom/groupbyinc/flux/tasks/TaskResult;Lcom/groupbyinc/flux/action/ActionListener;)V 2com/groupbyinc/flux/cluster/service/ClusterService = state ,()Lcom/groupbyinc/flux/cluster/ClusterState; ? @
> A (com/groupbyinc/flux/cluster/ClusterState C routingTable 4()Lcom/groupbyinc/flux/cluster/routing/RoutingTable; E F
D G 0com/groupbyinc/flux/cluster/routing/RoutingTable I hasIndex (Ljava/lang/String;)Z K L
J M Bcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest O ()V + Q
P R taskResultIndexSettings 0()Lcom/groupbyinc/flux/common/settings/Settings; T U
V t(Lcom/groupbyinc/flux/common/settings/Settings;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest; 9 X
P Y index X(Ljava/lang/String;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest; [ \
P ] taskResultIndexMapping ()Ljava/lang/String; _ `
a 0com/groupbyinc/flux/common/xcontent/XContentType c JSON 2Lcom/groupbyinc/flux/common/xcontent/XContentType; e f d g mapping ?(Ljava/lang/String;Ljava/lang/String;Lcom/groupbyinc/flux/common/xcontent/XContentType;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest; i j
P k auto(task api) m cause o \
P p ?(Lcom/groupbyinc/flux/tasks/TaskResultsService;Lcom/groupbyinc/flux/tasks/TaskResult;Lcom/groupbyinc/flux/action/ActionListener;)V + r
s Jcom/groupbyinc/flux/action/admin/indices/create/TransportCreateIndexAction u execute x(Lcom/groupbyinc/flux/tasks/Task;Lcom/groupbyinc/flux/action/ActionRequest;Lcom/groupbyinc/flux/action/ActionListener;)V w x
v y getMetaData 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData; { |
D } -com/groupbyinc/flux/cluster/metadata/MetaData H(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; [ ?
? ? 2com/groupbyinc/flux/cluster/metadata/IndexMetaData ? getMappings 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; ? ?
? ? 3com/groupbyinc/flux/common/collect/ImmutableOpenMap ? containsKey (Ljava/lang/Object;)Z ? ?
? ? !com/groupbyinc/flux/client/Client ? admin *()Lcom/groupbyinc/flux/client/AdminClient; ? ? ? ? &com/groupbyinc/flux/client/AdminClient ? indices 1()Lcom/groupbyinc/flux/client/IndicesAdminClient; ? ? ? ? java/lang/String ? -com/groupbyinc/flux/client/IndicesAdminClient ? preparePutMapping d([Ljava/lang/String;)Lcom/groupbyinc/flux/action/admin/indices/mapping/put/PutMappingRequestBuilder; ? ? ? ? Mcom/groupbyinc/flux/action/admin/indices/mapping/put/PutMappingRequestBuilder ? setType c(Ljava/lang/String;)Lcom/groupbyinc/flux/action/admin/indices/mapping/put/PutMappingRequestBuilder; ? ?
? ? setSource ?(Ljava/lang/String;Lcom/groupbyinc/flux/common/xcontent/XContentType;)Lcom/groupbyinc/flux/action/admin/indices/mapping/put/PutMappingRequestBuilder; ? ?
? ?
s .(Lcom/groupbyinc/flux/action/ActionListener;)V w ?
? ?
doStoreResult ? <
? createIndexRequest DLcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest; metaData 4Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;
taskResult &Lcom/groupbyinc/flux/tasks/TaskResult; listener =Lcom/groupbyinc/flux/action/ActionListener; +Lcom/groupbyinc/flux/action/ActionListener; *Lcom/groupbyinc/flux/cluster/ClusterState; java/lang/Throwable ? java/io/IOException ? $com/groupbyinc/flux/tasks/TaskResult ? getTask &()Lcom/groupbyinc/flux/tasks/TaskInfo; ? ?
? ? "com/groupbyinc/flux/tasks/TaskInfo ? getTaskId $()Lcom/groupbyinc/flux/tasks/TaskId; ? ?
? ? com/groupbyinc/flux/tasks/TaskId ? toString ? `
? ? prepareIndex n(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/action/index/IndexRequestBuilder; ? ? ? ? #com/groupbyinc/flux/client/Requests ? INDEX_CONTENT_TYPE ? f ? ? 3com/groupbyinc/flux/common/xcontent/XContentFactory ? contentBuilder i(Lcom/groupbyinc/flux/common/xcontent/XContentType;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? EMPTY_PARAMS 7Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params; ? ? ?
toXContent ?(Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? 4com/groupbyinc/flux/action/index/IndexRequestBuilder ? m(Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;)Lcom/groupbyinc/flux/action/index/IndexRequestBuilder; ? ?
? ? 3com/groupbyinc/flux/common/xcontent/XContentBuilder ? close ? Q
? ? )com/groupbyinc/flux/action/ActionListener ?
addSuppressed (Ljava/lang/Throwable;)V ? ?
? ? *com/groupbyinc/flux/ElasticsearchException ? 1Couldn't convert task result to XContent for [{}] ? java/lang/Object ? =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V +
? \(Lcom/groupbyinc/flux/tasks/TaskResultsService;Lcom/groupbyinc/flux/action/ActionListener;)V +
? ? builder 5Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; e Ljava/io/IOException; 6Lcom/groupbyinc/flux/action/index/IndexRequestBuilder; 8()Lcom/groupbyinc/flux/common/settings/Settings$Builder;
INDEX_NUMBER_OF_SHARDS_SETTING -Lcom/groupbyinc/flux/common/settings/Setting; ? +com/groupbyinc/flux/common/settings/Setting getKey `
put K(Ljava/lang/String;I)Lcom/groupbyinc/flux/common/settings/Settings$Builder;
"INDEX_AUTO_EXPAND_REPLICAS_SETTING ? 0-1 \(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/settings/Settings$Builder;"
# index.priority%??? build( U
) java/lang/Exception+ getClass ()Ljava/lang/Class;-.
/ java/lang/Class1 getResourceAsStream )(Ljava/lang/String;)Ljava/io/InputStream;34
25 java/io/ByteArrayOutputStream7
8 R %com/groupbyinc/flux/common/io/Streams: copy .(Ljava/io/InputStream;Ljava/io/OutputStream;)J<=
;> 5com/groupbyinc/flux/common/apache/lucene/util/IOUtils@ UTF_8B AC &(Ljava/lang/String;)Ljava/lang/String; ?E
8F java/io/InputStreamH
I ? logger !Lorg/apache/logging/log4j/Logger;KL M "java/lang/invoke/LambdaMetafactoryO 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;QR
PST ()Ljava/lang/Object;V lambda$taskResultIndexMapping$0XV
YZ get *()Lorg/apache/logging/log4j/util/Supplier;\] ^ org/apache/logging/log4j/Logger` error @(Lorg/apache/logging/log4j/util/Supplier;Ljava/lang/Throwable;)Vbcad java/lang/IllegalStateExceptionf Gfailed to create tasks results index template [task-index-mapping.json]h *(Ljava/lang/String;Ljava/lang/Throwable;)V +j
gk out Ljava/io/ByteArrayOutputStream; is Ljava/io/InputStream; Ljava/lang/Exception; 5org/apache/logging/log4j/message/ParameterizedMessager 2failed to create tasks results index template [{}]t '(Ljava/lang/String;Ljava/lang/Object;)V +v
sw
access$000 x0 x1 x2
ConstantValue Code LocalVariableTable LineNumberTable RuntimeVisibleAnnotations LocalVariableTypeTable
StackMapTable Signature f(Lcom/groupbyinc/flux/tasks/TaskResult;Lcom/groupbyinc/flux/action/ActionListener;)V BootstrapMethods
SourceFile InnerClasses ! } } ! " } $ % &