Adds a new constructor to plugin
The new constructor takes an Environment object. This is needed for migration to X-Pack since the environment instance is built by the XPackPlugin and then passed into the feature plugins. Original commit: elastic/x-pack-elasticsearch@f25225bc6a
This commit is contained in:
parent
4b366f8ef6
commit
716f543f7b
|
@ -141,9 +141,13 @@ public class MlPlugin extends Plugin implements ActionPlugin {
|
|||
private boolean enabled;
|
||||
|
||||
public MlPlugin(Settings settings) {
|
||||
this(settings, new Environment(settings));
|
||||
}
|
||||
|
||||
public MlPlugin(Settings settings, Environment env) {
|
||||
this.enabled = ML_ENABLED.get(settings);
|
||||
this.settings = settings;
|
||||
this.env = new Environment(settings);
|
||||
this.env = env;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue