Package com.netflix.genie.agent.utils
Class PathUtils
java.lang.Object
com.netflix.genie.agent.utils.PathUtils
Utilities to compose filesystem paths.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic Path
composePath
(File baseDirectory, String... children) Append an arbitrary set of components to a base path.static Path
composePath
(Path baseDirectory, String... children) Append an arbitrary set of components to a base path.static Path
jobAgentLogFilePath
(File jobDirectory) Compose the path to the agent log file for a job (after it has been relocated inside the job directory).static Path
jobApplicationDirectoryPath
(File jobDirectory, String appId) Compose the path to an application directory inside a job directory.static Path
jobApplicationsDirectoryPath
(File jobDirectory) Compose the path to the applications directory inside a job directory.static Path
jobClusterDirectoryPath
(File jobDirectory, String clusterId) Compose the path to the cluster directory inside a job directory.static Path
jobCommandDirectoryPath
(File jobDirectory, String commandId) Compose the path to the command directory inside a job directory.static Path
jobEntityConfigPath
(Path entityDirectory) Compose the path to the configurations directory for a given entity.static Path
jobEntityDependenciesPath
(Path entityDirectory) Compose the path to the dependencies directory for a given entity.static Path
jobEntitySetupFilePath
(Path entityDirectory) Compose the path to the setup file for a given entity.static Path
jobEnvironmentLogFilePath
(File jobDirectory) Compose the path to the file where environment variables are dumped after running setup.static Path
jobGenieDirectoryPath
(File jobDirectory) Compose the path to the genie directory inside a job directory.static Path
jobGenieLogsDirectoryPath
(File jobDirectory) Compose the path to the genie logs directory inside a job directory.static Path
jobScriptPath
(File jobDirectory) Compose the path to the job script (a.k.a.static Path
jobSetupErrorMarkerFilePath
(File jobDirectory) Compose the path to the marker file left behind if the script fails during setup.static Path
jobSetupLogFilePath
(File jobDirectory) Compose the path to the setup log file for a job (sourcing of entities setup files).static Path
jobStdErrPath
(File jobDirectory) Compose the path to the standard error log file for a job.static Path
jobStdOutPath
(File jobDirectory) Compose the path to the standard output log file for a job.
-
Method Details
-
composePath
Append an arbitrary set of components to a base path.- Parameters:
baseDirectory
- the base directorychildren
- path components- Returns:
- a Path
-
composePath
Append an arbitrary set of components to a base path.- Parameters:
baseDirectory
- the base directorychildren
- path components- Returns:
- a Path
-
jobApplicationsDirectoryPath
Compose the path to the applications directory inside a job directory.- Parameters:
jobDirectory
- the job directory- Returns:
- a Path
-
jobApplicationDirectoryPath
Compose the path to an application directory inside a job directory.- Parameters:
jobDirectory
- the job directoryappId
- the application id- Returns:
- a Path
-
jobClusterDirectoryPath
Compose the path to the cluster directory inside a job directory.- Parameters:
jobDirectory
- the job directoryclusterId
- the cluster id- Returns:
- a Path
-
jobCommandDirectoryPath
Compose the path to the command directory inside a job directory.- Parameters:
jobDirectory
- the job directorycommandId
- the command id- Returns:
- a Path
-
jobGenieDirectoryPath
Compose the path to the genie directory inside a job directory.- Parameters:
jobDirectory
- the job directory- Returns:
- a Path
-
jobGenieLogsDirectoryPath
Compose the path to the genie logs directory inside a job directory.- Parameters:
jobDirectory
- the job directory- Returns:
- a Path
-
jobEntityDependenciesPath
Compose the path to the dependencies directory for a given entity.- Parameters:
entityDirectory
- the entity base directory- Returns:
- a Path
-
jobEntityConfigPath
Compose the path to the configurations directory for a given entity.- Parameters:
entityDirectory
- the entity base directory- Returns:
- a Path
-
jobEntitySetupFilePath
Compose the path to the setup file for a given entity.- Parameters:
entityDirectory
- the entity base directory- Returns:
- a Path
-
jobStdOutPath
Compose the path to the standard output log file for a job.- Parameters:
jobDirectory
- the job directory- Returns:
- a Path
-
jobStdErrPath
Compose the path to the standard error log file for a job.- Parameters:
jobDirectory
- the job directory- Returns:
- a Path
-
jobAgentLogFilePath
Compose the path to the agent log file for a job (after it has been relocated inside the job directory).- Parameters:
jobDirectory
- the job directory- Returns:
- a Path
-
jobSetupLogFilePath
Compose the path to the setup log file for a job (sourcing of entities setup files).- Parameters:
jobDirectory
- the job directory- Returns:
- a Path
-
jobEnvironmentLogFilePath
Compose the path to the file where environment variables are dumped after running setup.- Parameters:
jobDirectory
- the job directory- Returns:
- a Path
-
jobScriptPath
Compose the path to the job script (a.k.a. run file).- Parameters:
jobDirectory
- the job directory- Returns:
- a Path
-
jobSetupErrorMarkerFilePath
Compose the path to the marker file left behind if the script fails during setup.- Parameters:
jobDirectory
- the job directory- Returns:
- a Path
-