下面列出了org.apache.hadoop.fs.shell.CommandFactory#registerCommands ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
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);
}
}
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);
}
}
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);
}
}
@Override
protected void registerCommands(CommandFactory factory) {
super.registerCommands(factory);
factory.registerCommands(Find.class);
}