当前位置: 首页>>代码示例>>Java>>正文


Java UTF8.readString方法代码示例

本文整理汇总了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);
  }
}
 
开发者ID:HiveKa,项目名称:HiveKa,代码行数:20,代码来源:KafkaKey.java

示例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();
	}
}
 
开发者ID:spafka,项目名称:spark_deep,代码行数:11,代码来源:RPC.java

示例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;
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:11,代码来源:DatanodeID.java

示例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));
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:16,代码来源:DatanodeDescriptor.java

示例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();
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:8,代码来源:NamespaceInfo.java

示例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();
}
 
开发者ID:HiveKa,项目名称:HiveKa,代码行数:16,代码来源:KafkaRequest.java

示例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();
  }
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre,代码行数:11,代码来源:RPC.java

示例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;
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:7,代码来源:FileSplit.java

示例9: fromBinary

import org.apache.hadoop.io.UTF8; //导入方法依赖的package包/类
@Override
@SuppressWarnings("deprecation")    
public void fromBinary(DataInputStream in) throws IOException {
  value = UTF8.readString(in);
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:6,代码来源:Tokenizer.java


注:本文中的org.apache.hadoop.io.UTF8.readString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。