Example usage for org.apache.hadoop.fs.shell CommandFactory registerCommands

List of usage examples for org.apache.hadoop.fs.shell CommandFactory registerCommands

Introduction

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

Prototype

public void registerCommands(Class<?> registrarClass) 

Source Link

Document

Invokes "static void registerCommands(CommandFactory)" on the given class.

Usage

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

License:Apache License

protected void registerCommands(CommandFactory factory) {
    // TODO: DFSAdmin subclasses FsShell so need to protect the command
    // registration.  This class should morph into a base class for
    // commands, and then this method can be abstract
    if (this.getClass().equals(FsShell.class)) {
        factory.registerCommands(FsCommand.class);
    }// w ww  .  j  a v a2  s .c om
}

From source file:org.apache.solr.hadoop.HdfsFindTool.java

License:Apache License

@Override
protected void registerCommands(CommandFactory factory) {
    super.registerCommands(factory);
    factory.registerCommands(Find.class);
}