public FsShell(Configuration configuration, FileSystem fs) {
this.configuration = configuration;
try {
this.fs = (fs != null ? fs : FileSystem.get(configuration));
this.internalFs = (fs == null);
this.trash = new Trash(configuration);
} catch (IOException ex) {
throw new HadoopException("Cannot create shell " + ex.getMessage(), ex);
}
}