Enum Command

    • Enum Constant Detail

      • IMPORT

        public static final Command IMPORT
      • EXPORT

        public static final Command EXPORT
      • COPY

        public static final Command COPY
      • EXTRACT

        public static final Command EXTRACT
    • Field Detail

      • LOG

        public static final org.apache.commons.logging.Log LOG
    • Method Detail

      • values

        public static Command[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Command c : Command.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Command valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isInputCompressed

        protected static boolean isInputCompressed​(org.apache.commons.cli.CommandLine cmdline)
      • isOutputCompressed

        protected static boolean isOutputCompressed​(org.apache.commons.cli.CommandLine cmdline)
      • isStreaming

        protected static boolean isStreaming​(org.apache.commons.cli.CommandLine cmdline,
                                             org.apache.hadoop.conf.Configuration conf)
      • configOptions

        public abstract void configOptions​(org.apache.commons.cli.Options options)
        Add supported config options.
        Parameters:
        options -
      • createJob

        public abstract org.apache.hadoop.mapreduce.Job createJob​(org.apache.hadoop.conf.Configuration conf,
                                                                  org.apache.commons.cli.CommandLine cmdline)
                                                           throws IOException
        Create a job based on Hadoop configuration and options.
        Parameters:
        conf - Hadoop configuration
        cmdline - command line options
        Returns:
        a Hadoop job
        Throws:
        Exception
        IOException
      • applyConfigOptions

        public abstract void applyConfigOptions​(org.apache.hadoop.conf.Configuration conf,
                                                org.apache.commons.cli.CommandLine cmdline)
        Apply config options set from the command-line to the configuration.
        Parameters:
        conf - configuration
        cmdline - command line options
      • setMapperClass

        public abstract void setMapperClass​(org.apache.hadoop.mapreduce.Job job,
                                            org.apache.hadoop.conf.Configuration conf,
                                            org.apache.commons.cli.CommandLine cmdline)
        Set Mapper class for a job. If the minimum threads required is more than 1 and threads_per_split is not set, also set the minimum threads in the configuration for the job scheduler.
        Parameters:
        job - the Hadoop job
        conf - Hadoop configuration
        cmdline - command line options
      • getRuntimeMapperClass

        public abstract Class<? extends org.apache.hadoop.mapreduce.Mapper<?,​?,​?,​?>> getRuntimeMapperClass​(org.apache.hadoop.mapreduce.Job job,
                                                                                                                             Class<? extends org.apache.hadoop.mapreduce.Mapper<?,​?,​?,​?>> mapper,
                                                                                                                             int threadsPerSplit)
      • printUsage

        public void printUsage​(Command cmd,
                               org.apache.commons.cli.Options options)