Professional Documents
Culture Documents
Hadoop Administration Interview Questions and Answers: 40% Career Booster Discount On All Course - Call Us Now 9019191856
Hadoop Administration Interview Questions and Answers: 40% Career Booster Discount On All Course - Call Us Now 9019191856
Login / Register
DIGITAL
SEARCH
PREVIOUS ARTICLE
API Interview Questions And Answers
NEXT ARTICLE
Cassandra Interview Question and Answers
BY VENKATESAN M
1) How will you decide whether you need to use the Capacity Scheduler or the Fair
Scheduler?
Fair Scheduling is the process in which resources are assigned to jobs such that all jobs get to
share equal number of resources over time. Fair Scheduler can be used under the following
circumstances –
1. i) If you wants the jobs to make equal progress instead of following the FIFO order then you must
use Fair Scheduling.
2. ii) If you have slow connectivity and data locality plays a vital role and makes a significant difference
to the job runtime then you must use Fair Scheduling.
iii) Use fair scheduling if there is lot of variability in the utilization between pools.
Capacity Scheduler allows runs the hadoop mapreduce cluster as a shared, multi-tenant cluster
to maximize the utilization of the hadoop cluster and throughput.Capacity Scheduler can be
40% CAREER BOOSTER DISCOUNT ✕
used under the following circumstances –
Call Us Now ! 9019191856
1. i) If the jobs require scheduler detrminism then Capacity Scheduler can be useful.
Avail
2. ii) CS’s memory based scheduling Now.isLimited
method useful if Period
the jobsOffer.
have varying memory requirements.
40% CAREER BOOSTER DISCOUNT ON ALL COURSE - CALL US NOW 9019191856 ×
iii) If you want to enforce resource allocation because you know very well about the cluster
utilization and workload then use Capacity Scheduler.
The easiest way of doing this is to run the command to stop running shell script i.e. click on stop-
all.sh. Once this is done, restarts the NameNode by clicking on start-all.sh.
• FIFO Scheduler – This scheduler does not consider the heterogeneity in the system but orders the
jobs based on their arrival times in a queue.
• COSHH- This scheduler considers the workload, cluster and the user heterogeneity for scheduling
decisions.
• Fair Sharing-This Hadoop scheduler defines a pool for each user. The pool contains a number of map
and reduce slots on a resource. Each user can use their own pool to execute the jobs.
5) List few Hadoop shell commands that are used to perform a copy operation.
• fs –put
• fs –copyToLocal
• fs –copyFromLocal
7) What are the important hardware considerations when deploying Hadoop in production
environment?
• Memory-System’s memory requirements will vary between the worker services and management
services based on the application.
• Operating System – a 64-bit operating system avoids any restrictions to be imposed on the amount
of memory that can be used on worker nodes.
• Storage- It is preferable to design a Hadoop platform by moving the compute activity to data to
achieve scalability and high performance.
• Capacity- Large Form Factor (3.5”) disks cost less and allow to store more, when compared to Small
Form Factor disks.
• Network – Two TOR switches per rack provide better redundancy.
• Computational Capacity- This can be determined by the total number of MapReduce slots available
across all the nodes within a Hadoop cluster.
Only one.
9) What happens when the NameNode on the Hadoop cluster goes down?
10) What is the conf/hadoop-env.sh file and which variable in the file should be set for
Hadoop to work?
This file provides an environment for Hadoop to run and consists of the following variables-
40% CAREER BOOSTER
HADOOP_CLASSPATH, DISCOUNT
JAVA_HOME and HADOOP_LOG_DIR. JAVA_HOME variable should be ✕
setUs
Call forNow
Hadoop to run.
! 9019191856
11) Apart from using the jps command is there any other way that you can check whether
the NameNode is working or not.
12) In a MapReduce system, if the HDFS block size is 64 MB and there are 3 files of size
127MB, 64K and 65MB with FileInputFormat. Under this scenario, how many input splits are
likely to be made by the Hadoop framework.
2 splits each for 127 MB and 65 MB files and 1 split for the 64KB file.
13) Which
40% command
CAREER is usedDISCOUNT
BOOSTER to verify if the HDFS is corrupt or not? ✕
Call Us Now
Hadoop ! 9019191856
FSCK (File System Check) command is used to check missing blocks.
Avail Now.
14) List some use cases of the Hadoop Limited Period Offer.
Ecosystem
40% CAREER BOOSTER DISCOUNT ON ALL COURSE - CALL US NOW 9019191856 ×
15) How can you kill a Hadoop job?
16) I want to see all the jobs running in a Hadoop cluster. How can you do this?
Using the command – Hadoop job –list, gives the list of jobs running in a Hadoop cluster.
17) Is it possible to copy files across multiple clusters? If yes, how can you accomplish this?
Yes, it is possible to copy files across multiple Hadoop clusters and this can be achieved using
distributed copy. DistCP command is used for intra or inter cluster copying.
Ubuntu or Linux is the most preferred operating system to run Hadoop. Though Windows OS can
also be used to run Hadoop but it will lead to several problems and is not recommended.
20) The mapred.output.compress property is set to true, to make sure that all output files
are compressed for efficient space usage on the Hadoop cluster. In case under a particular
condition if a cluster user does not require compressed data for a job. What would you
suggest that he do?
If the user does not want to compress the data for a particular job then he should create his own
configuration file and set the mapred.output.compress property to false. This configuration file
then should be loaded as a resource into the job.
40% CAREER BOOSTER DISCOUNT ✕
The NameNode should never be reformatted. Doing so will result in complete data loss.
NameNode is formatted only once at the beginning after which it creates the directory structure
for file system metadata and namespace ID for the entire file system.
23) If Hadoop spawns 100 tasks for a job and one of the job fails. What does Hadoop do?
The task will be started again on a new TaskTracker and if it fails more than 4 times which is the
default setting (the default value can be changed), the job will be killed.
24) How can you add and remove nodes from the Hadoop cluster?
• To add new nodes to the HDFS cluster, the hostnames should be added to the slaves file and then
DataNode and TaskTracker should be started on the new node.
• To remove or decommission nodes from the HDFS cluster, the hostnames should be removed from
the slaves file and –refreshNodes should be executed.
40% CAREER BOOSTER DISCOUNT ✕
25) You increase the replication level but notice that the data is under replicated. What
Call Us Now ! 9019191856
could have gone wrong?
The configuration files are located in “conf” sub directory. Hadoop has 3 different Configuration
files- hdfs-site.xml, core-site.xml and mapred-site.xml
Which operating system(s) are supported for production Hadoop deployment? | Hadoop admin
questions
The namenode is the “brain” of the Hadoop cluster and responsible for managing the distribution
blocks on the system based on the replication policy. The namenode also supplies the specific
addresses for the data based on the client requests.
29)What happen on the namenode when a client tries to read a data file? | Hadoop admin
questions
The namenode will look up the information about file in the edit file and then retrieve the
remaining information from filesystem memory snapshot<br>
Since the namenode needs to support a large number of the clients, the primary namenode will
only send information back for the data location. The datanode itselt is responsible for the
retrieval.
30)What are the hardware requirements for a Hadoop cluster (primary and secondary
namenodes and datanodes)?
There are no requirements for datanodes. However, the namenodes require a specified amount
of RAM to store filesystem image in memory Based on the design of the primary namenode and
secondary namenode, entire filesystem information will be stored in memory. Therefore, both
40% CAREER
namenodes needBOOSTER DISCOUNT
to have enough memory to contain the entire filesystem image. ✕
31)What mode(s) can Hadoop code be run in? | Hadoop admin questions
Hadoop was specifically designed to be deployed on multi-node cluster. However, it also can be
deployed on single machine and as a single process for testing purposes
Deploy namenode and jobtracker on the master node, and deploy datanodes and taskstrackers
on multiple slave nodes
There is a need for only one namenode and jobtracker on the system. The number of datanodes
depends on the available hardware
No, there are some differences between various distributions. However, they all require that
Avail Now. Limited Period Offer.
Hadoop jars be installed on the machine<br>
40% CAREER BOOSTER DISCOUNT ON ALL COURSE - CALL US NOW 9019191856 ×
There are some common requirements for all Hadoop distributions but the specific procedures
will be different for different vendors since they all have some degree of proprietary software.
Secondary namenode performs CPU intensive operation of combining edit logs and current
filesystem snapshots.
The secondary namenode was separated out as a process due to having CPU intensive
operations and additional requirements for metadata back-up.
36)What are the side effects of not running a secondary name node?
The cluster performance will degrade over time since edit log will grow bigger and bigger<br>
If the secondary namenode is not running at all, the edit log will grow significantly and it will
slow the system down. Also, the system will go into safemode for an extended time since the
namenode needs to combine the edit log and the current filesystem checkpoint image.
The namenode will detect that a datanode is not responsive and will start replication of the data
from remaining replicas. When datanode comes back online, the extra replicas will be
The replication factor is actively maintained by the namenode. The namenode monitors the
status of all datanodes and keeps track which blocks are located on that node. The moment the
datanode is not avaialble it will trigger replication of the data from the existing replicas.
However, if the datanode comes back up, overreplicated data will be deleted. Note: the data
might be deleted from the original datanode.
The task
40% execution
CAREER will be as DISCOUNT
BOOSTER fast as the slowest worker. However, if speculative execution is ✕
enabled,
Call the
Us Now slowest worker will not have such big impact
! 9019191856
Hadoop was specifically designed to work with commodity hardware. The speculative execution
Avail Now. Limited Period Offer.
helps to offset the slow workers. The multiple instances of the same task will be created and job
tracker will take the first result into consideration and the second instance of the task will be
40% CAREER BOOSTER DISCOUNT ON ALL COURSE - CALL US NOW 9019191856 ×
39)What is speculative execution?
If speculative execution is enabled, the job tracker will issue multiple instances of the same task
on multiple nodes and it will take the result of the task that finished first. The other instances of
the task will be killed.
The speculative execution is used to offset the impact of the slow workers in the cluster. The
jobtracker creates multiple instances of the same task and takes the result of the first successful
task. The rest of the tasks will be discarded.
40)After increasing the replication level, I still see that data is under replicated. What could
be wrong?
Data replication takes time due to large quantities of data. The Hadoop administrator should
allow sufficient time for data replication<br>
Depending on the data size the data replication will take some time. Hadoop cluster still needs
to copy data around and if data size is big enough it is not uncommon that replication will take
from a few minutes to a few hours.
41)How many racks do you need to create an Hadoop cluster in order to make sure that the
cluster operates reliably?
In order to ensure a reliable operation it is recommended to have at least 2 racks with rack
40% CAREER BOOSTER DISCOUNT ✕
placement configured.
Call Us Now ! 9019191856
Hadoop has a built-in rack awareness mechanism that allows data distribution between different
Avail Now. Limited Period Offer.
racks based on the configuration.
40% CAREER BOOSTER DISCOUNT ON ALL COURSE - CALL US NOW 9019191856 ×
Yes, the namenode holds information about all files in the system and needs to be extra reliable.
The namenode is a single point of failure. It needs to be extra reliable and metadata need to be
replicated in multiple places. Note that the community is working on solving the single point of
failure issue with the namenode.
43)If you have a file 128M size and replication factor is set to 3, how many blocks can you
find on the cluster that will correspond to that file (assuming the default apache and
cloudera configuration)?
Based on the configuration settings the file will be divided into multiple blocks according to the
default block size of 64M. 128M / 64M = 2 . Each block will be replicated according to replication
factor settings (default 3). 2 * 3 = 6 .
Distcp is a Hadoop utility for launching MapReduce jobs to copy data. The primary usage is for
copying a large amount of data
One of the major challenges in the Hadoop enviroment is copying data across multiple clusters
and distcp will allow multiple datanodes to be leveraged for parallel copying of the data.
Distcp is a Hadoop utility for launching MapReduce jobs to copy data. The primary usage is for
copying a large amount of data
One of the major challenges in the Hadoop enviroment is copying data across multiple clusters
and distcp will allow multiple datanodes to be leveraged for parallel copying of the data.
Replication
40% CAREER factor controls how
BOOSTER many times each individual block can be replicated .
DISCOUNT ✕
Hadoop is comprised of five separate daemons and each of these daemon run in its own JVM.
NameNode, Secondary NameNode and JobTracker run on Master nodes. DataNode and
TaskTracker run on each Slave nodes.
Rack awareness is the way in which the namenode decides how to place blocks based on the
rack definitions
Hadoop will try to minimize the network traffic between datanodes within the same rack and
will only contact remote racks if it has to. The namenode is able to control this due to rack
awareness.
The jobtracker is responsible for scheduling tasks on slave nodes, collecting results, retrying
failed tasks
The job tracker is the main component of the map-reduce execution. It control the division of
the job into smaller tasks, submits tasks to individual tasktracker, tracks the progress of the jobs
and reports results back to calling code.
Since Hadoop is design to run on commodity hardware, the datanode failures are expected.
Namenode keeps track of all available datanodes and actively maintains replication factor on all
data.
The namenode actively tracks the status of all datanodes and acts immediately if the datanodes
become non-responsive. The namenode is the central “brain” of the HDFS and starts replication
40%
of theCAREER BOOSTER
data the moment DISCOUNT
a disconnect is detected.] ✕
50)Web-UI shows that half of the datanodes are in decommissioning mode. What does that
mean? Is it safe to remove those nodes from the network?
This means that namenode is trying retrieve data from those datanodes by moving replicas to
remaining datanodes. There is a possibility that data can be lost if administrator removes those
datanodes before decomissioning finished .
Due to replication strategy it is possible to lose some data due to datanodes removal en masse
prior to completing the decommissioning process. Decommissioning refers to namenode trying
to retrieve data from datanodes by moving replicas to remaining datanodes.
51)What does the Hadoop administrator have to do after adding new datanodes to the
Hadoop cluster?
Since the new nodes will not have any data on them, the administrator needs to start the
balancer to redistribute data evenly between all nodes.
Hadoop cluster will detect new datanodes automatically. However, in order to optimize the
40% CAREER BOOSTER DISCOUNT ✕
cluster performance it is recommended to start rebalancer to redistribute the data between
Call Us Now !evenly.
datanodes 9019191856
Correct Answer is A – Each node in the Hadoop cluster has its own configuration files and the
changes needs to be made in every file. One of the reasons for this is that configuration can be
different for every node.
53)Map Reduce jobs are failing on a cluster that was just restarted. They worked before
restart. What could be wrong?
The cluster is in a safe mode. The administrator needs to wait for namenode to exit the safe
mode before restarting the jobs again
This is a very common mistake by Hadoop administrators when there is no secondary namenode
on the cluster and the cluster has not been restarted in a long time. The namenode will go into
safemode and combine the edit log and current file system timestamp
Reviewer Vicky
40% CAREER BOOSTER DISCOUNT ON ALL COURSE - CALL US NOW 9019191856 ×
Reviewed Item This interview Question were useful in interview preparation.Thank
you.
Author Rating
Share
R E CO M M E N D E D P O S T S
TAGS
angularjs interview questions automation testing with python aws aws interview questions
Data Science Interview Question Digital Marketing Digital Marketing Interview questions
ios interview questions and answers magento interview questions mongo db interview questions
40% CAREER BOOSTER DISCOUNT ✕
node js
Call Us Nownode js interview
! 9019191856 questions oracle scm oracle scm interview questions pentaho bi
tableau interview questions TCL Interview Questions and Answers-2017 testing with python
Typo3 cms Typo3 cms interview questions web design web design interview questions
CATEGORIES
Digital Marketing
Work
SOCIAL
10P, IWWA Building, 2nd Floor,7th Main Road, BTM Layout 2nd Stage,Bangalore-
560076,Karnataka, India
[email protected]
[email protected]
+91 9019191856
+1 (209) 222-4733 (USA)
ABOUT US
myTectra a global learning solutions company helps transform people and organization to gain
real, lasting benefits.Join Today.Ready to Unlock your Learning Potential !
40% CAREER BOOSTER DISCOUNT ✕
Become a Trainer
Privacy Policy
Contact Us
SERVICES
IT Services
Corporate Training
Government Training
University Training
Online Self-Learning
NEWSLETTER SIGNUP
Get an email of every new post! We will never share your address.
Example: [email protected]