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=version()J?@
7AversionType)()Lcom/groupbyinc/flux/index/VersionType;CD
7E-com/groupbyinc/flux/index/get/ShardGetServiceGgetForUpdatew(Ljava/lang/String;Ljava/lang/String;JLcom/groupbyinc/flux/index/VersionType;)Lcom/groupbyinc/flux/index/get/GetResult;IJ
HKshardId+()Lcom/groupbyinc/flux/index/shard/ShardId;MN
1O?(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;.Q
Rrequest1Lcom/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/GetResult\isExists()Z^_
]`
prepareUpsertbQ
cinternalSourceRef3()Lcom/groupbyinc/flux/common/bytes/BytesReference;ef
]g?com/groupbyinc/flux/index/engine/DocumentSourceMissingExceptioniP(Lcom/groupbyinc/flux/index/shard/ShardId;Ljava/lang/String;Ljava/lang/String;)V#k
jlscript%()Lcom/groupbyinc/flux/script/Script;no
7pdoc1()Lcom/groupbyinc/flux/action/index/IndexRequest;rs
7t
detectNoopv_
7wprepareUpdateIndexRequest?(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;yz
{prepareUpdateScriptRequest}Q
~)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?@??java/lang/Long?valueOf(J)Ljava/lang/Long;??
??
executeScriptC(Lcom/groupbyinc/flux/script/Script;Ljava/util/Map;)Ljava/util/Map;??
?get&(Ljava/lang/Object;)Ljava/lang/Object;????java/lang/String?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?s
7?docAsUpsert?_
7?9com/groupbyinc/flux/index/engine/DocumentMissingException?
?lscriptedUpsert?_
7?n?	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/UpdateResponse?getType9
]getId9
]
getVersion@
]NOOP4Lcom/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/IllegalArgumentExceptionjava/lang/StringBuilder ()V#"
!#unknown upsert operation, got: %append-(Ljava/lang/String;)Ljava/lang/StringBuilder;'(
!)-(Ljava/lang/Object;)Ljava/lang/StringBuilder;'+
!,
!?(Ljava/lang/String;)V#/
0index29
73W(Ljava/lang/String;)Lcom/groupbyinc/flux/action/support/replication/ReplicationRequest;25
?6C(Ljava/lang/String;)Lcom/groupbyinc/flux/action/index/IndexRequest;88
?9<8
?;getRefreshPolicyA()Lcom/groupbyinc/flux/action/support/WriteRequest$RefreshPolicy;=>
7?setRefreshPolicy?(Lcom/groupbyinc/flux/action/support/WriteRequest$RefreshPolicy;)Lcom/groupbyinc/flux/action/support/replication/ReplicatedWriteRequest;AB
?CroutingE9
7FE8
?HparentJ9
7KJ8
?Mtimeout-()Lcom/groupbyinc/flux/common/unit/TimeValue;OP
7Qp(Lcom/groupbyinc/flux/common/unit/TimeValue;)Lcom/groupbyinc/flux/action/support/replication/ReplicationRequest;OS
?TwaitForActiveShards7()Lcom/groupbyinc/flux/action/support/ActiveShardCount;VW
7Xz(Lcom/groupbyinc/flux/action/support/ActiveShardCount;)Lcom/groupbyinc/flux/action/support/replication/ReplicationRequest;VZ
?[create2(Z)Lcom/groupbyinc/flux/action/index/IndexRequest;]^
?_%com/groupbyinc/flux/index/VersionTypeaINTERNAL'Lcom/groupbyinc/flux/index/VersionType;cd	be2(J)Lcom/groupbyinc/flux/action/index/IndexRequest;?g
?hX(Lcom/groupbyinc/flux/index/VersionType;)Lcom/groupbyinc/flux/action/index/IndexRequest;Cj
?kCREATEDm	nupdate2Lcom/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!"	xFORCEzd	b{java/lang/AssertionError}
~#calculateRoutingl(Lcom/groupbyinc/flux/index/get/GetResult;Lcom/groupbyinc/flux/action/index/IndexRequest;)Ljava/lang/String;%Lcom/groupbyinc/flux/common/Nullable;
?F	getFields??
]?_routing?containsKey(Ljava/lang/Object;)Z????fieldG(Ljava/lang/String;)Lcom/groupbyinc/flux/common/document/DocumentField;??
]?1com/groupbyinc/flux/common/document/DocumentField?getValue??
??java/lang/Object?
??updateIndexRequestcalculateParent
?K_parent?vw
???
???
?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p?
??'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?u8
??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
]?_type?_id?_version?
deleteRequestE(Ljava/lang/String;)Lcom/groupbyinc/flux/action/delete/DeleteRequest;??
??/com/groupbyinc/flux/action/delete/DeleteRequest?8?
??<?
??E?
??J?
??4(J)Lcom/groupbyinc/flux/action/delete/DeleteRequest;??
??Z(Lcom/groupbyinc/flux/index/VersionType;)Lcom/groupbyinc/flux/action/delete/DeleteRequest;C?
??
?[
?T
?CDELETED?	?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;
7fetchSource@()Lcom/groupbyinc/flux/search/fetch/subphase/FetchSourceContext;
7 ?
?@java/util/ListBaddD?CEincludesG
#HexcludesJ
#KfilterR(Lcom/groupbyinc/flux/search/fetch/subphase/FetchSourceContext;)Ljava/lang/Object;MN
'OlengthQ?
.Rjava/lang/MathTmin(II)IVW
UX6com/groupbyinc/flux/common/io/stream/BytesStreamOutputZ
[?3com/groupbyinc/flux/common/xcontent/XContentBuilder]xContent0()Lcom/groupbyinc/flux/common/xcontent/XContent;_`
aG(Lcom/groupbyinc/flux/common/xcontent/XContent;Ljava/io/OutputStream;)V#c
^dvalueI(Ljava/lang/Object;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;fg
^hbytesh(Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;)Lcom/groupbyinc/flux/common/bytes/BytesReference;jk
.lclosen"
^o
addSuppressed(Ljava/lang/Throwable;)Vqr
s*com/groupbyinc/flux/ElasticsearchExceptionuError filtering sourcew=(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V#y
vz{(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JZLcom/groupbyinc/flux/common/bytes/BytesReference;Ljava/util/Map;)V#|
]}
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?_
??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*+?'*,?)?? *+,- ?AB
C./??&,?5+?;+?>+?B+?F?L:*,?P+-?S??4&*+&TU&VW&XY
Z[?IJIK.Q??M-?a?
*+,-?d?-?h??jY+,?;,?>?m?,?q?,?u?*+,-,?x?|?*+,-???4M*+MM?MTUMZ[MXY?TVWY)Z7\C_??????+??:??Y??:???????W???W?-??????W*,??:?????*??,????:?????:???!?ť*???,??????:??Y?Ұ?R?*+????n??XY??????a@??o2??????????2hik l,m?nHpaqosu?v?y?!??????????bQ?[	],???,????Y+,?;,?>??,??
,?u?,??:,???,?q??,??:*,????:???????.?d-??????W?Z?Y+-?-?-?	?
?:-??Y?
????????Y?!Y?$&?*??-?.?1?,?4?7??,?;?:,?>?<,?@?D??,?G?I,?L?N,?R?U??,?Y?\???`W,?F?f?,?B?i,?F?lW?Y?o???\	?pqG???U?rt]*+]M?]TU]Z[]XY3*u??U?rs?V???3?A?G?U????????????????????/?3?=?N??
C??N???6??evw?v,*?F?f? ?y?*?F?|??~Y??*?B?+?	??,TU,Z[??
?"?'??"???}/+?+???+???*??????*??????????/Z[/???????-?????	????}/+?+???+???*??????*??????????/Z[/???????-?????	?yz?X,-??7,?u:-??:-??:	-?h??:

???:
????:??????6
?K
?F?Y+-?-?-?	?
?:,,?4-?	-?h????Y?
??,?4??,?;?:,?>?<?I	?N???i,?F?l,?Y?\??,?R?U??,?@?D??:?Y??????t*pq???*+M?TUZ[v"???
????E??J?	'??t
1??;???Q??"
?'???
;????V??
???'?1?;?Q?[?i?t????????????????????/?N?7]?????@?N}Q?*,-??7,?u:-??:-??:	-?h??:

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

??ɶ???W
?-?ι?W
?-???W
?-???W
?-?	????W
???W
?	??W
???W
???????W*,??
??:

?????*??,?????:
?????:????.??},?4??,?;?:,?>?<?I	?N???i,?F?l,?Y?\??,?R?U??,?@?D??:?Y????,?4??,?;??,?>????	????,?F??,?Y????,?R????,?@????:?Y?????Y+-?-?-?	?
?:,,?4-?	-?h????Y?
????zu????*pq**+*M?*TU*Z[*XY#??
??E?
J?	'?t
1??;???F???
?3??%???*'??
;???F???
%????&??
???'?1?;?FVet??????
??(0K[oz?????? ?!"#"$?:?(?7]?????????b?[????G*?)?1*?)+?????N-+???:,??
W?N?Y-??,?58??>"9G*+Gn?G???G???&	+,-".-/538192E4?5B???	????
?*??*???*?!?
*?!?%???'Y?(:?,6:	*???*????*?:

?66?|
2:

??3?	6?_
?7:?Q	?
??Y??:		
????:?"??Y
?9Y?:?=:	
??W?A?FW????:
*?!??*?!?%??6*?!?I??*?!?L???*?!?P:?S?Y6?[Y?\:
?^Y?b
?e::?iW?m:
??p?C:?t?7?p?/::?:??p?:?t??p??:?vYx???{??]Y+*?;*?> ?
?	?~?MRU9Hi9Hry~?itr?????1?|Sf?cl??
6_??z??&o??
???f??TU??????????????+???5??"8??	????
????8??	??)>? @"B+C2D5E8FGGcHmIpJsL|M?N?O?Q?R?S?T?V?G?[?\?]?^_ab&c9dAeHficrf?i?g?h?n?o?n?I?27??.'?0?????1????-.?Q7??.'?.?[^GH?7??.'?.?[^?7??.'?.?B??
7??.'?.??????
7??.'?.?????.?????"?4?????y??=?@??:	
	
@		@@




© 2015 - 2024 Weber Informatics LLC | Privacy Policy