Hadoop post-hook 和作业完成通知

标签 hadoop mapreduce notifications

我想将 Hadoop 作业输出导入到 Hive 表。如何在 Map-Reduce 作业/流程中实现后 Hook ?或者任何其他自动化选项?

此外,我会在工作完成后收到通知,例如向用户发送电子邮件。我发现这个:https://issues.apache.org/jira/browse/HADOOP-1111 ,但我不太明白如何做到这一点,因为我是 map 缩减的新手。

谢谢。

最佳答案

conf.set("mapreduce.job.end-notification.url","url")

就可以了。 url 应该是一个 http url,您将在其中接收回调。

来自javadoc:

Set the uri to be invoked in-order to send a notification after the job has completed (success/failure).

The uri can contain 2 special parameters: $jobId and $jobStatus. Those, if present, are replaced by the job's identifier and completion-status respectively.

This is typically used by application-writers to implement chaining of Map-Reduce jobs in an asynchronous manner.

请注意,较旧的 hadoop 版本使用 job.end.notification.url
它在新版本中已被弃用,取而代之的是 mapreduce.job.end-notification.url

引用mapred-default.xml#mapreduce.job.end-notification.url .

关于Hadoop post-hook 和作业完成通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31529174/

相关文章:

java - android.app.RemoteServiceException : Bad notification for startForeground

database - 任何可扩展的 OLAP 数据库(网络应用程序规模)?

java - java.lang.NumberFormatException:对于输入字符串: “0.89829948”

mapreduce - 检查列表的所有元素是否在 Raku 中都是素数

sorting - 在具有零化简节点的 Mapreduce 中实现简单排序程序时出错

c# - 当实体匹配用户定义的查询/过滤器/规则时执行操作

shell - Shell脚本检查hadoop客户端

java - HBase Java API HTrace 错误

hadoop - 为初始化指定的未知版本 : 3. 1.0 schemaTool 失败

ruby-on-rails - Notifications ala Facebook(数据库实现)