本文整理汇总了Java中org.apache.hadoop.io.UTF8.readString方法的典型用法代码示例。如果您正苦于以下问题:Java UTF8.readString方法的具体用法?Java UTF8.readString怎么用?Java UTF8.readString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.io.UTF8
的用法示例。
在下文中一共展示了UTF8.readString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFields
import org.apache.hadoop.io.UTF8; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
this.leaderId = UTF8.readString(in);
this.partition = in.readInt();
this.beginOffset = in.readLong();
this.offset = in.readLong();
this.checksum = in.readLong();
this.topic = in.readUTF();
this.time = in.readLong();
this.server = in.readUTF(); // left for legacy
this.service = in.readUTF(); // left for legacy
this.partitionMap = new MapWritable();
try {
this.partitionMap.readFields(in);
} catch (IOException e) {
this.setServer(this.server);
this.setService(this.service);
}
}
示例2: readFields
import org.apache.hadoop.io.UTF8; //导入方法依赖的package包/类
public void readFields(DataInput in) throws IOException {
methodName = UTF8.readString(in);
parameters = new Object[in.readInt()];
parameterClasses = new Class[parameters.length];
ObjectWritable objectWritable = new ObjectWritable();
for(int i = 0; i < parameters.length; i++){
parameters[i] = ObjectWritable.readObject(in, objectWritable, conf);
parameterClasses[i] = objectWritable.getDeclaredClass();
}
}
示例3: readFields
import org.apache.hadoop.io.UTF8; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void readFields(DataInput in) throws IOException {
name = UTF8.readString(in);
storageID = UTF8.readString(in);
// the infoPort read could be negative, if the port is a large number (more
// than 15 bits in storage size (but less than 16 bits).
// So chop off the first two bytes (and hence the signed bits) before
// setting the field.
this.infoPort = in.readShort() & 0x0000ffff;
}
示例4: readFieldsFromFSEditLog
import org.apache.hadoop.io.UTF8; //导入方法依赖的package包/类
/** Serialization for FSEditLog */
void readFieldsFromFSEditLog(DataInput in) throws IOException {
this.name = UTF8.readString(in);
this.storageID = UTF8.readString(in);
this.infoPort = in.readShort() & 0x0000ffff;
this.capacity = in.readLong();
this.dfsUsed = in.readLong();
this.remaining = in.readLong();
this.lastUpdate = in.readLong();
this.xceiverCount = in.readInt();
this.location = Text.readString(in);
this.hostName = Text.readString(in);
setAdminState(WritableUtils.readEnum(in, AdminStates.class));
}
示例5: readFields
import org.apache.hadoop.io.UTF8; //导入方法依赖的package包/类
public void readFields(DataInput in) throws IOException {
buildVersion = UTF8.readString(in);
layoutVersion = in.readInt();
namespaceID = in.readInt();
cTime = in.readLong();
distributedUpgradeVersion = in.readInt();
}
示例6: readFields
import org.apache.hadoop.io.UTF8; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
topic = UTF8.readString(in);
leaderId = UTF8.readString(in);
String str = UTF8.readString(in);
if (!str.isEmpty())
try {
uri = new URI(str);
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
partition = in.readInt();
offset = in.readLong();
latestOffset = in.readLong();
}
示例7: readFields
import org.apache.hadoop.io.UTF8; //导入方法依赖的package包/类
public void readFields(DataInput in) throws IOException {
methodName = UTF8.readString(in);
parameters = new Object[in.readInt()];
parameterClasses = new Class[parameters.length];
ObjectWritable objectWritable = new ObjectWritable();
for (int i = 0; i < parameters.length; i++) {
parameters[i] = ObjectWritable.readObject(in, objectWritable, this.conf);
parameterClasses[i] = objectWritable.getDeclaredClass();
}
}
示例8: readFields
import org.apache.hadoop.io.UTF8; //导入方法依赖的package包/类
public void readFields(DataInput in) throws IOException {
file = new Path(UTF8.readString(in));
start = in.readLong();
length = in.readLong();
hosts = null;
}
示例9: fromBinary
import org.apache.hadoop.io.UTF8; //导入方法依赖的package包/类
@Override
@SuppressWarnings("deprecation")
public void fromBinary(DataInputStream in) throws IOException {
value = UTF8.readString(in);
}