Package org.elasticsearch.env
Class Environment
java.lang.Object
org.elasticsearch.env.Environment
The environment of where things exists.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsConstructorDescriptionEnvironment(Settings settings, Path configPath)Environment(Settings settings, Path configPath, boolean nodeLocalStorage) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertEquivalent(Environment actual, Environment expected)asserts that the two environments are equivalent for all things the environment cares about (i.e., all but the setting object which may contain different setting)binFile()The config directory.Path[]The data location.static booleandataPathUsesList(Settings settings)Returns true if the data path is a list, false otherwisestatic FileStoregetFileStore(Path path)static longgetUsableSpace(Path path)libFile()logsFile()pidFile()The PID file location (can be null if no PID file is configured)Path[]The shared filesystem repo locations.resolveRepoFile(String location)Resolves the specified location against the list of configured repository roots If the specified location doesn't match any of the roots, returns null.resolveRepoURL(URL url)Checks if the specified URL is pointing to the local file system and if it does, resolves the specified url against the list of configured repository roots If the specified url doesn't match any of the roots, returns null.settings()The settings used to build this environment.The shared data locationtmpFile()Path to the default temp directory used by the JDKvoidEnsure the configured temp directory is a valid directory
-
Field Details
-
PATH_HOME_SETTING
-
PATH_DATA_SETTING
-
PATH_LOGS_SETTING
-
PATH_REPO_SETTING
-
PATH_SHARED_DATA_SETTING
-
PIDFILE_SETTING
-
NODE_PIDFILE_SETTING
-
-
Constructor Details
-
Environment
-
Environment
-
-
Method Details
-
settings
The settings used to build this environment. -
dataFiles
The data location. -
repoFiles
The shared filesystem repo locations. -
resolveRepoFile
Resolves the specified location against the list of configured repository roots If the specified location doesn't match any of the roots, returns null. -
resolveRepoURL
Checks if the specified URL is pointing to the local file system and if it does, resolves the specified url against the list of configured repository roots If the specified url doesn't match any of the roots, returns null. -
configFile
The config directory. -
pluginsFile
-
binFile
-
libFile
-
modulesFile
-
logsFile
-
pidFile
The PID file location (can be null if no PID file is configured) -
tmpFile
Path to the default temp directory used by the JDK -
validateTmpFile
Ensure the configured temp directory is a valid directory- Throws:
IOException
-
dataPathUsesList
Returns true if the data path is a list, false otherwise -
getFileStore
- Throws:
IOException
-
getUsableSpace
- Throws:
IOException
-
assertEquivalent
asserts that the two environments are equivalent for all things the environment cares about (i.e., all but the setting object which may contain different setting)
-