What is the keyword context in the Hadoop programming world?

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

It is widely used to record output pairs from Maps and Reduce, however I'm not sure if it can be used anywhere else and what exactly happens when I use the context. Is it an Iterator with a different name?

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

Can someone explain this, starting with the terms Layman, and then going into detail. Failed to understand much of the Hadoop API documentation.

Thanks for your time and help.

+6
source share
2 answers

Context Object: Allows Mapper / Reducer to interact with the rest of the Hadoop system. It includes configuration data for the job, as well as interfaces that allow it to provide output.

Applications can use context:

  • report on progress
  • to set application level status messages
  • Update counters
  • indicate that they are alive
  • to get the values ​​that are stored in the job configuration by the display / decrease phase.
+4
source

The new API makes extensive use of context objects that allow user code to interact with the MapRduce system.

It combines the roles of JobConf , OutputCollector, and Reporter from the old API.

+2
source

Source: https://habr.com/ru/post/978249/


All Articles