Class LoadMetadataCommand

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

    @ThreadSafe
    @PublicApi
    public class LoadMetadataCommand
    extends AbstractFileSystemCommand
    Loads metadata about a path in the UFS to Alluxio. No data will be transferred. This command is a client-side optimization without storing all returned `ls` results, preventing OOM for massive amount of small files.
    • Constructor Summary

      Constructors 
      Constructor Description
      LoadMetadataCommand​(alluxio.client.file.FileSystemContext fsContext)
      Constructs a new instance to load metadata for the given Alluxio path from UFS.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCommandName()  
      java.lang.String getDescription()  
      org.apache.commons.cli.Options getOptions()  
      java.lang.String getUsage()  
      int run​(org.apache.commons.cli.CommandLine cl)  
      protected void runPlainPath​(alluxio.AlluxioURI plainPath, org.apache.commons.cli.CommandLine cl)
      Runs the command for a particular URI that does not contain wildcard in its path.
      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, getSubCommands, hasSubCommand, parseAndValidateArgs
    • Constructor Detail

      • LoadMetadataCommand

        public LoadMetadataCommand​(alluxio.client.file.FileSystemContext fsContext)
        Constructs a new instance to load metadata for the given Alluxio path from UFS.
        Parameters:
        fsContext - the filesystem of Alluxio
    • Method Detail

      • getCommandName

        public java.lang.String getCommandName()
      • getOptions

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

        protected void runPlainPath​(alluxio.AlluxioURI plainPath,
                                    org.apache.commons.cli.CommandLine cl)
                             throws alluxio.exception.AlluxioException,
                                    java.io.IOException
        Description copied from class: AbstractFileSystemCommand
        Runs the command for a particular URI that does not contain wildcard in its path.
        Overrides:
        runPlainPath in class AbstractFileSystemCommand
        Parameters:
        plainPath - an AlluxioURI that does not contain wildcard
        cl - object containing the original commandLine
        Throws:
        alluxio.exception.AlluxioException
        java.io.IOException
      • 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()
      • validateArgs

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