Java Code Examples for org.apache.hadoop.io.UTF8#writeString()

The following examples show how to use org.apache.hadoop.io.UTF8#writeString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KafkaRequest.java    From HiveKa with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 2
Source File: KafkaKey.java    From HiveKa with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 3
Source File: NamespaceInfo.java    From RDFS with Apache License 2.0 5 votes vote down vote up
public void write(DataOutput out) throws IOException {
  UTF8.writeString(out, getBuildVersion());
  out.writeInt(getLayoutVersion());
  out.writeInt(getNamespaceID());
  out.writeLong(getCTime());
  out.writeInt(getDistributedUpgradeVersion());
}
 
Example 4
Source File: NamespaceInfo.java    From hadoop-gpu with Apache License 2.0 5 votes vote down vote up
public void write(DataOutput out) throws IOException {
  UTF8.writeString(out, getBuildVersion());
  out.writeInt(getLayoutVersion());
  out.writeInt(getNamespaceID());
  out.writeLong(getCTime());
  out.writeInt(getDistributedUpgradeVersion());
}
 
Example 5
Source File: FileSplit.java    From RDFS with Apache License 2.0 4 votes vote down vote up
public void write(DataOutput out) throws IOException {
  UTF8.writeString(out, file);
  out.writeLong(start);
  out.writeLong(length);
}
 
Example 6
Source File: DatanodeID.java    From RDFS with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
public void write(DataOutput out) throws IOException {
  UTF8.writeString(out, name);
  UTF8.writeString(out, storageID);
  out.writeShort(infoPort);
}
 
Example 7
Source File: Tokenizer.java    From RDFS with Apache License 2.0 4 votes vote down vote up
@Override
@SuppressWarnings("deprecation")
public void toBinary(DataOutputStream out) throws IOException {
  UTF8.writeString(out, value);
}
 
Example 8
Source File: FileSplit.java    From hadoop-gpu with Apache License 2.0 4 votes vote down vote up
public void write(DataOutput out) throws IOException {
  UTF8.writeString(out, file.toString());
  out.writeLong(start);
  out.writeLong(length);
}
 
Example 9
Source File: DatanodeID.java    From hadoop-gpu with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
public void write(DataOutput out) throws IOException {
  UTF8.writeString(out, name);
  UTF8.writeString(out, storageID);
  out.writeShort(infoPort);
}