org.apache.hadoop.io.UTF8#readString ( )源码实例Demo

下面列出了org.apache.hadoop.io.UTF8#readString ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: HiveKa   文件: KafkaKey.java
@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 项目: HiveKa   文件: KafkaRequest.java
@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();
}
 
源代码3 项目: RDFS   文件: DatanodeID.java
/** {@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 项目: RDFS   文件: DatanodeDescriptor.java
/** 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 项目: RDFS   文件: NamespaceInfo.java
public void readFields(DataInput in) throws IOException {
  buildVersion = UTF8.readString(in);
  layoutVersion = in.readInt();
  namespaceID = in.readInt();
  cTime = in.readLong();
  distributedUpgradeVersion = in.readInt();
}
 
源代码6 项目: hadoop-gpu   文件: DatanodeID.java
/** {@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;
}
 
源代码7 项目: hadoop-gpu   文件: DatanodeDescriptor.java
/** 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));
}
 
源代码8 项目: hadoop-gpu   文件: NamespaceInfo.java
public void readFields(DataInput in) throws IOException {
  buildVersion = UTF8.readString(in);
  layoutVersion = in.readInt();
  namespaceID = in.readInt();
  cTime = in.readLong();
  distributedUpgradeVersion = in.readInt();
}
 
源代码9 项目: RDFS   文件: Tokenizer.java
@Override
@SuppressWarnings("deprecation")    
public void fromBinary(DataInputStream in) throws IOException {
  value = UTF8.readString(in);
}
 
源代码10 项目: hadoop-gpu   文件: FileSplit.java
public void readFields(DataInput in) throws IOException {
  file = new Path(UTF8.readString(in));
  start = in.readLong();
  length = in.readLong();
  hosts = null;
}