GroupByRowSuffixIterator.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:cosmos 作者:
public static Value getValue(final VLongWritable w) {
  if (w == null) {
    throw new IllegalArgumentException("Writable cannot be null");
  }
  ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
  DataOutputStream out = new DataOutputStream(byteStream);

  // We could also close it, but we know that VLongWritable and BAOS don't need it.
  try {
    w.write(out);
  } catch (IOException e) {
    // If this ever happens, some seriously screwed up is happening or someone subclasses VLongWritable
    // and made it do crazy stuff.
    throw new RuntimeException(e);
  }

  return new Value(byteStream.toByteArray());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号