com.groupbyinc.flux.plugins.PluginsService.class Maven / Gradle / Ivy
???? 4 *com/groupbyinc/flux/plugins/PluginsService 6com/groupbyinc/flux/common/component/AbstractComponent PluginsService.java 1com/groupbyinc/flux/plugins/PluginsService$Bundle Bundle 4com/groupbyinc/flux/common/settings/Settings$Builder ,com/groupbyinc/flux/common/settings/Settings Builder 4com/groupbyinc/flux/common/settings/Setting$Property +com/groupbyinc/flux/common/settings/Setting Property %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup
configPath Ljava/nio/file/Path; plugins Ljava/util/List; ?Ljava/util/List;>; info FLcom/groupbyinc/flux/action/admin/cluster/node/info/PluginsAndModules; MANDATORY_SETTING -Lcom/groupbyinc/flux/common/settings/Setting; SLcom/groupbyinc/flux/common/settings/Setting;>; $assertionsDisabled Z getPluginSettings ()Ljava/util/List; & java/util/List ( stream ()Ljava/util/stream/Stream; * + ) , "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; 0 1
/ 2 3 &(Ljava/lang/Object;)Ljava/lang/Object; 5 lambda$getPluginSettings$0 E(Lcom/groupbyinc/flux/common/collect/Tuple;)Ljava/util/stream/Stream; 7 8
9 : 8 apply ()Ljava/util/function/Function; = > ? java/util/stream/Stream A flatMap 8(Ljava/util/function/Function;)Ljava/util/stream/Stream; C D B E java/util/stream/Collectors G toList ()Ljava/util/stream/Collector; I J
H K collect 0(Ljava/util/stream/Collector;)Ljava/lang/Object; M N B O this ,Lcom/groupbyinc/flux/plugins/PluginsService; getPluginSettingsFilter lambda$getPluginSettingsFilter$1 T 8
U V ? ?(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/nio/file/Path;Ljava/nio/file/Path;Ljava/nio/file/Path;Ljava/util/Collection;)V java/io/IOException [ 1(Lcom/groupbyinc/flux/common/settings/Settings;)V Y ]
^ ` java/util/ArrayList b ()V Y d
c e java/util/Collection g iterator ()Ljava/util/Iterator; i j h k java/nio/file/Path m java/util/Iterator o hasNext ()Z q r p s next ()Ljava/lang/Object; u v p w java/lang/Class y
loadPlugin y(Ljava/lang/Class;Lcom/groupbyinc/flux/common/settings/Settings;Ljava/nio/file/Path;)Lcom/groupbyinc/flux/plugins/Plugin; { |
} &com/groupbyinc/flux/plugins/PluginInfo getName ()Ljava/lang/String; ? ?
z ? classpath plugin ? NA ? M(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ)V Y ?
? ? logger !Lorg/apache/logging/log4j/Logger; ? ? ? org/apache/logging/log4j/Logger ? isTraceEnabled ? r ? ? !plugin loaded from classpath [{}] ? trace '(Ljava/lang/String;Ljava/lang/Object;)V ? ? ? ? "com/groupbyinc/flux/plugins/Plugin ? (com/groupbyinc/flux/common/collect/Tuple ? '(Ljava/lang/Object;Ljava/lang/Object;)V Y ?
? ? add (Ljava/lang/Object;)Z ? ? ) ? java/util/LinkedHashSet ?
? e getModuleBundles %(Ljava/nio/file/Path;)Ljava/util/Set; ? ?
?
java/util/Set ? ? k plugin (Lcom/groupbyinc/flux/plugins/PluginInfo; ? ? ? addAll (Ljava/util/Collection;)Z ? ? ? ? java/lang/IllegalStateException ? Unable to initialize modules ? *(Ljava/lang/String;Ljava/lang/Throwable;)V Y ?
? ? getPluginBundles ? ?
? Unable to initialize plugins ? loadBundles !(Ljava/util/Set;)Ljava/util/List; ? ?
? ) ? Dcom/groupbyinc/flux/action/admin/cluster/node/info/PluginsAndModules ? #(Ljava/util/List;Ljava/util/List;)V Y ?
? ? ? java/util/Collections ? unmodifiableList "(Ljava/util/List;)Ljava/util/List; ? ?
? ? java/util/HashSet ?
? e ) k v1 ? v
? ?
? ? ? ? ? get B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object; ? ?
? isEmpty ? r ) ? java/lang/String ? contains ? ? ? ? ? ? *com/groupbyinc/flux/ElasticsearchException ? java/lang/StringBuilder ?
? e Missing mandatory plugins [ ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? , ? "com/groupbyinc/flux/common/Strings ? collectionToDelimitedString :(Ljava/lang/Iterable;Ljava/lang/String;)Ljava/lang/String; ? ?
? ? ] toString ?
? java/lang/Object ((Ljava/lang/String;[Ljava/lang/Object;)V Y
? getModuleInfos %
? module
logPluginInfo F(Ljava/util/List;Ljava/lang/String;Lorg/apache/logging/log4j/Logger;)V
getPluginInfos %
? ? $Lcom/groupbyinc/flux/plugins/Plugin;
pluginInfo pluginClass 8Ljava/lang/Class<+Lcom/groupbyinc/flux/plugins/Plugin;>; Ljava/lang/Class; bundle 3Lcom/groupbyinc/flux/plugins/PluginsService$Bundle; modules DLjava/util/Set; Ljava/util/Set; ex Ljava/io/IOException; tuple xLcom/groupbyinc/flux/common/collect/Tuple; *Lcom/groupbyinc/flux/common/collect/Tuple; mandatoryPlugin Ljava/lang/String; missingPlugins #Ljava/util/Set; settings .Lcom/groupbyinc/flux/common/settings/Settings; modulesDirectory pluginsDirectory classpathPlugins PLjava/util/Collection;>; Ljava/util/Collection;
pluginsLoaded pluginsList :Ljava/util/List; seenBundles modulesList loaded pluginsNames mandatoryPlugins $Ljava/util/List; " # ; java/lang/AssertionError=
> e no @ s loadedB (Ljava/lang/String;)V D ?E ? <(Lcom/groupbyinc/flux/plugins/PluginInfo;)Ljava/lang/String;H ? mapK D BL sortedN + BO loaded Q [S name pluginInfos type updatedSettings 0()Lcom/groupbyinc/flux/common/settings/Settings; java/util/HashMapZ
[ e builder 8()Lcom/groupbyinc/flux/common/settings/Settings$Builder;]^
_
java/util/Mapa v2c v
?d additionalSettingsfY
?g getAsMap ()Ljava/util/Map;ij
k keySet ()Ljava/util/Set;mnbo put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;qrbs "java/lang/IllegalArgumentExceptionu Cannot have additional setting [w
] in plugin [y ], already added in plugin [{ YD
v} f(Lcom/groupbyinc/flux/common/settings/Settings;)Lcom/groupbyinc/flux/common/settings/Settings$Builder;q
?+, ? build?Y
? oldPlugin setting
foundSettings 5Ljava/util/Map; Ljava/util/Map; 6Lcom/groupbyinc/flux/common/settings/Settings$Builder; createGuiceModules ()Ljava/util/Collection;??
?? ; getExecutorBuilders @(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/util/List;??
??
c ? builders JLjava/util/ArrayList;>; Ljava/util/ArrayList; getGuiceServiceClasses??
?? services _Ljava/util/List;>;
onIndexModule *(Lcom/groupbyinc/flux/index/IndexModule;)V??
?? indexModule 'Lcom/groupbyinc/flux/index/IndexModule; H()Lcom/groupbyinc/flux/action/admin/cluster/node/info/PluginsAndModules; java/lang/Throwable? java/nio/file/LinkOption? java/nio/file/Files? notExists 2(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z??
?? emptySet?n
?? newDirectoryStream 5(Ljava/nio/file/Path;)Ljava/nio/file/DirectoryStream;??
?? java/nio/file/DirectoryStream?? k readFromProperties >(Ljava/nio/file/Path;)Lcom/groupbyinc/flux/plugins/PluginInfo;??
?? *.jar? G(Ljava/nio/file/Path;Ljava/lang/String;)Ljava/nio/file/DirectoryStream;??
??
toRealPath 1([Ljava/nio/file/LinkOption;)Ljava/nio/file/Path;?? n? toUri ()Ljava/net/URI;?? n? java/net/URI? toURL ()Ljava/net/URL;??
?? duplicate codebase: ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ??
??
?} close? d??
addSuppressed (Ljava/lang/Throwable;)V??
?? :(Lcom/groupbyinc/flux/plugins/PluginInfo;Ljava/util/Set;)V Y?
? duplicate module: ? url Ljava/net/URL; jar jarStream 5Ljava/nio/file/DirectoryStream; Ljava/nio/file/DirectoryStream; urls Ljava/util/Set; bundles checkForFailedPluginRemovals (Ljava/nio/file/Path;)V .removing-*? getFileName ()Ljava/nio/file/Path;?? n? n -? indexOf (Ljava/lang/String;)I??
?? substring (I)Ljava/lang/String;??
?? java/util/Locale? ROOT Ljava/util/Locale; kfound file [%s] from a failed attempt to remove the plugin [%s]; execute [elasticsearch-plugin remove %2$s] format K(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
? removing fileName message *Ljava/util/Iterator; Ljava/util/Iterator; *com/groupbyinc/flux/common/logging/Loggers getLogger 4(Ljava/lang/Class;)Lorg/apache/logging/log4j/Logger;
-com/groupbyinc/flux/common/io/FileSystemUtils isAccessibleDirectory 8(Ljava/nio/file/Path;Lorg/apache/logging/log4j/Logger;)Z
??
--- adding plugin [{}] toAbsolutePath ? n! 6Could not load plugin descriptor for existing plugin [# #]. Was the plugin built before 2.0?% duplicate plugin: ' e java/lang/Exception* %com/groupbyinc/flux/bootstrap/JarHell, parseClassPath.n
-/ (Ljava/util/Collection;)V Y1
?2?! 4 retainAll6 ? ?7 7jar hell! duplicate codebases between plugin and core: 9 checkJarHell (Ljava/util/Set;)V;<
-= failed to load plugin ? due to jar hellA java/net/URLC toArray (([Ljava/lang/Object;)[Ljava/lang/Object;EF ?G [Ljava/net/URL;I getClass ()Ljava/lang/Class;KL
M getClassLoader ()Ljava/lang/ClassLoader;OP
zQ java/net/URLClassLoaderS newInstance A([Ljava/net/URL;Ljava/lang/ClassLoader;)Ljava/net/URLClassLoader;UV
TW reloadLuceneSPI (Ljava/lang/ClassLoader;)VYZ
[ getClassname] ?
?^ loadPluginClass <(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/Class;`a
b classpath intersection union Ljava/lang/Exception; loader Ljava/lang/ClassLoader; >com/groupbyinc/flux/common/apache/lucene/codecs/PostingsFormatj reloadPostingsFormatslZ
km ?com/groupbyinc/flux/common/apache/lucene/codecs/DocValuesFormato reloadDocValuesFormatsqZ
pr 5com/groupbyinc/flux/common/apache/lucene/codecs/Codect reloadCodecsvZ
uw Hcom/groupbyinc/flux/common/apache/lucene/analysis/util/CharFilterFactoryy reloadCharFilters{Z
z| Icom/groupbyinc/flux/common/apache/lucene/analysis/util/TokenFilterFactory~ reloadTokenFilters?Z
? Gcom/groupbyinc/flux/common/apache/lucene/analysis/util/TokenizerFactory? reloadTokenizers?Z
?? java/lang/ClassNotFoundException? java/lang/ClassLoader? loadClass %(Ljava/lang/String;)Ljava/lang/Class;??
??
asSubclass $(Ljava/lang/Class;)Ljava/lang/Class;??
z? Could not find plugin class [? =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V Y?
?? "Ljava/lang/ClassNotFoundException; className &java/lang/ReflectiveOperationException? getConstructors "()[Ljava/lang/reflect/Constructor;??
z? no public constructor for [? [Ljava/lang/reflect/Constructor;? "no unique public constructor for [? java/lang/reflect/Constructor? getParameterCount ()I??
?? signatureMessage %(Ljava/lang/Class;)Ljava/lang/String;??
? getParameterTypes ()[Ljava/lang/Class;??
?? '([Ljava/lang/Object;)Ljava/lang/Object;U?
?? [Ljava/lang/Class;? failed to load plugin class [? (Ljava/lang/ReflectiveOperationException; constructors #[Ljava/lang/reflect/Constructor<*>; constructor "Ljava/lang/reflect/Constructor<*>; Ljava/lang/reflect/Constructor; parameterTypes Pno public constructor of correct signature for [%s]; must be [%s], [%s], or [%s]? ?(org.elasticsearch.common.settings.Settings,java.nio.file.Path)? ,(org.elasticsearch.common.settings.Settings)? ()? clazz
filterPlugins #(Ljava/lang/Class;)Ljava/util/List; ? lambda$filterPlugins$2 >(Ljava/lang/Class;Lcom/groupbyinc/flux/common/collect/Tuple;)Z??
?? -(Lcom/groupbyinc/flux/common/collect/Tuple;)Z? test 1(Ljava/lang/Class;)Ljava/util/function/Predicate;?? ? filter 9(Ljava/util/function/Predicate;)Ljava/util/stream/Stream;?? B? lambda$filterPlugins$3 >(Lcom/groupbyinc/flux/common/collect/Tuple;)Ljava/lang/Object;??
??? ? Ljava/lang/Class; p isAssignableFrom (Ljava/lang/Class;)Z??
z? x getSettingsFilter? %
?? getSettings? %
?? desiredAssertionStatus? r
z? plugin.mandatory? emptyList? %
?? java/util/function/Function? identity? >?? NodeScope 6Lcom/groupbyinc/flux/common/settings/Setting$Property; listSetting ?(Ljava/lang/String;Ljava/util/List;Ljava/util/function/Function;[Lcom/groupbyinc/flux/common/settings/Setting$Property;)Lcom/groupbyinc/flux/common/settings/Setting;
Signature Code LocalVariableTable LineNumberTable D()Ljava/util/List;>; &()Ljava/util/List; LocalVariableTypeTable
StackMapTable ?(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/nio/file/Path;Ljava/nio/file/Path;Ljava/nio/file/Path;Ljava/util/Collection;>;)V p(Ljava/util/List;Ljava/lang/String;Lorg/apache/logging/log4j/Logger;)V D()Ljava/util/Collection; u(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/util/List;>; g()Ljava/util/Collection;>;
Exceptions Z(Ljava/nio/file/Path;)Ljava/util/Set; ?(Ljava/util/Set;)Ljava/util/List;>; c(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/Class<+Lcom/groupbyinc/flux/plugins/Plugin;>; ?(Ljava/lang/Class<+Lcom/groupbyinc/flux/plugins/Plugin;>;Lcom/groupbyinc/flux/common/settings/Settings;Ljava/nio/file/Path;)Lcom/groupbyinc/flux/plugins/Plugin; L(Ljava/lang/Class<+Lcom/groupbyinc/flux/plugins/Plugin;>;)Ljava/lang/String; C(Ljava/lang/Class;)Ljava/util/List; BootstrapMethods
SourceFile InnerClasses ! ! " # $ % I *? '? - ? @ ? F ? L? P ? )?
Q R Q S % I *? '? - ? X ? F ? L? P ? )?
Q R U
Y Z ? x*+? _*,? a? cY? f:? cY? f:? l :? t ? k? x ? z: * +,? ~:
? ?Y ? ??? ? ?? ?:*? ?? ? ? *? ??? ? ? ?Y
? ?? ? W? ? W???? ?Y? ?:? cY? f: -? S-? ?:
? ? :? t ? ? x ? : ? ?? ? W???
? ? W? :
? ?Y?
? ??? T? ?:
? ? :? t ? ? x ? :? ?? ? W???
? ? W? :
? ?Y?
? ??*? ?:
? ? W*? ?Y ? ͵ ?*? յ '? ?Y? ?:*? '? ? :? t ? %? x ? ?:
? ?? ?? ݹ ? W??ײ ?+? ?? ):? ? ? ?? ?Y? ?:
? ? :? t ? 4? x ? ?:? ? ?
? ? ?
? ? W???
? ? ? .? ?Y? ?Y? ??? ?
?? ? ?? ????
?*? ϶
*? ??*? ϶*? ??? ? ? ? \BE \
? E O ?
^ 6 ? ; Y ?
? 9!
? "#
(
9 !
G "#
? $&