设为首页 加入收藏

TOP

Hadoop Writable深度复制及读取任意<key,value>序列文件(二)
2014-11-24 07:53:03 来源: 作者: 【 】 浏览:5
Tags:Hadoop Writable 深度 复制 读取 任意 < key value> 序列 文件
putStream dataOut = new DataOutputStream(byteOutStream); Writable copiedValue = null; try { source.write(dataOut); dataOut.flush(); ByteArrayInputStream byteInStream = new ByteArrayInputStream(byteOutStream.toByteArray()); DataInput dataInput = new DataInputStream(byteInStream); copiedValue = writableClass.newInstance(); copiedValue.readFields(dataInput); } catch (Exception e) { throw new CrunchRuntimeException("Error while deep copying " + source, e); } return copiedValue; } }

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Linux下Mongodb安装和sql语句 下一篇MySQL数据库迁移到PostgreSQL

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·C++模板 (template) (2025-12-26 15:49:49)
·C 语言中模板的几种 (2025-12-26 15:49:47)
·模板(泛型) - C语 (2025-12-26 15:49:44)
·C语言中,“指针”用 (2025-12-26 15:20:18)
·在c语言的指针运算中 (2025-12-26 15:20:15)