Hadoop 编程世界中的关键字上下文是什么? [英] What is Keyword Context in Hadoop programming world?

查看:18
本文介绍了Hadoop 编程世界中的关键字上下文是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新的 API 术语中,Hadoop MapReduce 世界中的这个关键字 Context 究竟是什么?

What exactly is this keyword Context in Hadoop MapReduce world in new API terms?

它广泛用于从 Maps 和 Reduce 中编写输出对,但是我不确定它是否可以在其他地方使用,以及每当我使用上下文时到底发生了什么.它是一个具有不同名称的迭代器吗?

Its extensively used to write output pairs out of Maps and Reduce, however I am not sure if it can be used somewhere else and what's exactly happening whenever I use context. Is it a Iterator with different name?

Class Mapper.Context、Class Reducer.Context 和 Job.Context 是什么关系?

What is relation between Class Mapper.Context, Class Reducer.Context and Job.Context?

有人可以从外行的术语开始解释这一点,然后再详细说明.无法从 Hadoop API 文档中了解太多.

Can someone please explain this starting with Layman's terms and then going in detail. Not able understand much from Hadoop API documentations.

感谢您的时间和帮助.

推荐答案

Context 对象:允许 Mapper/Reducer 与 Hadoop 系统的其余部分进行交互.它包括作业的配置数据以及允许它发出输出的接口.

Context object: allows the Mapper/Reducer to interact with the rest of the Hadoop system. It includes configuration data for the job as well as interfaces which allow it to emit output.

应用程序可以使用上下文:

Applications can use the Context:

  • 报告进展
  • 设置应用级状态消息
  • 更新计数器
  • 表明他们还活着
  • 获取存储在 map/reduce 阶段的作业配置中的值.

这篇关于Hadoop 编程世界中的关键字上下文是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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