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 # &TASK_RESULT_MAPPING_VERSION_META_FIELD version & TASK_RESULT_MAPPING_VERSION I 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 4
5 + , 7 - . 9 / 0 ; 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 C state ,()Lcom/groupbyinc/flux/cluster/ClusterState; E F
D G (com/groupbyinc/flux/cluster/ClusterState I routingTable 4()Lcom/groupbyinc/flux/cluster/routing/RoutingTable; K L
J M 0com/groupbyinc/flux/cluster/routing/RoutingTable O hasIndex (Ljava/lang/String;)Z Q R
P S Bcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest U ()V 1 W
V X taskResultIndexSettings 0()Lcom/groupbyinc/flux/common/settings/Settings; Z [
\ t(Lcom/groupbyinc/flux/common/settings/Settings;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest; ? ^
V _ index X(Ljava/lang/String;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest; a b
V c taskResultIndexMapping ()Ljava/lang/String; e f
g 0com/groupbyinc/flux/common/xcontent/XContentType i JSON 2Lcom/groupbyinc/flux/common/xcontent/XContentType; k l j m mapping ?(Ljava/lang/String;Ljava/lang/String;Lcom/groupbyinc/flux/common/xcontent/XContentType;)Lcom/groupbyinc/flux/action/admin/indices/create/CreateIndexRequest; o p
V q auto(task api) s cause u b
V v ?(Lcom/groupbyinc/flux/tasks/TaskResultsService;Lcom/groupbyinc/flux/tasks/TaskResult;Lcom/groupbyinc/flux/action/ActionListener;)V 1 x
y Jcom/groupbyinc/flux/action/admin/indices/create/TransportCreateIndexAction { execute x(Lcom/groupbyinc/flux/tasks/Task;Lcom/groupbyinc/flux/action/ActionRequest;Lcom/groupbyinc/flux/action/ActionListener;)V } ~
| getMetaData 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData; ? ?
J ? -com/groupbyinc/flux/cluster/metadata/MetaData ? H(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData; a ?
? ? getTaskResultMappingVersion 7(Lcom/groupbyinc/flux/cluster/metadata/IndexMetaData;)I ? ?
? !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; ? ?
? ?
y .(Lcom/groupbyinc/flux/action/ActionListener;)V } ?
? ? 2com/groupbyinc/flux/cluster/metadata/IndexMetaData ?
doStoreResult ? B
? 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; getMappings 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; ? ?
? ? 3com/groupbyinc/flux/common/collect/ImmutableOpenMap ? get &(Ljava/lang/Object;)Ljava/lang/Object; ? ?
? ? 4com/groupbyinc/flux/cluster/metadata/MappingMetaData ? sourceAsMap ()Ljava/util/Map; ? ?
? ? _meta ?
java/util/Map ? ? ? containsKey (Ljava/lang/Object;)Z ? ? ? ? java/lang/Integer ? intValue ()I ? ?
? ? mappingMetaData 6Lcom/groupbyinc/flux/cluster/metadata/MappingMetaData; meta 5Ljava/util/Map; Ljava/util/Map; 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 ? f
? ? 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 ? l ? ? 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; ?
$closeResource 1(Ljava/lang/Throwable;Ljava/lang/AutoCloseable;)V
)com/groupbyinc/flux/action/ActionListener 3com/groupbyinc/flux/common/xcontent/XContentBuilder *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 1"
# \(Lcom/groupbyinc/flux/tasks/TaskResultsService;Lcom/groupbyinc/flux/action/ActionListener;)V 1%
&
? 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;12 ?3 +com/groupbyinc/flux/common/settings/Setting5 getKey7 f
68 put K(Ljava/lang/String;I)Lcom/groupbyinc/flux/common/settings/Settings$Builder;:;
< "INDEX_AUTO_EXPAND_REPLICAS_SETTING>2 ?? 0-1A \(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/settings/Settings$Builder;:C
D index.priorityF??? buildI [
J java/lang/ExceptionL getClass ()Ljava/lang/Class;NO
!P java/lang/ClassR getResourceAsStream )(Ljava/lang/String;)Ljava/io/InputStream;TU
SV java/io/ByteArrayOutputStreamX
Y X ,com/groupbyinc/flux/core/internal/io/Streams[ copy .(Ljava/io/InputStream;Ljava/io/OutputStream;)J]^
\_ !java/nio/charset/StandardCharsetsa UTF_8 Ljava/nio/charset/Charset;cd be java/nio/charset/Charsetg namei f
hj &(Ljava/lang/String;)Ljava/lang/String; ?l
Ym java/io/InputStreamo logger !Lorg/apache/logging/log4j/Logger;qr s "java/lang/invoke/LambdaMetafactoryu 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;wx
vyz ,()Lorg/apache/logging/log4j/message/Message;| lambda$taskResultIndexMapping$0~|
? 1()Lorg/apache/logging/log4j/util/MessageSupplier; ?? ? org/apache/logging/log4j/Logger? error G(Lorg/apache/logging/log4j/util/MessageSupplier;Ljava/lang/Throwable;)V???? java/lang/IllegalStateException? Gfailed to create tasks results index template [task-index-mapping.json]? *(Ljava/lang/String;Ljava/lang/Throwable;)V 1?
?? out Ljava/io/ByteArrayOutputStream; is Ljava/io/InputStream; Ljava/lang/Exception; 5org/apache/logging/log4j/message/ParameterizedMessage? 2failed to create tasks results index template [{}]? '(Ljava/lang/String;Ljava/lang/Object;)V 1?
??
access$000 x0 x1 x2 java/lang/AutoCloseable? close? W??
addSuppressed (Ljava/lang/Throwable;)V??
?? Ljava/lang/Throwable; Ljava/lang/AutoCloseable;
ConstantValue Code LocalVariableTable LineNumberTable RuntimeVisibleAnnotations LocalVariableTypeTable
StackMapTable Signature f(Lcom/groupbyinc/flux/tasks/TaskResult;Lcom/groupbyinc/flux/action/ActionListener;)V BootstrapMethods
SourceFile InnerClasses ! ? ? ! " ? $ % ? ' ( ) ? * + , - . / 0 1 2 ? x *+? 6*,? 8*-? :*?