Hadoop provides a utility called Distributed Cache to improve the performance of jobs by caching the files used by applications.
An application can specify which file it wants to cache by using JobConf configuration.
Hadoop framework copies these files to the nodes one which a task has to be executed. This is done before the start of execution of a task.
DistributedCache supports distribution of simple read only text files as well as complex files like jars, zips etc.