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

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

Introduction

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

Prototype

public boolean getOpt(String option) 

Source Link

Document

Return if the option is set or not

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);/*from   w w  w .j  a  v  a  2s  .c o m*/
    dirRecurse = !cf.getOpt("d");
    setRecursive(cf.getOpt("R") && dirRecurse);
    humanReadable = cf.getOpt("h");
    if (args.isEmpty())
        args.add(Path.CUR_DIR);
}