/** * Create a new TableListing. */ public TableListing build() { return new TableListing(columns.toArray(new Column[0]), showHeader, wrapWidth); } }
row.add(Long.toString(stats.getFilesCached())); listing.addRow(row.toArray(new String[row.size()])); ++numResults; if (name != null) {
row.add("" + stats.getFilesCached()); tableListing.addRow(row.toArray(new String[row.size()])); numEntries++;
private int listSpanReceivers(List<String> args) throws IOException { SpanReceiverInfo infos[] = remote.listSpanReceivers(); if (infos.length == 0) { System.out.println("[no span receivers found]"); return 0; } TableListing listing = new TableListing.Builder(). addField("ID"). addField("CLASS"). showHeaders(). build(); for (SpanReceiverInfo info : infos) { listing.addRow("" + info.getId(), info.getClassName()); } System.out.println(listing.toString()); return 0; }
row.add(Long.toString(stats.getFilesCached())); listing.addRow(row.toArray(new String[row.size()])); ++numResults; if (name != null) {
/** * Create a new TableListing. */ public TableListing build() { return new TableListing(columns.toArray(new Column[0]), showHeader, wrapWidth); } }
@Override public String getLongUsage() { TableListing listing = AdminHelper.getOptionDescriptionListing(); listing.addRow("-stats", "List path-based cache directive statistics."); listing.addRow("<path>", "List only " + "cache directives with this path. " + "Note that if there is a cache directive for <path> " + "in a cache pool that we don't have read access for, it " + "will not be listed."); listing.addRow("<pool>", "List only path cache directives in that pool."); listing.addRow("<id>", "List the cache directive with this id."); return getShortUsage() + "\n" + "List cache directives.\n\n" + listing.toString(); }
row.add(Long.toString(stats.getFilesCached())); listing.addRow(row.toArray(new String[row.size()])); ++numResults; if (name != null) {
/** * Create a new TableListing. */ public TableListing build() { return new TableListing(columns.toArray(new Column[0]), showHeader, wrapWidth); } }
@Override public String getLongUsage() { TableListing listing = AdminHelper.getOptionDescriptionListing(); listing.addRow("<path>", "The path of the file/directory to set " + "the erasure coding policy"); listing.addRow("<policy>", "The name of the erasure coding policy"); listing.addRow("-replicate", "force 3x replication scheme on the directory"); return getShortUsage() + "\n" + "Set the erasure coding policy for a file/directory.\n\n" + listing.toString() + "\n" + "-replicate and -policy are optional arguments. They cannot been " + "used at the same time"; }
row.add("" + stats.getFilesCached()); tableListing.addRow(row.toArray(new String[row.size()])); numEntries++;
/** * Create a new TableListing. */ public TableListing build() { return new TableListing(columns.toArray(new Column[0]), showHeader, wrapWidth); } }
@Override public String getLongUsage() { TableListing listing = AdminHelper.getOptionDescriptionListing(); listing.addRow("<id>", "The ID of the directive to modify (required)"); listing.addRow("<path>", "A path to cache. The path can be " + "a directory or a file. (optional)"); listing.addRow("-force", "Skips checking of cache pool resource limits."); listing.addRow("<replication>", "The cache replication factor to use. " + "(optional)"); listing.addRow("<pool-name>", "The pool to which the directive will be " + "added. You must have write permission on the cache pool " + "in order to move a directive into it. (optional)"); listing.addRow("<time-to-live>", "How long the directive is " + "valid. Can be specified in minutes, hours, and days, e.g. " + "30m, 4h, 2d. Valid units are [smhd]." + " \"never\" indicates a directive that never expires."); return getShortUsage() + "\n" + "Modify a cache directive.\n\n" + listing.toString(); }
row.add("" + stats.getFilesCached()); tableListing.addRow(row.toArray(new String[row.size()])); numEntries++;
/** * Create a new TableListing. */ public TableListing build() { return new TableListing(columns.toArray(new Column[0]), showHeader, wrapWidth); } }
@Override public String getLongUsage() { final TableListing listing = AdminHelper.getOptionDescriptionListing(); listing.addRow("<path>", "The path of the encryption zone to create. " + "It must be an empty directory. A trash directory is provisioned " + "under this path."); listing.addRow("<keyName>", "Name of the key to use for the " + "encryption zone."); return getShortUsage() + "\n" + "Create a new encryption zone.\n\n" + listing.toString(); }
@Override public String getLongUsage() { final TableListing listing = AdminHelper.getOptionDescriptionListing(); listing.addRow("<action>", "The re-encrypt action to perform. Must be -start or -cancel."); listing.addRow("<zone>", "The path to the zone to be re-encrypted."); return getShortUsage() + "\n" + "Issue a re-encryption command for" + " an encryption zone. Requires superuser permissions.\n\n" + listing.toString(); }
@Override public String getLongUsage() { TableListing listing = AdminHelper.getOptionDescriptionListing(); listing.addRow("<path>", "The path of the file/directory to set storage" + " policy"); listing.addRow("<policy>", "The name of the block storage policy"); return getShortUsage() + "\n" + "Set the storage policy to a file/directory.\n\n" + listing.toString(); }
@Override public String getLongUsage() { TableListing listing = AdminHelper.getOptionDescriptionListing(); listing.addRow("<path>", "A path to cache. The path can be " + "a directory or a file."); listing.addRow("<pool-name>", "The pool to which the directive will be " + "added. You must have write permission on the cache pool " + "in order to add new directives."); listing.addRow("-force", "Skips checking of cache pool resource limits."); listing.addRow("<replication>", "The cache replication factor to use. " + "Defaults to 1."); listing.addRow("<time-to-live>", "How long the directive is " + "valid. Can be specified in minutes, hours, and days, e.g. " + "30m, 4h, 2d. Valid units are [smhd]." + " \"never\" indicates a directive that never expires." + " If unspecified, the directive never expires."); return getShortUsage() + "\n" + "Add a new cache directive.\n\n" + listing.toString(); }