Class AbstractCollectInfoCommand

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected alluxio.client.file.FileSystemContext mFsContext  
      protected java.lang.String mWorkingDirPath  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File generateOutputFile​(java.lang.String workingDirPath, java.lang.String fileName)
      Generates the output file for the command to write printouts to.
      java.lang.String getWorkingDirectory​(org.apache.commons.cli.CommandLine cl)
      Gets the directory that this command should output to.
      void validateArgs​(org.apache.commons.cli.CommandLine cl)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface alluxio.cli.Command

        close, getCommandName, getDescription, getOptions, getSubCommands, getUsage, hasSubCommand, parseAndValidateArgs, run
    • Field Detail

      • mFsContext

        protected alluxio.client.file.FileSystemContext mFsContext
      • mWorkingDirPath

        protected java.lang.String mWorkingDirPath
    • Constructor Detail

      • AbstractCollectInfoCommand

        public AbstractCollectInfoCommand​(alluxio.client.file.FileSystemContext fsContext)
        Creates an instance of AbstractCollectInfoCommand.
        Parameters:
        fsContext - FileSystemContext the context to run in
    • Method Detail

      • validateArgs

        public void validateArgs​(org.apache.commons.cli.CommandLine cl)
                          throws alluxio.exception.status.InvalidArgumentException
        Specified by:
        validateArgs in interface alluxio.cli.Command
        Throws:
        alluxio.exception.status.InvalidArgumentException
      • getWorkingDirectory

        public java.lang.String getWorkingDirectory​(org.apache.commons.cli.CommandLine cl)
        Gets the directory that this command should output to. Creates the directory if it does not exist.
        Parameters:
        cl - the parsed CommandLine
        Returns:
        the directory path
      • generateOutputFile

        public java.io.File generateOutputFile​(java.lang.String workingDirPath,
                                               java.lang.String fileName)
                                        throws java.io.IOException
        Generates the output file for the command to write printouts to.
        Parameters:
        workingDirPath - the base directory this command should output to
        fileName - name of the output file
        Returns:
        the output file
        Throws:
        java.io.IOException