Class GuaguaOptionsParser


  • @Deprecated
    public class GuaguaOptionsParser
    extends Object
    Deprecated.
    Copy from hadoop GenericOptionsParser and extend it.

    Add other parameter support like -w, -m ...

    See Also:
    Tool, ToolRunner
    • Constructor Detail

      • GuaguaOptionsParser

        public GuaguaOptionsParser​(org.apache.commons.cli.Options opts,
                                   String[] args)
                            throws IOException
        Deprecated.
        Create an options parser with the given options to parse the args.
        Parameters:
        opts - the options
        args - the command line arguments
        Throws:
        IOException
      • GuaguaOptionsParser

        public GuaguaOptionsParser​(String[] args)
                            throws IOException
        Deprecated.
        Create an options parser to parse the args.
        Parameters:
        args - the command line arguments
        Throws:
        IOException
      • GuaguaOptionsParser

        public GuaguaOptionsParser​(org.apache.hadoop.conf.Configuration conf,
                                   String[] args)
                            throws IOException
        Deprecated.
        Create a GuaguaOptionsParser to parse only the generic Hadoop arguments. The array of string arguments other than the generic arguments can be obtained by getRemainingArgs().
        Parameters:
        conf - the Configuration to modify.
        args - command-line arguments.
        Throws:
        IOException
      • GuaguaOptionsParser

        public GuaguaOptionsParser​(org.apache.hadoop.conf.Configuration conf,
                                   org.apache.commons.cli.Options options,
                                   String[] args)
                            throws IOException
        Deprecated.
        Create a GuaguaOptionsParser to parse given options as well as generic Hadoop options. The resulting CommandLine object can be obtained by getCommandLine().
        Parameters:
        conf - the configuration to modify
        options - options built by the caller
        args - User-specified arguments
        Throws:
        IOException
    • Method Detail

      • getRemainingArgs

        public String[] getRemainingArgs()
        Deprecated.
        Returns an array of Strings containing only application-specific arguments.
        Returns:
        array of Strings containing the un-parsed arguments or empty array if commandLine was not defined.
      • getConfiguration

        public org.apache.hadoop.conf.Configuration getConfiguration()
        Deprecated.
        Get the modified configuration
        Returns:
        the configuration that has the modified parameters.
      • getCommandLine

        public org.apache.commons.cli.CommandLine getCommandLine()
        Deprecated.
        Returns the commons-cli CommandLine object to process the parsed arguments. Note: If the object is created with GuaguaOptionsParser(Configuration, String[]), then returned object will only contain parsed generic options.
        Returns:
        CommandLine representing list of arguments parsed against Options descriptor.
      • getLibJars

        public static URL[] getLibJars​(org.apache.hadoop.conf.Configuration conf)
                                throws IOException
        Deprecated.
        If libjars are set in the conf, parse the libjars.
        Throws:
        IOException
      • printGenericCommandUsage

        public static void printGenericCommandUsage​(PrintStream out)
        Deprecated.
        Print the usage message for generic command-line options supported.
        Parameters:
        out - stream to print the usage message to.