Class CpCommand

  • All Implemented Interfaces:
    alluxio.cli.Command, java.io.Closeable, java.lang.AutoCloseable

    @ThreadSafe
    @PublicApi
    public final class CpCommand
    extends AbstractFileSystemCommand
    Copies a file or a directory in the Alluxio filesystem.
    • Field Detail

      • THREAD_OPTION

        public static final org.apache.commons.cli.Option THREAD_OPTION
      • BUFFER_SIZE_OPTION

        public static final org.apache.commons.cli.Option BUFFER_SIZE_OPTION
    • Constructor Detail

      • CpCommand

        public CpCommand​(alluxio.client.file.FileSystemContext fsContext)
        Parameters:
        fsContext - the filesystem of Alluxio
    • Method Detail

      • getCommandName

        public java.lang.String getCommandName()
      • validateArgs

        public void validateArgs​(org.apache.commons.cli.CommandLine cl)
                          throws alluxio.exception.status.InvalidArgumentException
        Throws:
        alluxio.exception.status.InvalidArgumentException
      • getOptions

        public org.apache.commons.cli.Options getOptions()
      • run

        public int run​(org.apache.commons.cli.CommandLine cl)
                throws alluxio.exception.AlluxioException,
                       java.io.IOException
        Throws:
        alluxio.exception.AlluxioException
        java.io.IOException
      • getUsage

        public java.lang.String getUsage()
      • getDescription

        public java.lang.String getDescription()