Class PathUtils

java.lang.Object
com.netflix.genie.agent.utils.PathUtils

public final class PathUtils extends Object
Utilities to compose filesystem paths.
Since:
4.0.0
  • Method Details

    • composePath

      public static Path composePath(File baseDirectory, String... children)
      Append an arbitrary set of components to a base path.
      Parameters:
      baseDirectory - the base directory
      children - path components
      Returns:
      a Path
    • composePath

      public static Path composePath(Path baseDirectory, String... children)
      Append an arbitrary set of components to a base path.
      Parameters:
      baseDirectory - the base directory
      children - path components
      Returns:
      a Path
    • jobApplicationsDirectoryPath

      public static Path jobApplicationsDirectoryPath(File jobDirectory)
      Compose the path to the applications directory inside a job directory.
      Parameters:
      jobDirectory - the job directory
      Returns:
      a Path
    • jobApplicationDirectoryPath

      public static Path jobApplicationDirectoryPath(File jobDirectory, String appId)
      Compose the path to an application directory inside a job directory.
      Parameters:
      jobDirectory - the job directory
      appId - the application id
      Returns:
      a Path
    • jobClusterDirectoryPath

      public static Path jobClusterDirectoryPath(File jobDirectory, String clusterId)
      Compose the path to the cluster directory inside a job directory.
      Parameters:
      jobDirectory - the job directory
      clusterId - the cluster id
      Returns:
      a Path
    • jobCommandDirectoryPath

      public static Path jobCommandDirectoryPath(File jobDirectory, String commandId)
      Compose the path to the command directory inside a job directory.
      Parameters:
      jobDirectory - the job directory
      commandId - the command id
      Returns:
      a Path
    • jobGenieDirectoryPath

      public static Path jobGenieDirectoryPath(File jobDirectory)
      Compose the path to the genie directory inside a job directory.
      Parameters:
      jobDirectory - the job directory
      Returns:
      a Path
    • jobGenieLogsDirectoryPath

      public static Path jobGenieLogsDirectoryPath(File jobDirectory)
      Compose the path to the genie logs directory inside a job directory.
      Parameters:
      jobDirectory - the job directory
      Returns:
      a Path
    • jobEntityDependenciesPath

      public static Path jobEntityDependenciesPath(Path entityDirectory)
      Compose the path to the dependencies directory for a given entity.
      Parameters:
      entityDirectory - the entity base directory
      Returns:
      a Path
    • jobEntityConfigPath

      public static Path jobEntityConfigPath(Path entityDirectory)
      Compose the path to the configurations directory for a given entity.
      Parameters:
      entityDirectory - the entity base directory
      Returns:
      a Path
    • jobEntitySetupFilePath

      public static Path jobEntitySetupFilePath(Path entityDirectory)
      Compose the path to the setup file for a given entity.
      Parameters:
      entityDirectory - the entity base directory
      Returns:
      a Path
    • jobStdOutPath

      public static Path jobStdOutPath(File jobDirectory)
      Compose the path to the standard output log file for a job.
      Parameters:
      jobDirectory - the job directory
      Returns:
      a Path
    • jobStdErrPath

      public static Path jobStdErrPath(File jobDirectory)
      Compose the path to the standard error log file for a job.
      Parameters:
      jobDirectory - the job directory
      Returns:
      a Path
    • jobAgentLogFilePath

      public 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).
      Parameters:
      jobDirectory - the job directory
      Returns:
      a Path
    • jobSetupLogFilePath

      public static Path jobSetupLogFilePath(File jobDirectory)
      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

      public static Path jobEnvironmentLogFilePath(File jobDirectory)
      Compose the path to the file where environment variables are dumped after running setup.
      Parameters:
      jobDirectory - the job directory
      Returns:
      a Path
    • jobScriptPath

      public static Path jobScriptPath(File jobDirectory)
      Compose the path to the job script (a.k.a. run file).
      Parameters:
      jobDirectory - the job directory
      Returns:
      a Path
    • jobSetupErrorMarkerFilePath

      public static Path jobSetupErrorMarkerFilePath(File jobDirectory)
      Compose the path to the marker file left behind if the script fails during setup.
      Parameters:
      jobDirectory - the job directory
      Returns:
      a Path