In Hadoop, when we are dealing with Big Data Systems, then the size of data is huge. Therefore, it is not a good practice to move this large amount of data across the network otherwise it may impact the system output and also causes network congestion.   In order to get rid of these above problems, Hadoop uses the concept of Data Locality. Briefly we can say that, it is the process of moving the computation towards the data rather than doing the opposite process of moving huge amount of data. In this way, data always remain local to storage locations. So, when a user runs a MapReduce job, then the code present in MapReduce is sent by NameNodes to DataNodes that contains the data related to MapReduce job.