Java Code Examples for org.apache.hadoop.fs.shell.CommandFactory#registerCommands()

The following examples show how to use org.apache.hadoop.fs.shell.CommandFactory#registerCommands() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OzoneFsShell.java    From hadoop-ozone with Apache License 2.0 5 votes vote down vote up
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(OzoneFsShell.class)) {
    factory.registerCommands(FsCommand.class);
  }
}
 
Example 2
Source File: FsShell.java    From hadoop with Apache License 2.0 5 votes vote down vote up
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);
  }
}
 
Example 3
Source File: FsShell.java    From big-c with Apache License 2.0 5 votes vote down vote up
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);
  }
}
 
Example 4
Source File: HdfsFindTool.java    From examples with Apache License 2.0 4 votes vote down vote up
@Override
protected void registerCommands(CommandFactory factory) {
  super.registerCommands(factory);
  factory.registerCommands(Find.class);
}