Package org.elasticsearch.node
Class InternalSettingsPreparer
- java.lang.Object
-
- org.elasticsearch.node.InternalSettingsPreparer
-
public class InternalSettingsPreparer extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SECRET_PROMPT_VALUE
static java.lang.String
TEXT_PROMPT_VALUE
-
Constructor Summary
Constructors Constructor Description InternalSettingsPreparer()
-
Method Summary
Modifier and Type Method Description static Environment
prepareEnvironment(Settings input, Terminal terminal)
Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings, and then replacing all property placeholders.static Environment
prepareEnvironment(Settings input, Terminal terminal, java.util.Map<java.lang.String,java.lang.String> properties, java.nio.file.Path configPath)
Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings, and then replacing all property placeholders.static Settings
prepareSettings(Settings input)
Prepares the settings by gathering all elasticsearch system properties and setting defaults.
-
-
-
Field Detail
-
SECRET_PROMPT_VALUE
public static final java.lang.String SECRET_PROMPT_VALUE
- See Also:
- Constant Field Values
-
TEXT_PROMPT_VALUE
public static final java.lang.String TEXT_PROMPT_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
prepareSettings
public static Settings prepareSettings(Settings input)
Prepares the settings by gathering all elasticsearch system properties and setting defaults.
-
prepareEnvironment
public static Environment prepareEnvironment(Settings input, Terminal terminal)
Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings, and then replacing all property placeholders. If aTerminal
is provided and configuration settings are loaded, settings with a value of${prompt.text}
or${prompt.secret}
will result in a prompt for the setting to the user.- Parameters:
input
- The custom settings to use. These are not overwritten by settings in the configuration file.terminal
- the Terminal to use for input/output- Returns:
- the
Settings
andEnvironment
as aTuple
-
prepareEnvironment
public static Environment prepareEnvironment(Settings input, Terminal terminal, java.util.Map<java.lang.String,java.lang.String> properties, java.nio.file.Path configPath)
Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings, and then replacing all property placeholders. If aTerminal
is provided and configuration settings are loaded, settings with a value of${prompt.text}
or${prompt.secret}
will result in a prompt for the setting to the user.- Parameters:
input
- the custom settings to use; these are not overwritten by settings in the configuration fileterminal
- the Terminal to use for input/outputproperties
- map of properties key/value pairs (usually from the command-line)configPath
- path to config directory; (use null to indicate the default)- Returns:
- the
Settings
andEnvironment
as aTuple
-
-