Hadoop Interview Questions and Answers for beginners

What happens in textformat?

In textformat every line in the text file is a record. The value is the content of the line while key is the byte offset of the line. For example, Key: longWritable, Value:text

What is the use of Context object?

The Context object provides the mapper to impress with the rest of the Hadoop system. It includes configuration data for the job as well as interfaces which provide it to emit output.

What happens if numbers of reducers are zero?

In this situation the outputs of the map-tasks go directly to the FileSystem, convert the output path set by setOutputPath(Path). Hadoop frameworks do not sort the map outputs before writing them out to the FileSystem.

How many methods of JobTracker can run on a Hadoop Cluster?

Only one method of JobTracker can run on a Hadoop Cluster.

What is TaskInstance?

The TaskInstaces are the real MapReduce jobs which run on every slave node. TaskTracker starts a separate Java Virtual Machine (JVM) processes to do the real work is known as TaskInstance. The TaskInstance runs on its own JVM process.

Can Reducer talk with each other?

No, Reducer runs in isolation.

What command to create a directory in HDFS via FS shell?

The  commands to create a directory in HDFS via FS shell are:

bin/hadoop dfs-mkdir/<directory_name>

What are the advanced  features of HDFS?

  • Files  are stored as blocks
  • Provides reliability through replication
  • Block is stored on slave nodes
  • Operates on top of an existing file system
  • Single NameNode daemon stores metadata and co-ordinates access