Meaning of context.getconfiguration in hadoop Meaning of context.getconfiguration in hadoop hadoop hadoop

Meaning of context.getconfiguration in hadoop


I don't know how you have written your driver program. But in my experience,If you are trying to get system property either by using -D option from the command line or by System.setproperty method by default these values will be set to context configuration.

Configurations are specified by resources. A resource contains a set of name/value pairs as XML data. Each resource is named by either a String or by a Path. If named by a String, then the classpath is examined for a file with that name. If named by a Path, then the local filesystem is examined directly, without referring to the classpath.

Unless explicitly turned off, Hadoop by default specifies two resources, loaded in-order from the classpath: core-default.xml : Read-only defaults for hadoop. core-site.xml: Site-specific configuration for a given hadoop installation. Applications may add additional resources, which are loaded subsequent to these resources in the order they are added.

Please see this answer as well

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:

  • to report progress
  • to set application-level status messages
  • update Counters
  • indicate they are alive
  • to get the values that are stored in job configuration across map/reduce phase.