将猪结果存储到本地文件 [英] Store pig result to local file

查看:23
本文介绍了将猪结果存储到本地文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行pig脚本做了一些放大操作,输出大小非常小.

I run pig script do some aggerative operation, and output size is very small.

现在我跑

hadoop fs -getmerge ...

分开.

有什么办法可以让pig脚本直接将结果转储到本地文件中?

Any way to let pig script dump the result into local file directly?

推荐答案

如果您不担心将所有内容合并到一个文件中,那么您可以使用 grunt 中的 copyToLocal 命令 (http://wiki.apache.org/猪/咕噜声):

If you're not worried about merging everything to a single file then you can use the copyToLocal command in grunt (http://wiki.apache.org/pig/Grunt):

grunt> copyToLocal <src> <dest>

这篇关于将猪结果存储到本地文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆