- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我使用 AvroStorage 存储 pig 的结果集。有没有一种方法可以将数据存储到一个指定的 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>
命令,获取本地文件系统中的文件,以便使用它包含的数据。
关于hadoop - AvroStorage - 输出文件名定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34880880/
我使用 AvroStorage 存储 pig 的结果集。有没有一种方法可以将数据存储到一个指定的 avro 文件中……例如 OutputFileGen1? Pig 将数据存储到名为 OutpuFile
我正在尝试用 Java 构建我的第一个 Pig UDF,但在使用 Eclipse 构建时调用该函数时遇到问题我的代码如下所示: REGISTER /home/user2/deb/demo.jar; 注
我尝试使用逗号分隔列表在 Pig 中使用 AvroStorage 加载多个文件。我使用的语句是: test_data= LOAD 'repo_1/part-r-00000.avro,repo_2/pa
我像这样使用 AvroStorage: STORE alias INTO '$OUTPUT' USING org.apache.pig.piggybank.storage.avro.AvroS
我有一个要求,我们需要自定义使用 avrostorage 在 pig 中加载文件的方式: 例如,我有一个具有以下架构的 avro 文件: {"namespace": "avroColorCount",
我在 EMR 上运行一个 pig 脚本,它读取以 Avro 格式存储的数据。它一直在本地工作,但为了让脚本的其他部分在 EMR 上工作,我不得不将我使用的 piggybank.jar 恢复为 0.9.
我在运行 pig 脚本时遇到以下错误 REGISTER /opt/cloudera/parcels/CDH/lib/pig/lib/avro.jar REGISTER /opt/cloudera/pa
我正在使用 Apache PIG 来减少最初以 CSV 格式存储的数据,并希望以 Avro 格式输出。我的 PIG 脚本的一部分调用了一个 java UDF,它将一些字段附加到输入元组并将修改后的元组
我是一名优秀的程序员,十分优秀!