Java Code Examples for org.apache.hadoop.io.UTF8#readString()
The following examples show how to use
org.apache.hadoop.io.UTF8#readString() .
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: KafkaKey.java From HiveKa with Apache License 2.0 | 6 votes |
@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); } }
Example 2
Source File: KafkaRequest.java From HiveKa with Apache License 2.0 | 5 votes |
@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(); }
Example 3
Source File: DatanodeID.java From RDFS with Apache License 2.0 | 5 votes |
/** {@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; }
Example 4
Source File: DatanodeDescriptor.java From RDFS with Apache License 2.0 | 5 votes |
/** 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)); }
Example 5
Source File: NamespaceInfo.java From RDFS with Apache License 2.0 | 5 votes |
public void readFields(DataInput in) throws IOException { buildVersion = UTF8.readString(in); layoutVersion = in.readInt(); namespaceID = in.readInt(); cTime = in.readLong(); distributedUpgradeVersion = in.readInt(); }
Example 6
Source File: DatanodeID.java From hadoop-gpu with Apache License 2.0 | 5 votes |
/** {@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; }
Example 7
Source File: DatanodeDescriptor.java From hadoop-gpu with Apache License 2.0 | 5 votes |
/** 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)); }
Example 8
Source File: NamespaceInfo.java From hadoop-gpu with Apache License 2.0 | 5 votes |
public void readFields(DataInput in) throws IOException { buildVersion = UTF8.readString(in); layoutVersion = in.readInt(); namespaceID = in.readInt(); cTime = in.readLong(); distributedUpgradeVersion = in.readInt(); }
Example 9
Source File: Tokenizer.java From RDFS with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("deprecation") public void fromBinary(DataInputStream in) throws IOException { value = UTF8.readString(in); }
Example 10
Source File: FileSplit.java From hadoop-gpu with Apache License 2.0 | 4 votes |
public void readFields(DataInput in) throws IOException { file = new Path(UTF8.readString(in)); start = in.readLong(); length = in.readLong(); hosts = null; }