public PluginConfigurableNode(Settings preparedSettings, Collection<Class<? extends Plugin>> classpathPlugins) { super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), classpathPlugins); } }
public ElasticsearchNode(Settings preparedSettings, Collection<Class<? extends Plugin>> classpathPlugins) { super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), classpathPlugins); } }
public TestNode(Settings preparedSettings, Collection<Class<? extends Plugin>> classpathPlugins) { super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), classpathPlugins); } }
public TestNode(Settings preparedSettings, Collection<Class<? extends Plugin>> classpathPlugins) { super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), classpathPlugins); } }
@SafeVarargs public PluginAwareNode(boolean masterEligible, final Settings preparedSettings, final Class<? extends Plugin>... plugins) { super(InternalSettingsPreparer.prepareEnvironment(checkAndAddNodeName(preparedSettings), null), Arrays.asList(plugins), true); this.masterEligible = masterEligible; }
/** * 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)); }
public MyNode(Settings preparedSettings, Collection<Class<? extends Plugin>> classpathPlugins) { super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), classpathPlugins); } }
/** * Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings, * and then replacing all property placeholders. If a {@link Terminal} is provided and configuration settings are loaded, * settings with a value of <code>${prompt.text}</code> or <code>${prompt.secret}</code> will result in a prompt for * the setting to the user. * @param input The custom settings to use. These are not overwritten by settings in the configuration file. * @param terminal the Terminal to use for input/output * @return the {@link Settings} and {@link Environment} as a {@link Tuple} */ public static Environment prepareEnvironment(Settings input, Terminal terminal) { return prepareEnvironment(input, terminal, Collections.emptyMap(), null); }
private TestNode(Settings preparedSettings, Collection<Class<? extends Plugin>> classpathPlugins) { super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), classpathPlugins); }
/** Create an {@link Environment} for the command to use. Overrideable for tests. */ protected Environment createEnv(final Terminal terminal, final Map<String, String> settings) throws UserException { final String esPathConf = System.getProperty("es.path.conf"); if (esPathConf == null) { throw new UserException(ExitCodes.CONFIG, "the system property [es.path.conf] must be set"); } return InternalSettingsPreparer.prepareEnvironment(Settings.EMPTY, terminal, settings, getConfigPath(esPathConf)); }
private static Environment createEnvironment( final boolean foreground, final Path pidFile, final SecureSettings secureSettings, final Settings initialSettings, final Path configPath) { Terminal terminal = foreground ? Terminal.DEFAULT : null; Settings.Builder builder = Settings.builder(); if (pidFile != null) { builder.put(Environment.PIDFILE_SETTING.getKey(), pidFile); } builder.put(initialSettings); if (secureSettings != null) { builder.setSecureSettings(secureSettings); } return InternalSettingsPreparer.prepareEnvironment(builder.build(), terminal, Collections.emptyMap(), configPath); }
public ClusterRunnerNode(final Settings preparedSettings, final Collection<Class<? extends Plugin>> classpathPlugins) { this(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), 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)); }
private LocalNode(Settings settings, Collection<Class<? extends Plugin>> classpathPlugins) { super(InternalSettingsPreparer.prepareEnvironment(settings, null), 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)); }
/** * Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings, * and then replacing all property placeholders. If a {@link Terminal} is provided and configuration settings are loaded, * settings with a value of <code>${prompt.text}</code> or <code>${prompt.secret}</code> will result in a prompt for * the setting to the user. * @param input The custom settings to use. These are not overwritten by settings in the configuration file. * @param terminal the Terminal to use for input/output * @return the {@link Settings} and {@link Environment} as a {@link Tuple} */ public static Environment prepareEnvironment(Settings input, Terminal terminal) { return prepareEnvironment(input, terminal, Collections.emptyMap()); }
private LocalNode(Settings settings, Collection<Class<? extends Plugin>> classpathPlugins) { super(InternalSettingsPreparer.prepareEnvironment(settings, null), classpathPlugins); } }
private LocalNode(Settings settings, Collection<Class<? extends Plugin>> classpathPlugins) { super(InternalSettingsPreparer.prepareEnvironment(settings, null), classpathPlugins); } }
/** Create an {@link Environment} for the command to use. Overrideable for tests. */ protected Environment createEnv(final Terminal terminal, final Map<String, String> settings) throws UserException { final String esPathConf = System.getProperty("es.path.conf"); if (esPathConf == null) { throw new UserException(ExitCodes.CONFIG, "the system property [es.path.conf] must be set"); } return InternalSettingsPreparer.prepareEnvironment(Settings.EMPTY, terminal, settings, getConfigPath(esPathConf)); }
@SafeVarargs public PluginAwareNode(final Settings preparedSettings, final Class<? extends Plugin>... plugins) { super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), Arrays.asList(plugins), true); }