org.apache.hadoop.io.UTF8.toString()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中org.apache.hadoop.io.UTF8.toString()方法的一些代码示例,展示了UTF8.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UTF8.toString()方法的具体详情如下:
包路径:org.apache.hadoop.io.UTF8
类名称:UTF8
方法名:toString

UTF8.toString介绍

[英]Convert to a String.
[中]转换成字符串。

代码示例

代码示例来源:origin: com.facebook.hadoop/hadoop-core

@SuppressWarnings("deprecation")
public static String readString(DataInputStream in) throws IOException {
 UTF8 ustr = TL_DATA.get().U_STR;
 ustr.readFields(in);
 return ustr.toString();
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

/** read the long value */
static short readShortAsString(DataInputStream in) throws IOException {
 UTF8 ustr = TL_DATA.get().U_STR;
 ustr.readFields(in);
 return Short.parseShort(ustr.toString());
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

/** read the long value */
static long readLongAsString(DataInputStream in) throws IOException {
 UTF8 ustr = TL_DATA.get().U_STR;
 ustr.readFields(in);
 return Long.parseLong(ustr.toString());
}

代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core

static String readString(DataInputStream in) throws IOException {
 U_STR.readFields(in);
 return U_STR.toString();
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test

public void reduce(UTF8 key, Iterator<UTF8> values,
           OutputCollector<UTF8, UTF8> output, Reporter reporter) throws IOException 
 {
  while(values.hasNext()) {
   output.collect(key, new UTF8(values.next().toString()));
  }
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient

public void reduce(UTF8 key, Iterator<UTF8> values,
           OutputCollector<UTF8, UTF8> output, Reporter reporter) throws IOException 
 {
  while(values.hasNext()) {
   output.collect(key, new UTF8(values.next().toString()));
  }
 }
}

代码示例来源:origin: org.apache.geode/gemfire-core

keyClassName = className.toString(); // key class name
 valClassName = className.toString(); // val class name
} else {
 keyClassName = Text.readString(in);

代码示例来源:origin: com.facebook.hadoop/hadoop-core

keyClassName = className.toString(); // key class name
 valClassName = className.toString(); // val class name
} else {
 keyClassName = Text.readString(in);

代码示例来源:origin: io.snappydata/gemfire-core

keyClassName = className.toString(); // key class name
 valClassName = className.toString(); // val class name
} else {
 keyClassName = Text.readString(in);

代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core

keyClassName = className.toString(); // key class name
 valClassName = className.toString(); // val class name
} else {
 keyClassName = Text.readString(in);

相关文章