A context object is used in Hadoop, along with the mapper class, as a means of communication with the other parts of the system. System configuration details and jobs present in the constructor are obtained easily using the context object.
It is also used to send information to methods such as setup(), cleanup(), and map().