Example usage for org.apache.hadoop.fs.shell CommandFormat parse

List of usage examples for org.apache.hadoop.fs.shell CommandFormat parse

Introduction

In this page you can find the example usage for org.apache.hadoop.fs.shell CommandFormat parse.

Prototype

public void parse(List<String> args) 

Source Link

Document

Parse parameters from the given list of args.

Usage

From source file:cn.ict.magicube.fs.shell.FixedLs.java

License:Apache License

@Override
protected void processOptions(LinkedList<String> args) throws IOException {
    CommandFormat cf = new CommandFormat(0, Integer.MAX_VALUE, "d", "h", "R");
    cf.parse(args);
    dirRecurse = !cf.getOpt("d");
    setRecursive(cf.getOpt("R") && dirRecurse);
    humanReadable = cf.getOpt("h");
    if (args.isEmpty())
        args.add(Path.CUR_DIR);/*from  w  w w. ja  v  a2 s.c  om*/
}