下面列出了org.apache.hadoop.io.UTF8#writeString ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Override
public void write(DataOutput out) throws IOException {
UTF8.writeString(out, topic);
UTF8.writeString(out, leaderId);
if (uri != null)
UTF8.writeString(out, uri.toString());
else
UTF8.writeString(out, "");
out.writeInt(partition);
out.writeLong(offset);
out.writeLong(latestOffset);
}
@Override
public void write(DataOutput out) throws IOException {
UTF8.writeString(out, this.leaderId);
out.writeInt(this.partition);
out.writeLong(this.beginOffset);
out.writeLong(this.offset);
out.writeLong(this.checksum);
out.writeUTF(this.topic);
out.writeLong(this.time);
out.writeUTF(this.server); // left for legacy
out.writeUTF(this.service); // left for legacy
this.partitionMap.write(out);
}
public void write(DataOutput out) throws IOException {
UTF8.writeString(out, getBuildVersion());
out.writeInt(getLayoutVersion());
out.writeInt(getNamespaceID());
out.writeLong(getCTime());
out.writeInt(getDistributedUpgradeVersion());
}
public void write(DataOutput out) throws IOException {
UTF8.writeString(out, getBuildVersion());
out.writeInt(getLayoutVersion());
out.writeInt(getNamespaceID());
out.writeLong(getCTime());
out.writeInt(getDistributedUpgradeVersion());
}
public void write(DataOutput out) throws IOException {
UTF8.writeString(out, file);
out.writeLong(start);
out.writeLong(length);
}
/** {@inheritDoc} */
public void write(DataOutput out) throws IOException {
UTF8.writeString(out, name);
UTF8.writeString(out, storageID);
out.writeShort(infoPort);
}
@Override
@SuppressWarnings("deprecation")
public void toBinary(DataOutputStream out) throws IOException {
UTF8.writeString(out, value);
}
public void write(DataOutput out) throws IOException {
UTF8.writeString(out, file.toString());
out.writeLong(start);
out.writeLong(length);
}
/** {@inheritDoc} */
public void write(DataOutput out) throws IOException {
UTF8.writeString(out, name);
UTF8.writeString(out, storageID);
out.writeShort(infoPort);
}