Package org.apache.accumulo.shell
Class ShellUtil
- java.lang.Object
-
- org.apache.accumulo.shell.ShellUtil
-
public class ShellUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ShellUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,String>parseMapOpt(org.apache.commons.cli.CommandLine cl, org.apache.commons.cli.Option opt)static List<org.apache.hadoop.io.Text>scanFile(String filename, boolean decode)Scans the given file line-by-line (ignoring empty lines) and returns a list containing those lines.
-
-
-
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 usingBase64from the UTF-8 bytes of that line before inserting in the list.- Parameters:
filename- Path to the file that needs to be scanneddecode- Whether to decode lines in the file- Returns:
- List of
Textobjects containing data in the given file - Throws:
IOException
-
-