@Override public int run(Configuration conf, List<String> args) throws IOException { if (!args.isEmpty()) { System.err.println("Can't understand argument: " + args.get(0)); return 1; } HdfsAdmin admin = new HdfsAdmin(FileSystem.getDefaultUri(conf), conf); try { final TableListing listing = new TableListing.Builder() .addField("").addField("", true) .wrapWidth(AdminHelper.MAX_LINE_WIDTH).hideHeaders().build(); final RemoteIterator<EncryptionZone> it = admin.listEncryptionZones(); while (it.hasNext()) { EncryptionZone ez = it.next(); listing.addRow(ez.getPath(), ez.getKeyName()); } System.out.println(listing.toString()); } catch (IOException e) { System.err.println(prettifyException(e)); return 2; } return 0; } }
.addField("Number of failures") .addField("Last File Checkpointed") .wrapWidth(AdminHelper.MAX_LINE_WIDTH).showHeaders().build(); final RemoteIterator<ZoneReencryptionStatus> it = admin.listReencryptionStatus();
@Override public int run(Configuration conf, List<String> args) throws IOException { if (!args.isEmpty()) { System.err.println("Can't understand argument: " + args.get(0)); return 1; } final DistributedFileSystem dfs = AdminHelper.getDFS(conf); try { final TableListing listing = new TableListing.Builder() .addField("").addField("", true) .wrapWidth(AdminHelper.MAX_LINE_WIDTH).hideHeaders().build(); final RemoteIterator<EncryptionZone> it = dfs.listEncryptionZones(); while (it.hasNext()) { EncryptionZone ez = it.next(); listing.addRow(ez.getPath(), ez.getKeyName()); } System.out.println(listing.toString()); } catch (IOException e) { System.err.println(prettifyException(e)); return 2; } return 0; } }
@Override public int run(Configuration conf, List<String> args) throws IOException { if (!args.isEmpty()) { System.err.println("Can't understand argument: " + args.get(0)); return 1; } final DistributedFileSystem dfs = AdminHelper.getDFS(conf); try { final TableListing listing = new TableListing.Builder() .addField("").addField("", true) .wrapWidth(AdminHelper.MAX_LINE_WIDTH).hideHeaders().build(); final RemoteIterator<EncryptionZone> it = dfs.listEncryptionZones(); while (it.hasNext()) { EncryptionZone ez = it.next(); listing.addRow(ez.getPath(), ez.getKeyName()); } System.out.println(listing.toString()); } catch (IOException e) { System.err.println(prettifyException(e)); return 2; } return 0; } }
private TableListing createOptionTableListing() { return new TableListing.Builder().addField("").addField("", true) .wrapWidth(MAX_LINE_WIDTH).build(); }
private TableListing createOptionTableListing() { return new TableListing.Builder().addField("").addField("", true) .wrapWidth(MAX_LINE_WIDTH).build(); }
static TableListing getOptionDescriptionListing() { return new TableListing.Builder() .addField("").addField("", true) .wrapWidth(MAX_LINE_WIDTH).hideHeaders().build(); }
static TableListing getOptionDescriptionListing() { return new TableListing.Builder() .addField("").addField("", true) .wrapWidth(MAX_LINE_WIDTH).hideHeaders().build(); }
private TableListing createOptionTableListing() { return new TableListing.Builder().addField("").addField("", true) .wrapWidth(MAX_LINE_WIDTH).build(); }
private TableListing createOptionTableListing() { return new TableListing.Builder().addField("").addField("", true) .wrapWidth(MAX_LINE_WIDTH).build(); }
static TableListing getOptionDescriptionListing() { return new TableListing.Builder() .addField("").addField("", true) .wrapWidth(MAX_LINE_WIDTH).hideHeaders().build(); }
private TableListing createOptionTableListing() { return new TableListing.Builder().addField("").addField("", true) .wrapWidth(MAX_LINE_WIDTH).build(); }