public PluginUsingNode(final Settings preparedSettings, Collection<Class<? extends Plugin>> plugins) { super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), Version.CURRENT, plugins); } }
private static Environment initialSettings(boolean foreground) { Terminal terminal = foreground ? Terminal.DEFAULT : null; return InternalSettingsPreparer.prepareEnvironment(EMPTY_SETTINGS, terminal); }
public PluginAwareNode(final Settings preparedSettings, final Collection<Class<? extends Plugin>> classpathPlugins) { super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), Version.CURRENT, classpathPlugins); } }
/** * Constructs a node with the given settings. * * @param preparedSettings Base settings to configure the node with */ public Node(Settings preparedSettings) { this(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), Version.CURRENT, Collections.<Class<? extends Plugin>>emptyList()); }
PluginNode(final Settings settings) { super(InternalSettingsPreparer.prepareEnvironment(settings, null), PLUGINS); } }
PluginNode(final Settings settings) { super(InternalSettingsPreparer.prepareEnvironment(settings, null), PLUGINS); } }
protected CliTool(CliToolConfig config, Terminal terminal) { Preconditions.checkArgument(config.cmds().size() != 0, "At least one command must be configured"); this.config = config; this.terminal = terminal; env = InternalSettingsPreparer.prepareEnvironment(EMPTY_SETTINGS, terminal); settings = env.settings(); }
public static void main(String[] args) { // initialize default for es.logger.level because we will not read the logging.yml String loggerLevel = System.getProperty("es.logger.level", "INFO"); // Set the appender for all potential log files to terminal so that other components that use the logger print out the // same terminal. // The reason for this is that the plugin cli cannot be configured with a file appender because when the plugin command is // executed there is no way of knowing where the logfiles should be placed. For example, if elasticsearch // is run as service then the logs should be at /var/log/elasticsearch but when started from the tar they should be at es.home/logs. // Therefore we print to Terminal. Environment env = InternalSettingsPreparer.prepareEnvironment(Settings.builder() .put("appender.terminal.type", "terminal") .put("rootLogger", "${es.logger.level}, terminal") .put("es.logger.level", loggerLevel) .build(), Terminal.DEFAULT); // configure but do not read the logging conf file LogConfigurator.configure(env.settings(), false); int status = new PluginManagerCliParser().execute(args).status(); exit(status); }