【发布时间】:2015-06-12 14:01:15
【问题描述】:
在 Oozie 中,如果工作流中有 2 个作业。第一个是 mapreduce,第二个是 Pig 脚本。 我们可以看到 mapreduce 作业的输出吗? 如果是,那么在哪里?
【问题讨论】:
在 Oozie 中,如果工作流中有 2 个作业。第一个是 mapreduce,第二个是 Pig 脚本。 我们可以看到 mapreduce 作业的输出吗? 如果是,那么在哪里?
【问题讨论】:
您可以通过两种方式检查中间数据。
1) 通过创建 oozie shell 操作调用 shell 脚本,将临时创建的中间文件移动到不同的位置。
这是一个将文件中的所有图像移动到不同文件夹的 shell 脚本。参考这个脚本。
## For all the images in a folder run through a loop
用于 ~/Desktop/My_pictures/*jpg 中的文件 做
## basename will remove the path (~/Desktop/My_pictures) and also
## remove the extension you give as a second argument
name="$(basename "$file" .jpg)"
## create the directory, the -p means it will create
## the parent directories if needed and it won't complain
## if the directory exists.
mkdir -p ~/Desktop/My_pictures/"$name"
## copy the file to the new directory
mv "$file" "~/Desktop/My_pictures/$name" 完成
2) 移除 pig 动作,只运行 map reduce 程序(Java 动作)。
第一个符合您的要求。
【讨论】: