com.groupbyinc.flux.ingest.PipelineStore.class Maven / Gradle / Ivy
???? 4? (com/groupbyinc/flux/ingest/PipelineStore 6com/groupbyinc/flux/common/component/AbstractComponent /com/groupbyinc/flux/cluster/ClusterStateApplier PipelineStore.java *com/groupbyinc/flux/ingest/PipelineStore$3 *com/groupbyinc/flux/ingest/PipelineStore$2
*com/groupbyinc/flux/ingest/PipelineStore$1 +com/groupbyinc/flux/ingest/Pipeline$Factory #com/groupbyinc/flux/ingest/Pipeline Factory ,com/groupbyinc/flux/ingest/Processor$Factory $com/groupbyinc/flux/ingest/Processor 0com/groupbyinc/flux/cluster/ClusterState$Builder (com/groupbyinc/flux/cluster/ClusterState Builder java/util/Map$Entry
java/util/Map Entry 4com/groupbyinc/flux/cluster/metadata/MetaData$Custom ! -com/groupbyinc/flux/cluster/metadata/MetaData # Custom 5com/groupbyinc/flux/cluster/metadata/MetaData$Builder & factory -Lcom/groupbyinc/flux/ingest/Pipeline$Factory; processorFactories Ljava/util/Map; QLjava/util/Map; pipelines HLjava/util/Map; @(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/util/Map;)V 1(Lcom/groupbyinc/flux/common/settings/Settings;)V / 1
2 ()V / 4
5 ( ) 7 java/util/HashMap 9
: 5 - + < * + > this *Lcom/groupbyinc/flux/ingest/PipelineStore; settings .Lcom/groupbyinc/flux/common/settings/Settings; applyClusterState 4(Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;)V /com/groupbyinc/flux/cluster/ClusterChangedEvent F
previousState ,()Lcom/groupbyinc/flux/cluster/ClusterState; H I
G J state L I
G M innerUpdatePipelines W(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/cluster/ClusterState;)V O P
Q event 1Lcom/groupbyinc/flux/cluster/ClusterChangedEvent; /com/groupbyinc/flux/ElasticsearchParseException U java/lang/Exception W blocks 3()Lcom/groupbyinc/flux/cluster/block/ClusterBlocks; Y Z
[ *com/groupbyinc/flux/gateway/GatewayService ] STATE_NOT_RECOVERED_BLOCK 0Lcom/groupbyinc/flux/cluster/block/ClusterBlock; _ ` ^ a /com/groupbyinc/flux/cluster/block/ClusterBlocks c hasGlobalBlock 3(Lcom/groupbyinc/flux/cluster/block/ClusterBlock;)Z e f
d g getMetaData 1()Lcom/groupbyinc/flux/cluster/metadata/MetaData; i j
k ingest m custom J(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/MetaData$Custom; o p
$ q )com/groupbyinc/flux/ingest/IngestMetadata s java/util/Objects u equals '(Ljava/lang/Object;Ljava/lang/Object;)Z w x
v y java/util/ArrayList {
| 5 getPipelines ()Ljava/util/Map; ~
t ? values ()Ljava/util/Collection; ? ? ? java/util/Collection ? iterator ()Ljava/util/Iterator; ? ? ? ? java/util/List ? java/util/Iterator ? hasNext ()Z ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? 0com/groupbyinc/flux/ingest/PipelineConfiguration ? getId ()Ljava/lang/String; ? ?
? ? getConfigAsMap ?
? ? create W(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;)Lcom/groupbyinc/flux/ingest/Pipeline; ? ?
? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? ? substitutePipeline j(Ljava/lang/String;Lcom/groupbyinc/flux/ElasticsearchParseException;)Lcom/groupbyinc/flux/ingest/Pipeline; ? ?
? add (Ljava/lang/Object;)Z ? ? ? ? java/lang/StringBuilder ?
? 5 !Error updating pipeline with id [ ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? ] ? toString ? ?
? ? java/lang/Object ? =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V / ?
V ? java/util/Collections ? unmodifiableMap (Ljava/util/Map;)Ljava/util/Map; ? ?
? ? $com/groupbyinc/flux/ExceptionsHelper ? rethrowAndSuppress (Ljava/util/List;)V ? ?
? ? e 1Lcom/groupbyinc/flux/ElasticsearchParseException; parseException Ljava/lang/Exception; pipeline 2Lcom/groupbyinc/flux/ingest/PipelineConfiguration; *Lcom/groupbyinc/flux/cluster/ClusterState; ingestMetadata +Lcom/groupbyinc/flux/ingest/IngestMetadata; previousIngestMetadata
exceptions CLjava/util/List; Ljava/util/List;
getHeaderKeys ()Ljava/util/Set; ? ?
V ?
processor_tag ?
java/util/Set ? contains ? ? ? ? getHeader $(Ljava/lang/String;)Ljava/util/List; ? ?
V ? get (I)Ljava/lang/Object; ? ? ? ? java/lang/String ? processor_type ? unknown ? pipeline with id [ ? "] could not be loaded, caused by [ ? getDetailedMessage ? ?
V ? c(Lcom/groupbyinc/flux/ingest/PipelineStore;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V / ?
? ;this is a place holder pipeline, because pipeline with id [ ] could not be loaded ,com/groupbyinc/flux/ingest/CompoundProcessor *([Lcom/groupbyinc/flux/ingest/Processor;)V /
h(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lcom/groupbyinc/flux/ingest/CompoundProcessor;)V /
id Ljava/lang/String; tag type errorMessage failureProcessor &Lcom/groupbyinc/flux/ingest/Processor; description delete ?(Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/action/ingest/DeletePipelineRequest;Lcom/groupbyinc/flux/action/ActionListener;)V delete-pipeline- 7com/groupbyinc/flux/action/ingest/DeletePipelineRequest
? ?(Lcom/groupbyinc/flux/ingest/PipelineStore;Lcom/groupbyinc/flux/cluster/ack/AckedRequest;Lcom/groupbyinc/flux/action/ActionListener;Lcom/groupbyinc/flux/action/ingest/DeletePipelineRequest;)V /
2com/groupbyinc/flux/cluster/service/ClusterService submitStateUpdateTask I(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/ClusterStateTaskConfig;)V !
" clusterService 4Lcom/groupbyinc/flux/cluster/service/ClusterService; request 9Lcom/groupbyinc/flux/action/ingest/DeletePipelineRequest; listener fLcom/groupbyinc/flux/action/ActionListener; +Lcom/groupbyinc/flux/action/ActionListener; innerDelete ?(Lcom/groupbyinc/flux/action/ingest/DeletePipelineRequest;Lcom/groupbyinc/flux/cluster/ClusterState;)Lcom/groupbyinc/flux/cluster/ClusterState; metaData- j
. java/util/HashSet0
1 5 keySet3 ? 4 ? ? &com/groupbyinc/flux/common/regex/Regex7 simpleMatch '(Ljava/lang/String;Ljava/lang/String;)Z9:
8; ? ? isEmpty> ? ?? isMatchAllPattern (Ljava/lang/String;)ZAB
8C -com/groupbyinc/flux/ResourceNotFoundExceptionE pipeline [{}] is missingG ((Ljava/lang/String;[Ljava/lang/Object;)V /I
FJ (Ljava/util/Map;)V /L
:M remove &(Ljava/lang/Object;)Ljava/lang/Object;OP Q builder ^(Lcom/groupbyinc/flux/cluster/ClusterState;)Lcom/groupbyinc/flux/cluster/ClusterState$Builder;ST
U h(Lcom/groupbyinc/flux/cluster/metadata/MetaData;)Lcom/groupbyinc/flux/cluster/metadata/MetaData$Builder;SW
$X
tM putCustom ?(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/metadata/MetaData$Custom;)Lcom/groupbyinc/flux/cluster/metadata/MetaData$Builder;[\
'] build_ j
'` c(Lcom/groupbyinc/flux/cluster/metadata/MetaData;)Lcom/groupbyinc/flux/cluster/ClusterState$Builder;-b
c_ I
e pipelineKey key currentState currentIngestMetadata ULjava/util/Map; toRemove #Ljava/util/Set; Ljava/util/Set;
pipelinesCopy newState 2Lcom/groupbyinc/flux/cluster/ClusterState$Builder; ?(Lcom/groupbyinc/flux/cluster/service/ClusterService;Ljava/util/Map;Lcom/groupbyinc/flux/action/ingest/PutPipelineRequest;Lcom/groupbyinc/flux/action/ActionListener;)V validatePipeline H(Ljava/util/Map;Lcom/groupbyinc/flux/action/ingest/PutPipelineRequest;)Vst
u
put-pipeline-w 4com/groupbyinc/flux/action/ingest/PutPipelineRequesty
z ? ?(Lcom/groupbyinc/flux/ingest/PipelineStore;Lcom/groupbyinc/flux/cluster/ack/AckedRequest;Lcom/groupbyinc/flux/action/ActionListener;Lcom/groupbyinc/flux/action/ingest/PutPipelineRequest;)V /|
} ingestInfos hLjava/util/Map; 6Lcom/groupbyinc/flux/action/ingest/PutPipelineRequest; ? java/lang/IllegalStateException? Ingest info is empty? (Ljava/lang/String;)V /?
?? getSource 3()Lcom/groupbyinc/flux/common/bytes/BytesReference;??
z? getXContentType 4()Lcom/groupbyinc/flux/common/xcontent/XContentType;??
z? 2com/groupbyinc/flux/common/xcontent/XContentHelper? convertToMap ?(Lcom/groupbyinc/flux/common/bytes/BytesReference;ZLcom/groupbyinc/flux/common/xcontent/XContentType;)Lcom/groupbyinc/flux/common/collect/Tuple;??
?? (com/groupbyinc/flux/common/collect/Tuple? v2? ?
?? flattenAllProcessors ()Ljava/util/List;??
? ? ? entrySet? ? ? getValue? ? ? %com/groupbyinc/flux/ingest/IngestInfo? getType? ? ? containsProcessor?B
?? Processor type [? ] is not installed on node [? getKey? ? ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ??
?? getTag? ? ? -com/groupbyinc/flux/ingest/ConfigurationUtils? newConfigurationException v(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/ElasticsearchException;??
?? message entry nLjava/util/Map$Entry; Ljava/util/Map$Entry; processor pipelineConfig 5Ljava/util/Map; %Lcom/groupbyinc/flux/ingest/Pipeline; 'Ljava/util/List; innerPut ?(Lcom/groupbyinc/flux/action/ingest/PutPipelineRequest;Lcom/groupbyinc/flux/cluster/ClusterState;)Lcom/groupbyinc/flux/cluster/ClusterState; x(Ljava/lang/String;Lcom/groupbyinc/flux/common/bytes/BytesReference;Lcom/groupbyinc/flux/common/xcontent/XContentType;)V /?
?? 9(Ljava/lang/String;)Lcom/groupbyinc/flux/ingest/Pipeline; ?P ? getProcessorFactories O(Lcom/groupbyinc/flux/cluster/ClusterState;[Ljava/lang/String;)Ljava/util/List; innerGetPipelines P(Lcom/groupbyinc/flux/ingest/IngestMetadata;[Ljava/lang/String;)Ljava/util/List;??
? clusterState ids [Ljava/lang/String; emptyList??
?? (Ljava/util/Collection;)V /?
|? (I)V /?
|?? isSimpleMatchPattern?B
8? [Ljava/util/Map$Entry; result DLjava/util/List; Signature Code LocalVariableTable LocalVariableTypeTable LineNumberTable ?(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/util/Map;)V
StackMapTable ?(Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/action/ingest/DeletePipelineRequest;Lcom/groupbyinc/flux/action/ActionListener;)V
Exceptions;(Lcom/groupbyinc/flux/cluster/service/ClusterService;Ljava/util/Map;Lcom/groupbyinc/flux/action/ingest/PutPipelineRequest;Lcom/groupbyinc/flux/action/ActionListener;)V ?(Ljava/util/Map;Lcom/groupbyinc/flux/action/ingest/PutPipelineRequest;)V S()Ljava/util/Map; ?(Lcom/groupbyinc/flux/cluster/ClusterState;[Ljava/lang/String;)Ljava/util/List; ?(Lcom/groupbyinc/flux/ingest/IngestMetadata;[Ljava/lang/String;)Ljava/util/List;
SourceFile InnerClasses ! ( ) * + ? , @ - + ? .
/ 0 ? ? !*+? 3*? Y? 6? 8*? :Y? ;? =*,? ?? ? ! @ A ! B C ! * + ? ! * , ? ? 5 <