Hadoop Interview Questions and Answers
Experienced / Expert level questions & answers
Ques 1. What is WebDAV in Hadoop?
WebDAV is a set of extension to HTTP which is used to support editing and uploading files. On most operating system WebDAV shares can be mounted as filesystems, so it is possible to access HDFS as a standard filesystem by exposing HDFS over WebDAV.
Ques 2. What is Sqoop in Hadoop?
Sqoop is a tool used to transfer data between the Relational Database Management System (RDBMS) and Hadoop HDFS. By using Sqoop, you can transfer data from RDBMS like MySQL or Oracle into HDFS as well as exporting data from HDFS file to RDBMS.
Ques 3. What are the functionalities of JobTracker?
These are the main tasks of JobTracker:
- To accept jobs from the client.
- To communicate with the NameNode to determine the location of the data.
- To locate TaskTracker Nodes with available slots.
- To submit the work to the chosen TaskTracker node and monitors the progress of each task.
Ques 4. Define TaskTracker. What is TaskTracker in Hadoop?
TaskTracker is a node in the cluster that accepts tasks like MapReduce and Shuffle operations from a JobTracker.
Ques 5. What is Map/Reduce job in Hadoop?
Map/Reduce job is a programming paradigm which is used to allow massive scalability across the thousands of server.
MapReduce refers to two different and distinct tasks that Hadoop performs. In the first step maps jobs which takes the set of data and converts it into another set of data and in the second step, Reduce job. It takes the output from the map as input and compresses those data tuples into the smaller set of tuples.
Ques 6. What is "map" and what is "reducer" in Hadoop?
Map: In Hadoop, a map is a phase in HDFS query solving. A map reads data from an input location and outputs a key-value pair according to the input type.
Reducer: In Hadoop, a reducer collects the output generated by the mapper, processes it, and creates a final output of its own.
Ques 7. What is shuffling in MapReduce?
Shuffling is a process which is used to perform the sorting and transfer the map outputs to the reducer as input.
Ques 8. What is NameNode in Hadoop?
NameNode is a node, where Hadoop stores all the file location information in HDFS (Hadoop Distributed File System). We can say that NameNode is the centerpiece of an HDFS file system which is responsible for keeping the record of all the files in the file system, and tracks the file data across the cluster or multiple machines.
Ques 9. What is heartbeat in HDFS?
Heartbeat is a signal which is used between a data node and name node, and between task tracker and job tracker. If the name node or job tracker doesn't respond to the signal then it is considered that there is some issue with data node or task tracker.
Ques 10. How is indexing done in HDFS?
There is a very unique way of indexing in Hadoop. Once the data is stored as per the block size, the HDFS will keep on storing the last part of the data which specifies the location of the next part of the data.
Ques 11. What happens when a data node fails?
If a data node fails the job tracker and name node will detect the failure. After that, all tasks are re-scheduled on the failed node and then name node will replicate the user data to another node.
Ques 12. What is Hadoop Streaming?
Hadoop streaming is a utility which allows you to create and run map/reduce job. It is a generic API that allows programs written in any languages to be used as Hadoop mapper.
Ques 13. What is a combiner in Hadoop?
A Combiner is a mini-reduce process which operates only on data generated by a Mapper. When Mapper emits the data, combiner receives it as input and sends the output to a reducer.
Ques 14. What are the network requirements for using Hadoop?
Following are the network requirement for using Hadoop:
- Password-less SSH connection.
- Secure Shell (SSH) for launching server processes.
Ques 15. What do you know by storage and compute node?
Storage node: Storage Node is the machine or computer where your file system resides to store the processing data.
Compute Node: Compute Node is a machine or computer where your actual business logic will be executed.
Ques 16. Is it necessary to know Java to learn Hadoop?
If you have a background in any programming language like C, C++, PHP, Python, Java, etc. It may be really helpful, but if you are nil in java, it is necessary to learn Java and also get the basic knowledge of SQL.
Ques 17. How to debug Hadoop code?
There are many ways to debug Hadoop codes but the most popular methods are:
- By using Counters.
- By web interface provided by the Hadoop framework.
Ques 18. Is it possible to provide multiple inputs to Hadoop? If yes, explain.
Yes, It is possible. The input format class provides methods to insert multiple directories as input to a Hadoop job.
Ques 19. What is the relation between job and task in Hadoop?
In Hadoop, A job is divided into multiple small parts known as the task.
Ques 20. What is the difference between Input Split and HDFS Block?
The Logical division of data is called Input Split and physical division of data is called HDFS Block.
Ques 21. What is the difference between HDFS and NAS?
HDFS data blocks are distributed across local drives of all machines in a cluster whereas, NAS data is stored on dedicated hardware.
Ques 22. What is the difference between Hadoop and other data processing tools?
Hadoop facilitates you to increase or decrease the number of mappers without worrying about the volume of data to be processed.
Ques 23. What is distributed cache in Hadoop?
Distributed cache is a facility provided by MapReduce Framework. It is provided to cache files (text, archives etc.) at the time of execution of the job. The Framework copies the necessary files to the slave node before the execution of any task at that node.
Ques 24. What is the functionality of JobTracker in Hadoop? How many instances of a JobTracker run on Hadoop cluster?
JobTracker is a giant service which is used to submit and track MapReduce jobs in Hadoop. Only one JobTracker process runs on any Hadoop cluster. JobTracker runs it within its own JVM process.
Functionalities of JobTracker in Hadoop:
- When client application submits jobs to the JobTracker, the JobTracker talks to the NameNode to find the location of the data.
- It locates TaskTracker nodes with available slots for data.
- It assigns the work to the chosen TaskTracker nodes.
- The TaskTracker nodes are responsible to notify the JobTracker when a task fails and then JobTracker decides what to do then. It may resubmit the task on another node or it may mark that task to avoid.
Most helpful rated by users: