AvroStorage - 输出文件名定义
AvroStorage - output file name definition
我使用 AvroStorage 来存储猪的结果集。有没有一种方法可以将数据存储到一个指定的 avro 文件中……例如 OutputFileGen1? Pig 正在将数据存储到名为 OutpuFileGen1 的目录中,其结构如下所示:
ls -al OutputFileGen1/
total 20
drwxr-xr-x 2 root root 4096 2016-01-18 14:35 .
drwxr-xr-x 6 root root 4096 2016-01-19 10:27 ..
-rw-r--r-- 1 root root 4083 2016-01-18 14:35 part-m-00000.avro
-rw-r--r-- 1 root root 40 2016-01-18 14:35 .part-m-00000.avro.crc
-rw-r--r-- 1 root root 0 2016-01-18 14:35 _SUCCESS
-rw-r--r-- 1 root root 8 2016-01-18 14:35 ._SUCCESS.crc
谢谢
pig 输出目录中的部分数量取决于您的作业执行的并行任务数量。这里你只有一个文件:part-m-00000.
http://pig.apache.org/docs/r0.8.1/cookbook.html#Use+the+Parallel+Features
但也许你是故意想要一个文件,所以如果你想获取这个文件我建议使用hadoop fs -getmerge <src dir> <target dir>
命令,获取本地文件系统中的文件以便使用数据它包含。
我使用 AvroStorage 来存储猪的结果集。有没有一种方法可以将数据存储到一个指定的 avro 文件中……例如 OutputFileGen1? Pig 正在将数据存储到名为 OutpuFileGen1 的目录中,其结构如下所示:
ls -al OutputFileGen1/
total 20
drwxr-xr-x 2 root root 4096 2016-01-18 14:35 .
drwxr-xr-x 6 root root 4096 2016-01-19 10:27 ..
-rw-r--r-- 1 root root 4083 2016-01-18 14:35 part-m-00000.avro
-rw-r--r-- 1 root root 40 2016-01-18 14:35 .part-m-00000.avro.crc
-rw-r--r-- 1 root root 0 2016-01-18 14:35 _SUCCESS
-rw-r--r-- 1 root root 8 2016-01-18 14:35 ._SUCCESS.crc
谢谢
pig 输出目录中的部分数量取决于您的作业执行的并行任务数量。这里你只有一个文件:part-m-00000.
http://pig.apache.org/docs/r0.8.1/cookbook.html#Use+the+Parallel+Features
但也许你是故意想要一个文件,所以如果你想获取这个文件我建议使用hadoop fs -getmerge <src dir> <target dir>
命令,获取本地文件系统中的文件以便使用数据它包含。