本文整理汇总了Java中org.apache.hadoop.fs.Options.Rename.valueOf方法的典型用法代码示例。如果您正苦于以下问题:Java Rename.valueOf方法的具体用法?Java Rename.valueOf怎么用?Java Rename.valueOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.fs.Options.Rename
的用法示例。
在下文中一共展示了Rename.valueOf方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fromXml
import org.apache.hadoop.fs.Options.Rename; //导入方法依赖的package包/类
@Override void fromXml(Stanza st) throws InvalidXmlException {
this.length = Integer.parseInt(st.getValue("LENGTH"));
this.src = st.getValue("SRC");
this.dst = st.getValue("DST");
this.timestamp = Long.parseLong(st.getValue("TIMESTAMP"));
String opts = st.getValue("OPTIONS");
String o[] = opts.split("\\|");
this.options = new Rename[o.length];
for (int i = 0; i < o.length; i++) {
if (o[i].equals(""))
continue;
try {
this.options[i] = Rename.valueOf(o[i]);
} finally {
if (this.options[i] == null) {
System.err.println("error parsing Rename value: \"" + o[i] + "\"");
}
}
}
readRpcIdsFromXml(st);
}
示例2: readRenameOptions
import org.apache.hadoop.fs.Options.Rename; //导入方法依赖的package包/类
private static Rename[] readRenameOptions(DataInputStream in) throws IOException {
BytesWritable writable = new BytesWritable();
writable.readFields(in);
byte[] bytes = writable.getBytes();
Rename[] options = new Rename[bytes.length];
for (int i = 0; i < bytes.length; i++) {
options[i] = Rename.valueOf(bytes[i]);
}
return options;
}
示例3: readRenameOptions
import org.apache.hadoop.fs.Options.Rename; //导入方法依赖的package包/类
private static Rename[] readRenameOptions(DataInputStream in) throws IOException {
BytesWritable writable = new BytesWritable();
writable.readFields(in);
byte[] bytes = writable.getBytes();
int len = writable.getLength();
Rename[] options = new Rename[len];
for (int i = 0; i < len; i++) {
options[i] = Rename.valueOf(bytes[i]);
}
return options;
}