Class ShellUtil


  • public class ShellUtil
    extends Object
    • Constructor Detail

      • ShellUtil

        public ShellUtil()
    • Method Detail

      • scanFile

        public static List<org.apache.hadoop.io.Text> scanFile​(String filename,
                                                               boolean decode)
                                                        throws IOException
        Scans the given file line-by-line (ignoring empty lines) and returns a list containing those lines. If decode is set to true, every line is decoded using Base64 from the UTF-8 bytes of that line before inserting in the list.
        Parameters:
        filename - Path to the file that needs to be scanned
        decode - Whether to decode lines in the file
        Returns:
        List of Text objects containing data in the given file
        Throws:
        IOException
      • parseMapOpt

        public static Map<String,​String> parseMapOpt​(org.apache.commons.cli.CommandLine cl,
                                                           org.apache.commons.cli.Option opt)