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

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

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

UTF8.readFields介绍

暂无

代码示例

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

UTF8 className = new UTF8();
className.readFields(in);
className.readFields(in);

代码示例来源: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: com.facebook.hadoop/hadoop-core

@SuppressWarnings("deprecation")
public static byte[] readBytes(DataInputStream in) throws IOException {
 UTF8 ustr = TL_DATA.get().U_STR;
 ustr.readFields(in);
 int len = ustr.getLength();
 byte[] bytes = new byte[len];
 System.arraycopy(ustr.getBytes(), 0, bytes, 0, len);
 return bytes;
}

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

static byte[] readBytes(DataInputStream in) throws IOException {
 U_STR.readFields(in);
 int len = U_STR.getLength();
 byte[] bytes = new byte[len];
 System.arraycopy(U_STR.getBytes(), 0, bytes, 0, len);
 return bytes;
}

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

/**
 * Reading the path from the image and converting it to byte[][] directly
 * this saves us an array copy and conversions to and from String
 * @param in
 * @return the array each element of which is a byte[] representation 
 *            of a path component
 * @throws IOException
 */
@SuppressWarnings("deprecation")
public static byte[][] readPathComponents(DataInputStream in)
  throws IOException {
 UTF8 ustr = TL_DATA.get().U_STR;
 
 ustr.readFields(in);
 return DFSUtil.bytes2byteArray(ustr.getBytes(),
  ustr.getLength(), (byte) Path.SEPARATOR_CHAR);
}

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

UTF8 className = new UTF8();
className.readFields(in);
className.readFields(in);

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

UTF8 className = new UTF8();
className.readFields(in);
className.readFields(in);

代码示例来源:origin: io.hops/hadoop-common

UTF8 className = new UTF8();
className.readFields(in);
className.readFields(in);

代码示例来源:origin: ch.cern.hadoop/hadoop-common

UTF8 className = new UTF8();
className.readFields(in);
className.readFields(in);

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

UTF8 className = new UTF8();
className.readFields(in);
className.readFields(in);

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

UTF8 className = new UTF8();
className.readFields(in);
className.readFields(in);

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

UTF8 className = new UTF8();
className.readFields(in);
className.readFields(in);

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

UTF8 className = new UTF8();
className.readFields(in);
className.readFields(in);

相关文章