Example usage for org.apache.hadoop.fs.shell Command getDescription

List of usage examples for org.apache.hadoop.fs.shell Command getDescription

Introduction

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

Prototype

public String getDescription() 

Source Link

Document

The long usage suitable for help output

Usage

From source file:com.ruizhan.hadoop.hdfs.FsShell.java

License:Apache License

private void printInstanceHelp(PrintStream out, Command instance) {
    boolean firstLine = true;
    for (String line : instance.getDescription().split("\n")) {
        String prefix;//  w  w w . j a  va  2  s .  c o  m
        if (firstLine) {
            prefix = instance.getUsage() + ":\t";
            firstLine = false;
        } else {
            prefix = "\t\t";
        }
        System.out.println(prefix + line);
    }
}