Package org.elasticsearch.env
Class Environment
java.lang.Object
org.elasticsearch.env.Environment
The environment of where things exists.
-
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
ConstructorDescriptionEnvironment(Settings settings, Path configPath)
Environment(Settings settings, Path configPath, boolean nodeLocalStorage)
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertEquivalent(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 boolean
dataPathUsesList(Settings settings)
Returns true if the data path is a list, false otherwisestatic FileStore
getFileStore(Path path)
static long
getUsableSpace(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 JDKvoid
Ensure 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)
-