if (path == null) { System.err.println("Please specify the path for setting the EC " + "policy.\nUsage: " + getLongUsage()); return 1; System.err.println(getName() + ": Too many arguments"); return 1; System.err.println(getName() + ": -replicate and -policy cannot been used at the same time"); return 2;
@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"; }
@Override public String getShortUsage() { return "[" + getName() + " -path <path> [-policy <policy>] [-replicate]]\n"; }