In the Hadoop API documentation it\'s given
that
setJarByClass
public void setJarByClass(Class> cls)
Set the Jar by finding where a give
This method sets the jar file in which each node will look for the Mapper and Reducer classes.
It does not create a jar from the given class. Rather, it identifies the jar containing the given class. And yes, that jar file is "executed" (really the Mapper and Reducer in that jar file are executed) for the MapReduce job.
(Also see Stanley Xu's answer to a similar question about the need for this method since you give the jar on the command line)