本文整理汇总了Java中org.apache.hadoop.fs.permission.ChmodParser类的典型用法代码示例。如果您正苦于以下问题:Java ChmodParser类的具体用法?Java ChmodParser怎么用?Java ChmodParser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChmodParser类属于org.apache.hadoop.fs.permission包,在下文中一共展示了ChmodParser类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processOptions
import org.apache.hadoop.fs.permission.ChmodParser; //导入依赖的package包/类
@Override
protected void processOptions(LinkedList<String> args) throws IOException {
CommandFormat cf = new CommandFormat(2, Integer.MAX_VALUE, "R", null);
cf.parse(args);
setRecursive(cf.getOpt("R"));
String modeStr = args.removeFirst();
try {
pp = new ChmodParser(modeStr);
} catch (IllegalArgumentException iea) {
// TODO: remove "chmod : " so it's not doubled up in output, but it's
// here for backwards compatibility...
throw new IllegalArgumentException(
"chmod : mode '" + modeStr + "' does not match the expected pattern.");
}
}
示例2: ChmodHandler
import org.apache.hadoop.fs.permission.ChmodParser; //导入依赖的package包/类
ChmodHandler(String modeStr) throws IOException {
super("chmod");
try {
pp = new ChmodParser(modeStr);
} catch(IllegalArgumentException iea) {
patternError(iea.getMessage());
}
}
示例3: ChmodHandler
import org.apache.hadoop.fs.permission.ChmodParser; //导入依赖的package包/类
ChmodHandler(FileSystem fs, String modeStr) throws IOException {
super("chmod", fs);
try {
pp = new ChmodParser(modeStr);
} catch(IllegalArgumentException iea) {
patternError(iea.getMessage());
}
}