All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.groupbyinc.flux.action.update.UpdateHelper.class Maven / Gradle / Ivy

There is a newer version: 198
Show newest version
????4?.com/groupbyinc/flux/action/update/UpdateHelper6com/groupbyinc/flux/common/component/AbstractComponentUpdateHelper.java0com/groupbyinc/flux/action/update/UpdateHelper$1[(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/script/ScriptService;)V1(Lcom/groupbyinc/flux/common/settings/Settings;)V#%
& 	(this0Lcom/groupbyinc/flux/action/update/UpdateHelper;settings.Lcom/groupbyinc/flux/common/settings/Settings;prepare?(Lcom/groupbyinc/flux/action/update/UpdateRequest;Lcom/groupbyinc/flux/index/shard/IndexShard;Ljava/util/function/LongSupplier;)Lcom/groupbyinc/flux/action/update/UpdateHelper$Result;*com/groupbyinc/flux/index/shard/IndexShard0
getService1()Lcom/groupbyinc/flux/index/get/ShardGetService;23
14/com/groupbyinc/flux/action/update/UpdateRequest6type()Ljava/lang/String;89
7:id<9
7=java/lang/String?_routingA_parentCversion()JEF
7GversionType)()Lcom/groupbyinc/flux/index/VersionType;IJ
7KLcom/groupbyinc/flux/search/fetch/subphase/FetchSourceContext;OP	NQ-com/groupbyinc/flux/index/get/ShardGetServiceSget?(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;ZJLcom/groupbyinc/flux/index/VersionType;Lcom/groupbyinc/flux/search/fetch/subphase/FetchSourceContext;)Lcom/groupbyinc/flux/index/get/GetResult;UV
TWshardId+()Lcom/groupbyinc/flux/index/shard/ShardId;YZ
1[?(Lcom/groupbyinc/flux/index/shard/ShardId;Lcom/groupbyinc/flux/action/update/UpdateRequest;Lcom/groupbyinc/flux/index/get/GetResult;Ljava/util/function/LongSupplier;)Lcom/groupbyinc/flux/action/update/UpdateHelper$Result;.]
^request1Lcom/groupbyinc/flux/action/update/UpdateRequest;
indexShard,Lcom/groupbyinc/flux/index/shard/IndexShard;nowInMillis!Ljava/util/function/LongSupplier;	getResult)Lcom/groupbyinc/flux/index/get/GetResult;'com/groupbyinc/flux/index/get/GetResulthisExists()Zjk
il
prepareUpsertn]
ointernalSourceRef3()Lcom/groupbyinc/flux/common/bytes/BytesReference;qr
is?com/groupbyinc/flux/index/engine/DocumentSourceMissingExceptionuP(Lcom/groupbyinc/flux/index/shard/ShardId;Ljava/lang/String;Ljava/lang/String;)V#w
vxscript%()Lcom/groupbyinc/flux/script/Script;z{
7|doc1()Lcom/groupbyinc/flux/action/index/IndexRequest;~
7?
detectNoop?k
7?prepareUpdateIndexRequest?(Lcom/groupbyinc/flux/index/shard/ShardId;Lcom/groupbyinc/flux/action/update/UpdateRequest;Lcom/groupbyinc/flux/index/get/GetResult;Z)Lcom/groupbyinc/flux/action/update/UpdateHelper$Result;??
?prepareUpdateScriptRequest?]
?)Lcom/groupbyinc/flux/index/shard/ShardId;executeScriptedUpsert?(Lcom/groupbyinc/flux/action/index/IndexRequest;Lcom/groupbyinc/flux/script/Script;Ljava/util/function/LongSupplier;)Lcom/groupbyinc/flux/common/collect/Tuple;-com/groupbyinc/flux/action/index/IndexRequest?sourceAsMap()Ljava/util/Map;??
??java/util/HashMap?(I)V#?
??op?CREATE=Lcom/groupbyinc/flux/action/update/UpdateHelper$UpdateOpType;??	?toString?9
?
java/util/Map?put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;????_source?_now?java/util/function/LongSupplier?	getAsLong?F??java/lang/Long?valueOf(J)Ljava/lang/Long;??
??
executeScriptC(Lcom/groupbyinc/flux/script/Script;Ljava/util/Map;)Ljava/util/Map;??
?&(Ljava/lang/Object;)Ljava/lang/Object;U???logger!Lorg/apache/logging/log4j/Logger;??	?!com/groupbyinc/flux/script/Script?getIdOrCode?9
??lenientFromString?(Ljava/lang/String;Lorg/apache/logging/log4j/Logger;Ljava/lang/String;)Lcom/groupbyinc/flux/action/update/UpdateHelper$UpdateOpType;??
?NONE??	??Invalid upsert operation [{}] for script [{}], doing nothing...?org/apache/logging/log4j/Logger?warn9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V????(com/groupbyinc/flux/common/collect/Tuple?'(Ljava/lang/Object;Ljava/lang/Object;)V#?
??upsert/Lcom/groupbyinc/flux/action/index/IndexRequest;#Lcom/groupbyinc/flux/script/Script;	upsertDoc5Ljava/util/Map;Ljava/util/Map;ctx	operation	newSource
upsertRequest?
7?docAsUpsert?k
7?9com/groupbyinc/flux/index/engine/DocumentMissingException?
?xscriptedUpsert?k
7?z?	7???
?D$SwitchMap$org$elasticsearch$action$update$UpdateHelper$UpdateOpType[I??	?v1()Ljava/lang/Object;??
??ordinal()I??
?v2?
?source@(Ljava/util/Map;)Lcom/groupbyinc/flux/action/index/IndexRequest;
?0com/groupbyinc/flux/action/update/UpdateResponsegetType
9
igetId
9
i
getVersionF
iNOOP4Lcom/groupbyinc/flux/action/DocWriteResponse$Result;	?(Lcom/groupbyinc/flux/index/shard/ShardId;Ljava/lang/String;Ljava/lang/String;JLcom/groupbyinc/flux/action/DocWriteResponse$Result;)V#
	setGetResult,(Lcom/groupbyinc/flux/index/get/GetResult;)V
	0com/groupbyinc/flux/common/xcontent/XContentTypeJSON2Lcom/groupbyinc/flux/common/xcontent/XContentType; !	"?(Lcom/groupbyinc/flux/common/io/stream/Streamable;Lcom/groupbyinc/flux/action/DocWriteResponse$Result;Ljava/util/Map;Lcom/groupbyinc/flux/common/xcontent/XContentType;)V#$
%"java/lang/IllegalArgumentException'java/lang/StringBuilder)()V#+
*,unknown upsert operation, got: .append-(Ljava/lang/String;)Ljava/lang/StringBuilder;01
*2-(Ljava/lang/Object;)Ljava/lang/StringBuilder;04
*5
*?(Ljava/lang/String;)V#8
(9index;9
7<W(Ljava/lang/String;)Lcom/groupbyinc/flux/action/support/replication/ReplicationRequest;;>
??C(Ljava/lang/String;)Lcom/groupbyinc/flux/action/index/IndexRequest;8A
?B<A
?DgetRefreshPolicyA()Lcom/groupbyinc/flux/action/support/WriteRequest$RefreshPolicy;FG
7HsetRefreshPolicy?(Lcom/groupbyinc/flux/action/support/WriteRequest$RefreshPolicy;)Lcom/groupbyinc/flux/action/support/replication/ReplicatedWriteRequest;JK
?LroutingN9
7ONA
?QparentS9
7TSA
?Vtimeout-()Lcom/groupbyinc/flux/common/unit/TimeValue;XY
7Zp(Lcom/groupbyinc/flux/common/unit/TimeValue;)Lcom/groupbyinc/flux/action/support/replication/ReplicationRequest;X\
?]waitForActiveShards7()Lcom/groupbyinc/flux/action/support/ActiveShardCount;_`
7az(Lcom/groupbyinc/flux/action/support/ActiveShardCount;)Lcom/groupbyinc/flux/action/support/replication/ReplicationRequest;_c
?dcreate2(Z)Lcom/groupbyinc/flux/action/index/IndexRequest;fg
?h%com/groupbyinc/flux/index/VersionTypejINTERNAL'Lcom/groupbyinc/flux/index/VersionType;lm	kn2(J)Lcom/groupbyinc/flux/action/index/IndexRequest;Ep
?qX(Lcom/groupbyinc/flux/index/VersionType;)Lcom/groupbyinc/flux/action/index/IndexRequest;Is
?tCREATEDv	wupdate2Lcom/groupbyinc/flux/action/update/UpdateResponse;upsertResult?Lcom/groupbyinc/flux/common/collect/Tuple;>;*Lcom/groupbyinc/flux/common/collect/Tuple;indexRequestcalculateUpdateVersion](Lcom/groupbyinc/flux/action/update/UpdateRequest;Lcom/groupbyinc/flux/index/get/GetResult;)J!"	?FORCE?m	k?java/lang/AssertionError?
?,calculateRoutingl(Lcom/groupbyinc/flux/index/get/GetResult;Lcom/groupbyinc/flux/action/index/IndexRequest;)Ljava/lang/String;%Lcom/groupbyinc/flux/common/Nullable;
?O	getFields??
i?containsKey(Ljava/lang/Object;)Z????fieldG(Ljava/lang/String;)Lcom/groupbyinc/flux/common/document/DocumentField;??
i?1com/groupbyinc/flux/common/document/DocumentField?getValue??
??java/lang/Object?
??updateIndexRequestcalculateParent
?T?
???
???
?2com/groupbyinc/flux/common/xcontent/XContentHelper?convertToMap^(Lcom/groupbyinc/flux/common/bytes/BytesReference;Z)Lcom/groupbyinc/flux/common/collect/Tuple;??
??"(Ljava/util/Map;Ljava/util/Map;Z)Zy?
??'com/groupbyinc/flux/index/shard/ShardId?extractGetResult?(Lcom/groupbyinc/flux/action/update/UpdateRequest;Ljava/lang/String;JLjava/util/Map;Lcom/groupbyinc/flux/common/xcontent/XContentType;Lcom/groupbyinc/flux/common/bytes/BytesReference;)Lcom/groupbyinc/flux/index/get/GetResult;??
?#com/groupbyinc/flux/client/Requests?~A
??r(Ljava/util/Map;Lcom/groupbyinc/flux/common/xcontent/XContentType;)Lcom/groupbyinc/flux/action/index/IndexRequest;?
??UPDATED?	?finalIndexRequest
updateVersionJcurrentRequestLjava/lang/String;sourceAndContent?Lcom/groupbyinc/flux/common/collect/Tuple;>;updateSourceContentTypeupdatedSourceAsMapnoopINDEX??	?_index?getIndex?9
i?_type?_id?_version?
deleteRequestE(Ljava/lang/String;)Lcom/groupbyinc/flux/action/delete/DeleteRequest;??
??/com/groupbyinc/flux/action/delete/DeleteRequest?8?
??<?
??N?
??S?
??4(J)Lcom/groupbyinc/flux/action/delete/DeleteRequest;E?
??Z(Lcom/groupbyinc/flux/index/VersionType;)Lcom/groupbyinc/flux/action/delete/DeleteRequest;I?
??
?d
?]
?LDELETED?	?1Lcom/groupbyinc/flux/action/delete/DeleteRequest;java/lang/Exception?UPDATE_CONTEXT*Lcom/groupbyinc/flux/script/ScriptContext;??	?(com/groupbyinc/flux/script/ScriptService?compilea(Lcom/groupbyinc/flux/script/Script;Lcom/groupbyinc/flux/script/ScriptContext;)Ljava/lang/Object;??
??	getParams?
?newInstance>(Ljava/util/Map;)Lcom/groupbyinc/flux/script/ExecutableScript;?
setNextVar'(Ljava/lang/String;Ljava/lang/Object;)V	
run
?failed to execute script*(Ljava/lang/String;Ljava/lang/Throwable;)V#
(factory5Lcom/groupbyinc/flux/script/ExecutableScript$Factory;executableScript-Lcom/groupbyinc/flux/script/ExecutableScript;eLjava/lang/Exception;java/lang/Throwablejava/io/IOExceptionfields()[Ljava/lang/String; 
7!fetchSource@()Lcom/groupbyinc/flux/search/fetch/subphase/FetchSourceContext;#$
7%#k
N'.com/groupbyinc/flux/search/lookup/SourceLookup)
*,	setSource(Ljava/util/Map;)V,-
*./com/groupbyinc/flux/common/bytes/BytesReference0[Ljava/lang/String;2equals4?
@5extractValue&(Ljava/lang/String;)Ljava/lang/Object;78
*9java/util/ArrayList;
<?%(Ljava/lang/String;Ljava/util/List;)V#>
??	getValues()Ljava/util/List;AB
?Cjava/util/ListEaddG?FHincludesJ 
NKexcludesM 
NNfilterR(Lcom/groupbyinc/flux/search/fetch/subphase/FetchSourceContext;)Ljava/lang/Object;PQ
*RlengthT?
1Ujava/lang/MathWmin(II)IYZ
X[6com/groupbyinc/flux/common/io/stream/BytesStreamOutput]
^?3com/groupbyinc/flux/common/xcontent/XContentBuilder`xContent0()Lcom/groupbyinc/flux/common/xcontent/XContent;bc
dG(Lcom/groupbyinc/flux/common/xcontent/XContent;Ljava/io/OutputStream;)V#f
agvalueI(Ljava/lang/Object;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;ij
akbytesmr
anclosep+
aq
addSuppressed(Ljava/lang/Throwable;)Vst
u*com/groupbyinc/flux/ElasticsearchExceptionwError filtering sourcey=(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V#{
x|{(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JZLcom/groupbyinc/flux/common/bytes/BytesReference;Ljava/util/Map;)V#~
i
documentField3Lcom/groupbyinc/flux/common/document/DocumentField;Ljava/lang/Object;builder5Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;initialCapacityIstreamOutput8Lcom/groupbyinc/flux/common/io/stream/BytesStreamOutput;Ljava/io/IOException;
concreteIndexsourceContentType
sourceAsBytes1Lcom/groupbyinc/flux/common/bytes/BytesReference;sourceLookup0Lcom/groupbyinc/flux/search/lookup/SourceLookup;sourceRequestedVLjava/util/Map;sourceFilteredAsBytesjava/lang/Class?desiredAssertionStatus?k
??CodeLocalVariableTableLineNumberTable
StackMapTableLocalVariableTypeTable	Signature(Lcom/groupbyinc/flux/action/index/IndexRequest;Lcom/groupbyinc/flux/script/Script;Ljava/util/function/LongSupplier;)Lcom/groupbyinc/flux/common/collect/Tuple;>;RuntimeVisibleAnnotations"RuntimeVisibleParameterAnnotations?(Lcom/groupbyinc/flux/script/Script;Ljava/util/Map;)Ljava/util/Map;(Lcom/groupbyinc/flux/action/update/UpdateRequest;Ljava/lang/String;JLjava/util/Map;Lcom/groupbyinc/flux/common/xcontent/XContentType;Lcom/groupbyinc/flux/common/bytes/BytesReference;)Lcom/groupbyinc/flux/index/get/GetResult;
SourceFileInnerClasses! !"
#$?Q*+?'*,?)?? *+,- ?BC
D./??	8,?5+?;+?>?@YBSYDS+?H+?L?R?X:*,?\+-?_??48*+8`a8bc8de+
fg?JL&J+M.]??M-?m?
*+,-?p?-?t??vY+,?;,?>?y?,?}?,???*+,-,?????*+,-????4M*+MY?M`aMfgMde?VXY[)\7^Ca??????+??:??Y??:???????W???W?-??????W*,??:????@*??,?Ǹ?:?????:???!?Υ*???,?ǹ???:??Y?۰?R?*+????z??de??????a@??o2??????????2jkm n,o?pHrasouw?x?{?!??????????n]?[	],???,????Y+,?;,?>???,??
,???,??:,???,?}??,??:*,????:??????.?d-????W?Z?	Y+-?-?-???:-??Y?????#?&??(Y?*Y?-/?3???6?7?:?,?=?@??,?;?C,?>?E,?I?M??,?P?R,?U?W,?[?^??,?b?e???iW,?L?o?,?H?r,?L?uW?Y?x?&??\	?yzG???U?{}]*+]Y?]`a]fg]de3*~??U?{|?V???3?A?G?U????????????????????/?3?=?N??
C??N???6??e??v,*?L?o? ???*?L?????Y???*?H?+???,`a,fg??
?"?'??"???{-+?+???+???*??B???*B?????????-fg-???????+?????	????{-+?+???+???*??D???*D?????????-fg-???????+?????	????X,-??7,??:-??:-??:	-?t??:

???:
???:??????6
?K
?F?	Y+-?-?-???:,,?=-?-?t????Y??&?,?=??,?;?C,?>?E?R	?W???r,?L?u,?b?e??,?[?^??,?I?M??:?Y???&???t*yz???*+Y?`afg?"???
????N??S?	'??}
1??!;???Q??"
?'???
;????V??
???'?1?;?Q?[?i?t????????????????????/?N?7i?@@??@?N?]?*,-??7,??:-??:-??:	-?t??:

???:
???:??Y??:

??ζ???W
?-?ӹ?W
?-???W
?-???W
?-?????W
B??W
D	??W
???W
???????W*,??
??:

????@*??,??Ǹ?:
?????:???.??,?=??,?;?C,?>?E?R	?W???r,?L?u,?b?e??,?[?^??,?I?M??:?Y???&?,?=??,?;??,?>????	????,?L??,?b????,?[????,?I????:?Y???&??	Y+-?-?-???:,,?=-?-?t????Y??&???z~????*yz**+*Y?*`a*fg*de#??
??N?
S?	'?}
1??!;???F???
?5??'???*'??
;???F???
'????&??
???'?1?;FVet????	?
???(0K[oz??????"?#$%$&?:?(?7i??@@?????b?[????G*?)?1*?)+????N-+??:,??W?N?(Y-??,?58??>"9G*+Gz?G???G???&	-./"0-1558394E6?5B???	????
?*?"?*?"??*?&?
*?&?(???*Y?+:?/6:	*?"??*?"???*?":

?66?|
2:

??6?	6?_
?::?Q	?
??Y??:		
????:?"??Y
? ?
?	???RWZ9Hn9Hw???nyw?????1??|Si?cl??
6i?????&y??
???i??`a????E?????!???+???5??"8??	????
???8??	??'@A B"D+E2F5G8HGIcJmKpLsN|O?P?Q?S?T?U?V?X?I?]?^?_?`acd&e9fAgHhnewh?k?i?j?p?I?27@?1*?3?@???1????-1?V7@?1*?1?^aGH?7@?1*?1?^a?7@?1*?1?B??
7@?1*?1??@@@?
7@?1*?1??@@@1?????+?4????????>?@??:	
	
@		@@




© 2015 - 2024 Weber Informatics LLC | Privacy Policy