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

com.groupbyinc.flux.script.ScriptService.class Maven / Gradle / Ivy

There is a newer version: 198
Show newest version
????4K(com/groupbyinc/flux/script/ScriptService6com/groupbyinc/flux/common/component/AbstractComponentjava/io/Closeable0com/groupbyinc/flux/cluster/ClusterStateListenerScriptService.java1com/groupbyinc/flux/script/ScriptService$CacheKey
CacheKeyCcom/groupbyinc/flux/script/ScriptService$ScriptCacheRemovalListener
ScriptCacheRemovalListener*com/groupbyinc/flux/script/ScriptService$2*com/groupbyinc/flux/script/ScriptService$14com/groupbyinc/flux/common/settings/Setting$Property+com/groupbyinc/flux/common/settings/SettingProperty4com/groupbyinc/flux/cluster/metadata/MetaData$Custom-com/groupbyinc/flux/cluster/metadata/MetaDataCustom%java/lang/invoke/MethodHandles$Lookupjava/lang/invoke/MethodHandles Lookup!DISABLE_DYNAMIC_SCRIPTING_SETTINGLjava/lang/String;script.disable_dynamic%MAX_COMPILATION_RATE_FUNCTIONLjava/util/function/Function;?Ljava/util/function/Function;>;SCRIPT_CACHE_SIZE_SETTING-Lcom/groupbyinc/flux/common/settings/Setting;BLcom/groupbyinc/flux/common/settings/Setting;SCRIPT_CACHE_EXPIRE_SETTINGZLcom/groupbyinc/flux/common/settings/Setting;SCRIPT_MAX_SIZE_IN_BYTESSCRIPT_MAX_COMPILATIONS_RATE?Lcom/groupbyinc/flux/common/settings/Setting;>;
ALLOW_NONEnone3TYPES_ALLOWED_SETTINGSLcom/groupbyinc/flux/common/settings/Setting;>;CONTEXTS_ALLOWED_SETTINGtypesAllowedLjava/util/Set;#Ljava/util/Set;contextsAllowedenginesLjava/util/Map;LLjava/util/Map;contextsPLjava/util/Map;>;cache(Lcom/groupbyinc/flux/common/cache/Cache;oLcom/groupbyinc/flux/common/cache/Cache;
scriptMetrics*Lcom/groupbyinc/flux/script/ScriptMetrics;clusterState*Lcom/groupbyinc/flux/cluster/ClusterState;rate*Lcom/groupbyinc/flux/common/collect/Tuple;jLcom/groupbyinc/flux/common/collect/Tuple;lastInlineCompileTimeJscriptsPerTimeWindowDcompilesAllowedPerNanoO(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/util/Map;Ljava/util/Map;)V1(Lcom/groupbyinc/flux/common/settings/Settings;)VPR
S(com/groupbyinc/flux/script/ScriptMetricsU()VPW
VXDE	Zjava/util/Objects\requireNonNull&(Ljava/lang/Object;)Ljava/lang/Object;^_
]`
java/util/Mapb<=	d?=	f,com/groupbyinc/flux/common/settings/Settingshget&(Ljava/lang/String;)Ljava/lang/String;jk
il"com/groupbyinc/flux/common/Stringsn	hasLength(Ljava/lang/String;)Zpq
or"java/lang/IllegalArgumentExceptiont?script.disable_dynamic is not a supported setting, replace with fine-grained script settings. 
Dynamic scripts can be enabled for all languages and all operations not using `script.disable_dynamic: false` in elasticsearch.ymlv(Ljava/lang/String;)VPx
uy5+	{exists1(Lcom/groupbyinc/flux/common/settings/Settings;)Z}~
java/util/HashSet?
?X
java/util/Set?89	?B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object;j?
?java/util/List?isEmpty()Z????java/lang/StringBuilder?
?X;must specify at least one script type or none for setting [?append-(Ljava/lang/String;)Ljava/lang/StringBuilder;??
??getKey()Ljava/lang/String;??
?].?toString??
??iterator()Ljava/util/Iterator;????java/util/Iterator?hasNext????next()Ljava/lang/Object;????java/lang/String?equals(Ljava/lang/Object;)Z??
??size()I?????cannot specify both [none] and other script types for setting [?%com/groupbyinc/flux/script/ScriptType?values*()[Lcom/groupbyinc/flux/script/ScriptType;??
??([Lcom/groupbyinc/flux/script/ScriptType;?getName??
??add????unknown script type [?] found in setting [?7+	?;9	?>must specify at least one script context or none for setting [?Bcannot specify both [none] and other script contexts for setting [?containsKey??c?unknown script context [?*+	?java/lang/Integer?intValue??
??-com/groupbyinc/flux/common/cache/CacheBuilder?builder1()Lcom/groupbyinc/flux/common/cache/CacheBuilder;??
??setMaximumWeight2(J)Lcom/groupbyinc/flux/common/cache/CacheBuilder;??
??-+	?)com/groupbyinc/flux/common/unit/TimeValue?getNanos()J??
??setExpireAfterAccess\(Lcom/groupbyinc/flux/common/unit/TimeValue;)Lcom/groupbyinc/flux/common/cache/CacheBuilder;??
??logger!Lorg/apache/logging/log4j/Logger;??	?2using script cache with max_size [{}], expire [{}]?valueOf(I)Ljava/lang/Integer;??
?org/apache/logging/log4j/Loggerdebug9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)VY(Lcom/groupbyinc/flux/script/ScriptService;Lcom/groupbyinc/flux/script/ScriptService$1;)VP
	removalListenerc(Lcom/groupbyinc/flux/common/cache/RemovalListener;)Lcom/groupbyinc/flux/common/cache/CacheBuilder;
?
build*()Lcom/groupbyinc/flux/common/cache/Cache;
?AB	java/lang/SystemnanoTime?
KL	0+	(com/groupbyinc/flux/common/collect/TuplesetMaxCompilationRate-(Lcom/groupbyinc/flux/common/collect/Tuple;)V !
"
scriptType'Lcom/groupbyinc/flux/script/ScriptType;foundZsettingTypetypesAllowedList$Ljava/util/List;Ljava/util/List;settingContextcontextsAllowedListthis*Lcom/groupbyinc/flux/script/ScriptService;settings.Lcom/groupbyinc/flux/common/settings/Settings;cacheMaxSizeIcacheBuildervLcom/groupbyinc/flux/common/cache/CacheBuilder;/Lcom/groupbyinc/flux/common/cache/CacheBuilder;cacheExpire+Lcom/groupbyinc/flux/common/unit/TimeValue; registerClusterSettingsListeners8(Lcom/groupbyinc/flux/common/settings/ClusterSettings;)V"java/lang/invoke/LambdaMetafactory;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;=>
<?@(Ljava/lang/Object;)VB#!acceptI(Lcom/groupbyinc/flux/script/ScriptService;)Ljava/util/function/Consumer;FGH3com/groupbyinc/flux/common/settings/ClusterSettingsJaddSettingsUpdateConsumerM(Lcom/groupbyinc/flux/common/settings/Setting;Ljava/util/function/Consumer;)VLM
KNclusterSettings5Lcom/groupbyinc/flux/common/settings/ClusterSettings;closejava/io/IOExceptionS()Ljava/util/Collection;?UcV5com/groupbyinc/flux/common/apache/lucene/util/IOUtilsX(Ljava/lang/Iterable;)VRZ
Y[	getEngine=(Ljava/lang/String;)Lcom/groupbyinc/flux/script/ScriptEngine;j_c_'com/groupbyinc/flux/script/ScriptEngineascript_lang not supported [c]elangscriptEngine)Lcom/groupbyinc/flux/script/ScriptEngine;HI	jv1l?
mMN	ov2q?
rnanost?
?uON	wnewRatecompilea(Lcom/groupbyinc/flux/script/Script;Lcom/groupbyinc/flux/script/ScriptContext;)Ljava/lang/Object;*com/groupbyinc/flux/script/ScriptException|java/lang/Exception~!com/groupbyinc/flux/script/Script?getType)()Lcom/groupbyinc/flux/script/ScriptType;??
??getLang??
??getIdOrCode??
??
getOptions()Ljava/util/Map;??
??STORED?%	??getScriptFromClusterStateC(Ljava/lang/String;)Lcom/groupbyinc/flux/script/StoredScriptSource;??
?-com/groupbyinc/flux/script/StoredScriptSource?
??	getSource??
??
??(com/groupbyinc/flux/script/ScriptContext?
expression?name?$	??+com/groupbyinc/flux/script/ExecutableScript?UPDATE_CONTEXT*Lcom/groupbyinc/flux/script/ScriptContext;??	??'java/lang/UnsupportedOperationException?scripts of type [?-(Ljava/lang/Object;)Ljava/lang/StringBuilder;??
??], operation [?] and lang [?] are not supported?
?y]^
?
isTypeEnabled*(Lcom/groupbyinc/flux/script/ScriptType;)Z??
?cannot execute [?	] scripts?script context [?] not supported?isContextEnabled-(Lcom/groupbyinc/flux/script/ScriptContext;)Z??
?cannot execute scripts using [?	] context?isTraceEnabled???*compiling lang: [{}] type: [{}] script: {}?traceK(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V???t(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lcom/groupbyinc/flux/script/ScriptService$1;)VP?
?&com/groupbyinc/flux/common/cache/Cache?
?_factoryClazzLjava/lang/Class;??	??java/lang/Class?cast?_
??java/lang/Object?7compiling script, type: [{}], lang: [{}], options: [{}]?checkCompilationLimit?W
?q(Ljava/lang/String;Ljava/lang/String;Lcom/groupbyinc/flux/script/ScriptContext;Ljava/util/Map;)Ljava/lang/Object;z?b?1com/groupbyinc/flux/script/GeneralScriptException?Failed to compile ?	 script [?] using lang [?*(Ljava/lang/String;Ljava/lang/Throwable;)VP?
??
onCompilation?W
V?put'(Ljava/lang/Object;Ljava/lang/Object;)V?
?java/lang/Throwablesource/Lcom/groupbyinc/flux/script/StoredScriptSource;good,Lcom/groupbyinc/flux/script/ScriptException;	exceptionLjava/lang/Exception;script#Lcom/groupbyinc/flux/script/Script;context9Lcom/groupbyinc/flux/script/ScriptContext;typeidOrCodeoptions5Ljava/util/Map;idnotSupportedcacheKey3Lcom/groupbyinc/flux/script/ScriptService$CacheKey;compiledScriptLjava/lang/Object;;com/groupbyinc/flux/common/breaker/CircuitBreakingException<[script] Too many dynamic script compilations within, max: [/]]; please use indexed, or scripts with parameters instead; this limit can be changed by the [	] setting!
ynow
timePassedisLangSupportedcontains'??(
scriptContextisAnyContextEnabled??FG	-(com/groupbyinc/flux/cluster/ClusterState/metaData1()Lcom/groupbyinc/flux/cluster/metadata/MetaData;12
03stored_scripts5customJ(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/metadata/MetaData$Custom;78
9)com/groupbyinc/flux/script/ScriptMetaData;-com/groupbyinc/flux/ResourceNotFoundException=unable to find script [?] in cluster stateA((Ljava/lang/String;[Ljava/lang/Object;)VPC
>DgetStoredScriptF?
<GscriptMetadata+Lcom/groupbyinc/flux/script/ScriptMetaData;putStoredScript?(Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/action/admin/cluster/storedscripts/PutStoredScriptRequest;Lcom/groupbyinc/flux/action/ActionListener;)V/+	M01	OMcom/groupbyinc/flux/action/admin/cluster/storedscripts/PutStoredScriptRequestQcontent3()Lcom/groupbyinc/flux/common/bytes/BytesReference;ST
RU/com/groupbyinc/flux/common/bytes/BytesReferenceWlengthY?
XZ2exceeded max allowed stored script size in bytes [\(I)Ljava/lang/StringBuilder;?^
?_
] with size [a] for script [c?
Re1()Lcom/groupbyinc/flux/script/StoredScriptSource;g
Rh&q
j3unable to put stored script with unsupported lang [lcannot put [n] script, [p] scripts are not enabledr+?
t(] script, no script contexts are enabledv
?
RxUnknown context [zjava/util/Collections|emptyMap~?
}'failed to parse/compile stored script [?
u?put-script-?(Lcom/groupbyinc/flux/script/ScriptService;Lcom/groupbyinc/flux/cluster/ack/AckedRequest;Lcom/groupbyinc/flux/action/ActionListener;Lcom/groupbyinc/flux/action/admin/cluster/storedscripts/PutStoredScriptRequest;Lcom/groupbyinc/flux/script/StoredScriptSource;)VP?
?2com/groupbyinc/flux/cluster/service/ClusterService?submitStateUpdateTaskI(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/ClusterStateTaskConfig;)V??
??-Lcom/groupbyinc/flux/script/ScriptContext<*>;clusterService4Lcom/groupbyinc/flux/cluster/service/ClusterService;requestOLcom/groupbyinc/flux/action/admin/cluster/storedscripts/PutStoredScriptRequest;listener}Lcom/groupbyinc/flux/action/ActionListener;+Lcom/groupbyinc/flux/action/ActionListener;maxdeleteStoredScript?(Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/action/admin/cluster/storedscripts/DeleteStoredScriptRequest;Lcom/groupbyinc/flux/action/ActionListener;)Vdelete-script-?Pcom/groupbyinc/flux/action/admin/cluster/storedscripts/DeleteStoredScriptRequest?
?e?(Lcom/groupbyinc/flux/script/ScriptService;Lcom/groupbyinc/flux/cluster/ack/AckedRequest;Lcom/groupbyinc/flux/action/ActionListener;Lcom/groupbyinc/flux/action/admin/cluster/storedscripts/DeleteStoredScriptRequest;)VP?
?RLcom/groupbyinc/flux/action/admin/cluster/storedscripts/DeleteStoredScriptRequest;?Lcom/groupbyinc/flux/action/ActionListener;?(Lcom/groupbyinc/flux/cluster/ClusterState;Lcom/groupbyinc/flux/action/admin/cluster/storedscripts/GetStoredScriptRequest;)Lcom/groupbyinc/flux/script/StoredScriptSource;Mcom/groupbyinc/flux/action/admin/cluster/storedscripts/GetStoredScriptRequest?
?estateOLcom/groupbyinc/flux/action/admin/cluster/storedscripts/GetStoredScriptRequest;stats*()Lcom/groupbyinc/flux/script/ScriptStats;??
V?clusterChanged4(Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;)V/com/groupbyinc/flux/cluster/ClusterChangedEvent?,()Lcom/groupbyinc/flux/cluster/ClusterState;??
??event1Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;lambda$static$0>(Ljava/lang/String;)Lcom/groupbyinc/flux/common/collect/Tuple;java/lang/NumberFormatException?(Ljava/lang/CharSequence;)Z'?
??
startsWith?q
??endsWith?q
??Pparameter must contain a positive integer and a timevalue, i.e. 10/1m, but was [?indexOf(Ljava/lang/String;)I??
??	substring(II)Ljava/lang/String;??
??(I)Ljava/lang/String;??
??parseInt??
??rate [?] must be positive?script.max_compilations_rate?parseTimeValueQ(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/unit/TimeValue;??
??time value [?seconds??
??<-] must be at least on a one minute resolution?tupleP(Ljava/lang/Object;Ljava/lang/Object;)Lcom/groupbyinc/flux/common/collect/Tuple;??
?could not parse [?] as integer in value [?	timeValuee!Ljava/lang/NumberFormatException;valueidxcounttime
access$200M(Lcom/groupbyinc/flux/script/ScriptService;)Lorg/apache/logging/log4j/Logger;x0
access$300
access$400V(Lcom/groupbyinc/flux/script/ScriptService;)Lcom/groupbyinc/flux/script/ScriptMetrics;_??
???apply()Ljava/util/function/Function;'(	script.cache.max_size	NodeScope6Lcom/groupbyinc/flux/common/settings/Setting$Property;
	
intSettingz(Ljava/lang/String;II[Lcom/groupbyinc/flux/common/settings/Setting$Property;)Lcom/groupbyinc/flux/common/settings/Setting;
script.cache.expiretimeValueMillis.(J)Lcom/groupbyinc/flux/common/unit/TimeValue;
?positiveTimeSetting?(Ljava/lang/String;Lcom/groupbyinc/flux/common/unit/TimeValue;[Lcom/groupbyinc/flux/common/settings/Setting$Property;)Lcom/groupbyinc/flux/common/settings/Setting;
script.max_size_in_bytes??y(Ljava/lang/String;I[Lcom/groupbyinc/flux/common/settings/Setting$Property;)Lcom/groupbyinc/flux/common/settings/Setting;
 75/5m"Dynamic$	%{(Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;[Lcom/groupbyinc/flux/common/settings/Setting$Property;)VP'
(script.allowed_types*	emptyList()Ljava/util/List;,-
}.java/util/function/Function0identity213listSetting?(Ljava/lang/String;Ljava/util/List;Ljava/util/function/Function;[Lcom/groupbyinc/flux/common/settings/Setting$Property;)Lcom/groupbyinc/flux/common/settings/Setting;56
7script.allowed_contexts9
ConstantValue	SignatureCodeLocalVariableTableLocalVariableTypeTableLineNumberTable
StackMapTable?(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/util/Map;Ljava/util/Map;>;)V
Exceptionsm(Lcom/groupbyinc/flux/common/collect/Tuple;)V?(Lcom/groupbyinc/flux/script/Script;Lcom/groupbyinc/flux/script/ScriptContext;)TFactoryType;(Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/action/admin/cluster/storedscripts/PutStoredScriptRequest;Lcom/groupbyinc/flux/action/ActionListener;)V	(Lcom/groupbyinc/flux/cluster/service/ClusterService;Lcom/groupbyinc/flux/action/admin/cluster/storedscripts/DeleteStoredScriptRequest;Lcom/groupbyinc/flux/action/ActionListener;)VBootstrapMethods
SourceFileInnerClasses!#$;&'(<)*+<,-+<./+<,0+<12$;45+<67+<689<:;9<:<=<>?=<@AB<CDEFGHI<JKLMNONPQ=a?*+?T*?VY?Y?[+?aW*,?a?c?e*-?a?c?g+&?m?s?
?uYw?z?*?|+???
??Y?????*????|+????:???(?uY??Y??????|??????????z???:????????:4???3?????uY??Y??????|??????????z?6??:?6	6

	?/
2:?????6*????W?	?
????2?uY??Y??˶???Ͷ??|??????????z???9*??+???
??Y?????*?????+????:???(?uY??Y??Ӷ??϶?????????z???:????????:4???3???t?uY??Y??ն??϶?????????z?-???*????W?2?uY??Y??ڶ???Ͷ??϶?????????z???g??+???޶?6??:????W??+????:??	????W*?????*?Y*?
???*??*?+????#?>?
$%?t&'??($m)+??,$??-+?./?01?<=??=~n23?i46?O78?4m)*??-*?<>??@?i45@?9?y?? ?+?7?A?Z?a?m?w?????????????????? ?#?/?2?8?=?Z?l?o????????????????????#?.?=?Z?l?o?~?????????????????????A??AiccT?icc??D????O??icc????,??3?T?icc??D????O??.??!???<B9:=F+?*?I?O?>./PQ@
?
?RW=;
*?e?W?\?>
./@
??CT]^=?6*?e+?`?bM,?%?uY??Y??d??+??f?????z?,?> 6./6g$(hi@???4?A?4b !=?6*+?k**?k?n?޶ᇵp**?k?n?޶?+?s??v?o?x?>6./6yI?6yJ@???5?<Dz{=79+?aW,?aW+??N+??:+??:+??::-??? *??:??:??:??:???6,????????6	?E	?@??Y??Y?????+???????,?????????????????*??:
*-???%?uY??Y?????-??¶????z?*?g,?????(?uY??Y??Ķ?,????ƶ????z?*,?ʚ(?uY??Y??̶?,????ζ????z?*?????*???-???Y,????:*???:?
,????*Y:
?*???:??*?????*???-??*??
,??:?D:?:??Y??Y?????-????????????f???????*?[??*??,????
ð:
?????}????01161>?4??:	
9./99
?*%$g$$!=%$S??'b?'	??hi
n?y??9
!@?-


!%,4;BIS b!l"?&?(?)?,?-01=4I5Z8n9y;~<?@?B?D?J?K?N?O?U?P?R?S?TYZ$]1^AL
?I?????c??_?1b4,?-??1?V}D;L<E?W=!??@*?eB*?*Y?p!?*?xkc?p*?p*?k?n?޶ᇗ?**?k?n?޶ᇵp*?p??*Y?pg?p?J?Y??Y????*?k?n????*?k?s?? ???????"?????#??> ?./?$L?%L@2klmo r6sHwQx^{s|?}?A?H?F&q=H+?aW*?e+???>./g$@
????=]*???*??+?ƹ)???>./$%@?A@??=]*???*??+???)???>./*?@?A@+?=O*???*?ѹ,???>./@?A@??=?m*?.?46?:?Y??Y??@??+??B??????E?,+?HN-?)?>Y??Y??@??+??B??????E?-?>*m./m$\IJA,@???;?A?E?k?A?;f
@
???hidi'	
?./???????????3dU?@
????@b???;?^?d?p????????????
??$?I?_?b?d?g?i?????A%	?^?7??Db*?B??B}D(<F??=?'+??Y?????,???????Y*,-,?????>*'./'??'??'???'??@
?&?<GF?=+?46?:?*./?G??IJ@????A?<??=2*?[???>./@???=A	*+???.?>	./	??@
?
??=#*???*???
*?Ù%?uY??Y??Ŷ?*??f?????z?*??<*??M*`??N,??6?&?uY??Y??ն??`׶????z?-ٸ?:?v	??%?uY??Y??߶?-??׶????z???㔜%?uY??Y??߶?-???????z????:?uY??Y????,????*??f???????W???>H]?H3?e?8?.??#?$H??3O??$W??$@BDE@HHIOJWM]NbO?Q?R?S?V?W?Y?Z?\A1!?D????4?-?
??????=/*???>?/@<??=/*???>?/@<??=/*?[?>?/@<?W=?	???	d?Y?
S???	??Y?
S????Y?
S?!?N?Y?#??Y?&SY?
S?)?+?/?4?Y?
S?8?|:?/?4?Y?
S?8?ϱ@6
B`ab"c5dEeKgnlqm?n?o?nHACDEA?I	J:@	!"




© 2015 - 2024 Weber Informatics LLC | Privacy Policy