Example usage for org.apache.hadoop.hdfs DFSUtil parseHelpArgument

List of usage examples for org.apache.hadoop.hdfs DFSUtil parseHelpArgument

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs DFSUtil parseHelpArgument.

Prototype

public static boolean parseHelpArgument(String[] args, String helpDescription, PrintStream out,
        boolean printGenericCommandUsage) 

Source Link

Document

Parse the arguments for commands

Usage

From source file:mzb.Balancer.java

License:Apache License

/**
 * Run a balancer//from w w  w.j a v a  2  s  . co m
 * @param args Command line arguments
 */
public static void main(String[] args) {
    if (DFSUtil.parseHelpArgument(args, USAGE, System.out, true)) {
        System.exit(0);
    }

    try {
        System.exit(ToolRunner.run(new HdfsConfiguration(), new Cli(), args));
    } catch (Throwable e) {
        LOG.error("Exiting balancer due an exception", e);
        System.exit(-1);
    }
}