SlideShare a Scribd company logo
Bridging	
  Technology	
  Gap 	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  
	
  Hadoop	
  Administra9on	
  
By	
  Gurmukh	
  Singh	
  
Module	
  6:	
  High	
  Availability	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  
Key	
  Points	
  from	
  Module	
  5:	
  
	
  
Hadoop	
  2.0	
  and	
  YARN	
  Advantages	
  
Hadoop	
  2.0	
  directory	
  structure	
  and	
  changes.	
  
The	
  YARN	
  Work	
  Flow	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  
	
   	
  
	
  
Agenda:	
  
	
  
• 	
  Hadoop	
  2.0	
  and	
  YARN	
  
• 	
  YARN	
  flow	
  
• 	
  Setup	
  HA	
  using	
  Shared	
  Storage	
  and	
  Zookeeper.	
  	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  2.0	
  Setup	
  differences	
  
-­‐  The	
  configuraIon	
  files	
  locaIon	
  has	
  now	
  moved	
  to	
  “$HADOOP_HOME/etc/hadoop”	
  
-­‐  The	
  jar	
  are	
  now	
  located	
  at	
  “$HADOOP_HOME/share/hadoop/mapreduce/*example.jar”	
  
-­‐  The	
  locaIon	
  for	
  admin	
  binaries	
  is	
  now	
  at	
  “$HADOOP_HOME/sbin”	
  
-­‐  Jobtracker/tasktracker	
  have	
  been	
  upgraded	
  to	
  Resource/Node	
  Manager.	
  
-­‐  There	
  is	
  no	
  “hadoop-­‐daemon.sh	
  start	
  resourcemanger”	
  command,	
  it	
  is	
  upgraded	
  to	
  yarn	
  command	
  line.	
  
-­‐  The	
  Job	
  execuIon	
  is	
  done	
  by	
  YARN	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  2.0	
  Cluster	
  Setup	
   hdfs-­‐site.xml	
  
	
  
<property>	
  
<name>dfs.namenode.name.dir</name>	
  
<value>file:/data/namenode</value>	
  
</property>	
  
core-­‐site.xml	
  
	
  
<configura9on>	
  
<property>	
  
<name>fs.defaultFS</name>	
  
<value>hdfs://ha-­‐nn1.hacluster1.com:9000</value>	
  
</property>	
  
</configura9on>	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
yarn-­‐site.xml	
  
	
  
<property>	
  
<name>yarn.nodemanager.aux-­‐services</name>	
  
<value>mapreduce_shuffle</value>	
  
</property>	
  
	
  
<property>	
  
<name>yarn.nodemanager.aux-­‐
services.mapreduce.shuffle.class</name>	
  
<value>org.apache.hadoop.mapred.ShuffleHandler</value>	
  
</property>	
  
	
  
Hadoop	
  2.0	
  Distributed	
  Setup	
  
mapred-­‐site.xml	
  
	
  
<property>	
  
<name>mapreduce.framework.name</
name><value>yarn</value>	
  
</property>	
  
	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  2.0	
  Distributed	
  Setup	
  
	
  
	
  
	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  DEMO	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Job	
  Tracker	
  Disadvantages:	
  
	
  
• 	
  Is	
  single	
  point	
  of	
  failure.	
  
• 	
  JobTracker	
  is	
  heavy	
  loaded.	
  
•  Does	
  resource	
  Management	
  
•  Job	
  Scheduling	
  
•  Takes	
  care	
  of	
  job	
  failures	
  and	
  recreaIon	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
YARN	
  –	
  Yet	
  another	
  resource	
  nego9ator	
  
	
  
	
  
Firstly,	
  Yarn	
  and	
  MRv2	
  are	
  not	
  the	
  same	
  thing.	
  
Each	
  job	
  controls	
  its	
  own	
  desIny.	
  
Responsible	
  for	
  Cluster	
  resource	
  Management	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
YARN	
  components	
  
	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
YARN	
  Flow	
  
	
  
• 	
  Client	
  submits	
  job	
  and	
  with	
  the	
  help	
  of	
  ResourceManager	
  gets	
  a	
  ApplicaIon	
  ID.	
  
• 	
  RM	
  chooses	
  a	
  NodeManager	
  with	
  available	
  resources	
  and	
  requests	
  MR	
  App	
  Master.	
  
• 	
  Node	
  Manager	
  allocates	
  container	
  for	
  the	
  Master	
  and	
  the	
  assigns	
  MR	
  job	
  to	
  it.	
  
• 	
  Splits	
  are	
  read	
  from	
  the	
  HDFS	
  by	
  the	
  MRApp	
  Master.	
  
• 	
  MRApp	
  Master	
  again	
  negoIates	
  with	
  Resource	
  Manager	
  to	
  find	
  the	
  node	
  with	
  maximum	
  resources.	
  
• 	
  MRApp	
  Master	
  assigns	
  the	
  map/reduces	
  tasks	
  on	
  that	
  parIcular	
  NodeManager.	
  
• 	
  NodeManager	
  creates	
  Yarnchild	
  to	
  execute	
  the	
  jobs.	
  
• 	
  Yarnchild	
  executes	
  the	
  map	
  and	
  reduce	
  task	
  aZer	
  acquiring	
  the	
  resources	
  from	
  HDFS.	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
YARN	
  components	
  
	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
YARN	
  Flow	
  
	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  HA	
  -­‐	
  HDFS	
  
	
  
Namenode	
  is	
  a	
  single	
  point	
  of	
  failure,	
  what	
  if	
  it	
  fails	
  ?	
  
	
  
We	
  will	
  have	
  outage,	
  and	
  someImes	
  data	
  loss	
  due	
  to	
  corrupIon.	
  
How	
  quickly	
  we	
  can	
  do	
  the	
  switch	
  if	
  needed.	
  
Whether	
  the	
  switch	
  is	
  a	
  manual	
  failover	
  or	
  AutomaIc	
  failover.	
  
	
  
Lets	
  look	
  at	
  all	
  the	
  above	
  ques9ons.	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  HA	
  –	
  using	
  shared	
  NFS	
  
	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  HA	
  –	
  using	
  shared	
  NFS	
  
	
  
	
  
	
  
	
  
	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  DEMO	
  
	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  HA	
  -­‐	
  HDFS	
  
	
  
Using	
  Zookeeper	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  HA	
  -­‐	
  HDFS	
  
	
  
Using	
  Zookeeper	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  HA	
  -­‐	
  HDFS	
  
	
  
Using	
  Zookeeper	
  
docs.hortonworks.com	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Zookeeper	
  
ZooKeeper	
   is	
   a	
   centralized	
   service	
   for	
   maintaining	
   configuraIon	
   informaIon,	
   naming,	
   providing	
   distributed	
  
synchronizaIon,	
  and	
  providing	
  group	
  services	
  
	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Zookeeper	
  Configura9on	
  
9ckTime=2000	
  
#	
  The	
  number	
  of	
  Icks	
  that	
  the	
  iniIal	
  	
  
#	
  synchronizaIon	
  phase	
  can	
  take	
  
initLimit=10	
  
#	
  The	
  number	
  of	
  Icks	
  that	
  can	
  pass	
  between	
  	
  
#	
  sending	
  a	
  request	
  and	
  ge`ng	
  an	
  acknowledgement	
  
syncLimit=5	
  
dataDir=/tmp/zookeeper	
  
#	
  the	
  port	
  at	
  which	
  the	
  clients	
  will	
  connect	
  
clientPort=2181	
  
#	
  
server.1=192.168.1.70:2888:3888	
  
server.2=192.168.1.71:2888:3888	
  
server.3=192.168.1.69:2888:3888	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
•  Make	
  sure	
  zookeeper	
  is	
  up	
  and	
  coordinaIng.	
  
•  Start	
  journal	
  nodes.	
  
•  Format	
  the	
  Namenode	
  
•  Format	
  the	
  zkFC	
  
Hadoop	
  2.0	
  HA	
  Setup	
  using	
  QJM	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
	
   	
   	
   	
   	
   	
  DEMO	
  
Hadoop	
  2.0	
  HA	
  Setup	
  using	
  QJM	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  2.0	
  Setup	
  
	
  
	
  
	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  DEMO	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  Upgrade	
  
	
  
1.	
  hadoop	
  dfsadmin	
  -­‐upgradeProgress	
  status	
  
2.	
  Stop	
  all	
  client	
  applicaIons	
  running	
  on	
  the	
  MapReduce	
  cluster.	
  
3.	
  Perform	
  a	
  filesystem	
  check	
  	
  
	
  hadoop	
  fsck	
  /	
  -­‐files	
  -­‐blocks	
  -­‐loca9ons	
  >	
  dfs-­‐v-­‐old-­‐fsck-­‐1.log 	
  	
  
4.	
  Save	
  a	
  complete	
  lisIng	
  of	
  the	
  HDFS	
  namespace	
  to	
  a	
  local	
  file	
  
	
  hadoop	
  dfs	
  -­‐lsr	
  /	
  >	
  dfs-­‐v-­‐old-­‐lsr-­‐1.log 	
  	
  
5.	
  Create	
  a	
  list	
  of	
  DataNodes	
  parIcipaIng	
  in	
  the	
  cluster:	
  
	
  hadoop	
  dfsadmin	
  -­‐report	
  >	
  dfs-­‐v-­‐old-­‐report-­‐1.log 	
  	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Hadoop	
  Upgrade	
  
	
  	
  
6.	
  OpIonally	
  backup	
  HDFS	
  data	
  
7.	
  Upgrade	
  process:	
  
	
  Point	
  to	
  the	
  new	
  directory,	
  update	
  environment	
  variables. 	
  	
  
8.	
  hadoop-­‐daemon.sh	
  start	
  namenode	
  -­‐upgrade	
  
9.	
  hadoop	
  dfsadmin	
  -­‐upgradeProgress	
  status	
  
10.	
  Now	
  start	
  the	
  datanode,	
  aZer	
  poinIng	
  to	
  the	
  new	
  hadoop	
  directory	
  
11.	
  hadoop	
  dfsadmin	
  -­‐safemode	
  get	
  
12.	
  hadoop	
  dfsadmin	
  -­‐finalizeUpgrade	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  
	
  
	
  
	
  
Further	
  Readings:	
  
	
  
-­‐  hnp://hadoop.apache.org/docs/r2.7.0/hadoop-­‐project-­‐dist/hadoop-­‐hdfs/HDFSHighAvailabilityWithQJM.html	
  
-­‐  hnps://hadoop.apache.org/docs/stable/hadoop-­‐project-­‐dist/hadoop-­‐hdfs/HDFSHighAvailabilityWithNFS.html	
  
	
  
GitHub:	
  hnps://github.com/netxillon/hadoop/tree/master/HA_QJM	
  
	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  
	
  
Further	
  Reading:	
  
	
  
	
  
• 	
  hnps://hadoop.apache.org/docs/r1.2.1/hdfs_design.html	
  
• 	
  hnp://www.aosabook.org/en/hdfs.html	
  
	
   	
   	
   	
   	
  	
  
	
  
	
  
	
  
	
   	
   	
   	
   	
   	
   	
  	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  
	
   	
  
	
  
Topics	
  for	
  Next	
  Class:	
  
	
  
• 	
  Hive,	
  HBASE,	
  PIG	
  
• 	
  Sqoop,	
  Flume	
  
Hadoop	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  
	
  
Pre-­‐Readings	
  before	
  the	
  next	
  class:	
  
	
  
	
  
• 	
  hnps://hbase.apache.org/	
  
• 	
  hnp://hortonworks.com/hadoop/hive/	
  
• 	
  hnps://hive.apache.org/	
  
• 	
  hnps://pig.apache.org/	
  
	
  
	
  
	
   	
   	
   	
   	
  	
  
  	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  
	
  
	
  
	
  
	
   	
   	
   	
   	
   	
   	
  	
  
	
  
	
   	
   	
   	
   	
   	
   	
  Any	
  Ques9ons	
  ?	
  
	
  
	
  	
  
	
   	
   	
   	
   	
   	
   	
   	
  	
  
	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  
  	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Netxillon	
  Technologies	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  
	
  
GitHub: https://github.com/netxillon/hadoop	
  
	
  
	
   	
   	
   	
   	
   	
   	
  	
  
	
  
	
   	
   	
   	
   	
   	
   	
  Thanks	
  !	
  
	
  
	
  	
  
	
   	
   	
   	
   	
   	
   	
   	
  	
  
	
  
	
   	
   	
   	
   	
   	
   	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  trainings@netxillon.com	
  

More Related Content

PDF
Troubleshooting Hadoop: Distributed Debugging
PDF
Chemogenomics in the cloud: Is the sky the limit?
PPT
Deployment and Management of Hadoop Clusters
PPT
Advanced Hadoop Tuning and Optimization - Hadoop Consulting
PPTX
Apache Hadoop YARN: best practices
PDF
Hadoop scheduler
PDF
Hadoop Summit San Jose 2015: Towards SLA-based Scheduling on YARN Clusters
PPTX
February 2014 HUG : Pig On Tez
Troubleshooting Hadoop: Distributed Debugging
Chemogenomics in the cloud: Is the sky the limit?
Deployment and Management of Hadoop Clusters
Advanced Hadoop Tuning and Optimization - Hadoop Consulting
Apache Hadoop YARN: best practices
Hadoop scheduler
Hadoop Summit San Jose 2015: Towards SLA-based Scheduling on YARN Clusters
February 2014 HUG : Pig On Tez

What's hot (20)

PDF
Common and unique use cases for Apache Hadoop
PDF
Hadoop 101
 
PDF
Hadoop Summit Amsterdam 2014: Capacity Planning In Multi-tenant Hadoop Deploy...
PPT
Data Science Day New York: The Platform for Big Data
PPTX
YARN - Hadoop's Resource Manager
PDF
Hadoop World 2011: The Hadoop Stack - Then, Now and in the Future - Eli Colli...
PPT
ha_module5
PDF
BIGDATA- Survey on Scheduling Methods in Hadoop MapReduce
PDF
Apache Hadoop YARN
PPTX
Hadoop World 2011: Hadoop Troubleshooting 101 - Kate Ting - Cloudera
PDF
Yarns About Yarn
PPTX
Introduction to YARN and MapReduce 2
PDF
Hadoop - Disk Fail In Place (DFIP)
PDF
Drill into Drill – How Providing Flexibility and Performance is Possible
PDF
Hadoop Summit 2010 Tuning Hadoop To Deliver Performance To Your Application
PPTX
Cloudera Sessions - Clinic 1 - Getting Started With Hadoop
PPTX
Pig on Tez: Low Latency Data Processing with Big Data
PPTX
Learn Hadoop Administration
PPTX
Towards SLA-based Scheduling on YARN Clusters
PPTX
Big Data Performance and Capacity Management
Common and unique use cases for Apache Hadoop
Hadoop 101
 
Hadoop Summit Amsterdam 2014: Capacity Planning In Multi-tenant Hadoop Deploy...
Data Science Day New York: The Platform for Big Data
YARN - Hadoop's Resource Manager
Hadoop World 2011: The Hadoop Stack - Then, Now and in the Future - Eli Colli...
ha_module5
BIGDATA- Survey on Scheduling Methods in Hadoop MapReduce
Apache Hadoop YARN
Hadoop World 2011: Hadoop Troubleshooting 101 - Kate Ting - Cloudera
Yarns About Yarn
Introduction to YARN and MapReduce 2
Hadoop - Disk Fail In Place (DFIP)
Drill into Drill – How Providing Flexibility and Performance is Possible
Hadoop Summit 2010 Tuning Hadoop To Deliver Performance To Your Application
Cloudera Sessions - Clinic 1 - Getting Started With Hadoop
Pig on Tez: Low Latency Data Processing with Big Data
Learn Hadoop Administration
Towards SLA-based Scheduling on YARN Clusters
Big Data Performance and Capacity Management
Ad

Viewers also liked (19)

DOCX
Roberts professional resume 2015 final
PPTX
Prezentacja Alan Bruce
PDF
Crucigrama -Cristian
PDF
Safe in his_hands_esp_cloze
DOCX
resume job clear - Resume created by JobLens
PPT
Nuevos conceptos informaticas
PPT
Red XXI para orientadores: Funciones de los orientadores ante las TIC
PDF
Calderonmaicoll103
PDF
Jak korzystać z muzyki udostępnionej na licencjach Creative Commons na portal...
PDF
програма дні америки в полтаві
DOCX
Introducción
PPTX
Powerpoint zum Vortrag "Große Bedrängnis – Großer Glaube" in der FeG FFB von ...
PDF
5 unusual ways to improve your analytics
PDF
Tarea cuarto
PPTX
Konkurs „Najlepsze szkolne i przedszkolne przestrzenie uczenia się”
PPT
Nacionālās identitātes komunikācija sociālajos tīklos
POTX
Cilvēkdrošības pārvaldīšana krīzes apstākļos
Roberts professional resume 2015 final
Prezentacja Alan Bruce
Crucigrama -Cristian
Safe in his_hands_esp_cloze
resume job clear - Resume created by JobLens
Nuevos conceptos informaticas
Red XXI para orientadores: Funciones de los orientadores ante las TIC
Calderonmaicoll103
Jak korzystać z muzyki udostępnionej na licencjach Creative Commons na portal...
програма дні америки в полтаві
Introducción
Powerpoint zum Vortrag "Große Bedrängnis – Großer Glaube" in der FeG FFB von ...
5 unusual ways to improve your analytics
Tarea cuarto
Konkurs „Najlepsze szkolne i przedszkolne przestrzenie uczenia się”
Nacionālās identitātes komunikācija sociālajos tīklos
Cilvēkdrošības pārvaldīšana krīzes apstākļos
Ad

Similar to hadoop_module6 (20)

PPTX
Hadoop Developer
PDF
Inside the Hadoop Machine @ VMworld
PDF
App Cap2956v2 121001194956 Phpapp01 (1)
PDF
App cap2956v2-121001194956-phpapp01 (1)
PDF
Hadoop Administration Training | Hadoop Administration Tutorial | Hadoop Admi...
PDF
Setting High Availability in Hadoop Cluster
PDF
Running Hadoop as Service in AltiScale Platform
PPTX
Learn to setup a Hadoop Multi Node Cluster
PDF
Hadoop online training
PDF
Unit IV.pdf
PDF
Hadoop 2.0 handout 5.0
ODP
Hadoop2.2
PDF
Best hadoop-online-training
PDF
堵俊平:Hadoop virtualization extensions
PPTX
November 2014 HUG: Lessons from Hadoop 2+Java8 migration at LinkedIn
PPTX
HugNov14
PDF
2013 Nov 20 Toronto Hadoop User Group (THUG) - Hadoop 2.2.0
PDF
What Is Hadoop | Hadoop Tutorial For Beginners | Edureka
PDF
Hadoop Cluster on Docker Containers
PPTX
YARN - Presented At Dallas Hadoop User Group
Hadoop Developer
Inside the Hadoop Machine @ VMworld
App Cap2956v2 121001194956 Phpapp01 (1)
App cap2956v2-121001194956-phpapp01 (1)
Hadoop Administration Training | Hadoop Administration Tutorial | Hadoop Admi...
Setting High Availability in Hadoop Cluster
Running Hadoop as Service in AltiScale Platform
Learn to setup a Hadoop Multi Node Cluster
Hadoop online training
Unit IV.pdf
Hadoop 2.0 handout 5.0
Hadoop2.2
Best hadoop-online-training
堵俊平:Hadoop virtualization extensions
November 2014 HUG: Lessons from Hadoop 2+Java8 migration at LinkedIn
HugNov14
2013 Nov 20 Toronto Hadoop User Group (THUG) - Hadoop 2.2.0
What Is Hadoop | Hadoop Tutorial For Beginners | Edureka
Hadoop Cluster on Docker Containers
YARN - Presented At Dallas Hadoop User Group

hadoop_module6

  • 1. Bridging  Technology  Gap                                Netxillon  Technologies                              Hadoop  Administra9on   By  Gurmukh  Singh   Module  6:  High  Availability  
  • 2. Hadoop                                      Netxillon  Technologies                               Key  Points  from  Module  5:     Hadoop  2.0  and  YARN  Advantages   Hadoop  2.0  directory  structure  and  changes.   The  YARN  Work  Flow  
  • 3. Hadoop                                      Netxillon  Technologies                                     Agenda:     •   Hadoop  2.0  and  YARN   •   YARN  flow   •   Setup  HA  using  Shared  Storage  and  Zookeeper.    
  • 4. Hadoop                                                                            Netxillon  Technologies                     Hadoop  2.0  Setup  differences   -­‐  The  configuraIon  files  locaIon  has  now  moved  to  “$HADOOP_HOME/etc/hadoop”   -­‐  The  jar  are  now  located  at  “$HADOOP_HOME/share/hadoop/mapreduce/*example.jar”   -­‐  The  locaIon  for  admin  binaries  is  now  at  “$HADOOP_HOME/sbin”   -­‐  Jobtracker/tasktracker  have  been  upgraded  to  Resource/Node  Manager.   -­‐  There  is  no  “hadoop-­‐daemon.sh  start  resourcemanger”  command,  it  is  upgraded  to  yarn  command  line.   -­‐  The  Job  execuIon  is  done  by  YARN  
  • 5. Hadoop                                                                            Netxillon  Technologies                     Hadoop  2.0  Cluster  Setup   hdfs-­‐site.xml     <property>   <name>dfs.namenode.name.dir</name>   <value>file:/data/namenode</value>   </property>   core-­‐site.xml     <configura9on>   <property>   <name>fs.defaultFS</name>   <value>hdfs://ha-­‐nn1.hacluster1.com:9000</value>   </property>   </configura9on>  
  • 6. Hadoop                                                                            Netxillon  Technologies                     yarn-­‐site.xml     <property>   <name>yarn.nodemanager.aux-­‐services</name>   <value>mapreduce_shuffle</value>   </property>     <property>   <name>yarn.nodemanager.aux-­‐ services.mapreduce.shuffle.class</name>   <value>org.apache.hadoop.mapred.ShuffleHandler</value>   </property>     Hadoop  2.0  Distributed  Setup   mapred-­‐site.xml     <property>   <name>mapreduce.framework.name</ name><value>yarn</value>   </property>    
  • 7. Hadoop                                                                            Netxillon  Technologies                     Hadoop  2.0  Distributed  Setup                            DEMO  
  • 8. Hadoop                                                                            Netxillon  Technologies                     Job  Tracker  Disadvantages:     •   Is  single  point  of  failure.   •   JobTracker  is  heavy  loaded.   •  Does  resource  Management   •  Job  Scheduling   •  Takes  care  of  job  failures  and  recreaIon  
  • 9. Hadoop                                                                            Netxillon  Technologies                     YARN  –  Yet  another  resource  nego9ator       Firstly,  Yarn  and  MRv2  are  not  the  same  thing.   Each  job  controls  its  own  desIny.   Responsible  for  Cluster  resource  Management  
  • 10. Hadoop                                                                            Netxillon  Technologies                     YARN  components    
  • 11. Hadoop                                                                            Netxillon  Technologies                     YARN  Flow     •   Client  submits  job  and  with  the  help  of  ResourceManager  gets  a  ApplicaIon  ID.   •   RM  chooses  a  NodeManager  with  available  resources  and  requests  MR  App  Master.   •   Node  Manager  allocates  container  for  the  Master  and  the  assigns  MR  job  to  it.   •   Splits  are  read  from  the  HDFS  by  the  MRApp  Master.   •   MRApp  Master  again  negoIates  with  Resource  Manager  to  find  the  node  with  maximum  resources.   •   MRApp  Master  assigns  the  map/reduces  tasks  on  that  parIcular  NodeManager.   •   NodeManager  creates  Yarnchild  to  execute  the  jobs.   •   Yarnchild  executes  the  map  and  reduce  task  aZer  acquiring  the  resources  from  HDFS.  
  • 12. Hadoop                                                                            Netxillon  Technologies                     YARN  components    
  • 13. Hadoop                                                                            Netxillon  Technologies                     YARN  Flow    
  • 14. Hadoop                                                                            Netxillon  Technologies                     Hadoop  HA  -­‐  HDFS     Namenode  is  a  single  point  of  failure,  what  if  it  fails  ?     We  will  have  outage,  and  someImes  data  loss  due  to  corrupIon.   How  quickly  we  can  do  the  switch  if  needed.   Whether  the  switch  is  a  manual  failover  or  AutomaIc  failover.     Lets  look  at  all  the  above  ques9ons.  
  • 15. Hadoop                                                                            Netxillon  Technologies                     Hadoop  HA  –  using  shared  NFS    
  • 16. Hadoop                                                                            Netxillon  Technologies                     Hadoop  HA  –  using  shared  NFS                                DEMO    
  • 17. Hadoop                                                                            Netxillon  Technologies                     Hadoop  HA  -­‐  HDFS     Using  Zookeeper  
  • 18. Hadoop                                                                            Netxillon  Technologies                     Hadoop  HA  -­‐  HDFS     Using  Zookeeper  
  • 19. Hadoop                                                                            Netxillon  Technologies                     Hadoop  HA  -­‐  HDFS     Using  Zookeeper   docs.hortonworks.com  
  • 20. Hadoop                                                                            Netxillon  Technologies                     Zookeeper   ZooKeeper   is   a   centralized   service   for   maintaining   configuraIon   informaIon,   naming,   providing   distributed   synchronizaIon,  and  providing  group  services    
  • 21. Hadoop                                                                            Netxillon  Technologies                     Zookeeper  Configura9on   9ckTime=2000   #  The  number  of  Icks  that  the  iniIal     #  synchronizaIon  phase  can  take   initLimit=10   #  The  number  of  Icks  that  can  pass  between     #  sending  a  request  and  ge`ng  an  acknowledgement   syncLimit=5   dataDir=/tmp/zookeeper   #  the  port  at  which  the  clients  will  connect   clientPort=2181   #   server.1=192.168.1.70:2888:3888   server.2=192.168.1.71:2888:3888   server.3=192.168.1.69:2888:3888  
  • 22. Hadoop                                                                            Netxillon  Technologies                     •  Make  sure  zookeeper  is  up  and  coordinaIng.   •  Start  journal  nodes.   •  Format  the  Namenode   •  Format  the  zkFC   Hadoop  2.0  HA  Setup  using  QJM  
  • 23. Hadoop                                                                            Netxillon  Technologies                                DEMO   Hadoop  2.0  HA  Setup  using  QJM  
  • 24. Hadoop                                                                            Netxillon  Technologies                     Hadoop  2.0  Setup                            DEMO  
  • 25. Hadoop                                                                            Netxillon  Technologies                     Hadoop  Upgrade     1.  hadoop  dfsadmin  -­‐upgradeProgress  status   2.  Stop  all  client  applicaIons  running  on  the  MapReduce  cluster.   3.  Perform  a  filesystem  check      hadoop  fsck  /  -­‐files  -­‐blocks  -­‐loca9ons  >  dfs-­‐v-­‐old-­‐fsck-­‐1.log     4.  Save  a  complete  lisIng  of  the  HDFS  namespace  to  a  local  file    hadoop  dfs  -­‐lsr  /  >  dfs-­‐v-­‐old-­‐lsr-­‐1.log     5.  Create  a  list  of  DataNodes  parIcipaIng  in  the  cluster:    hadoop  dfsadmin  -­‐report  >  dfs-­‐v-­‐old-­‐report-­‐1.log    
  • 26. Hadoop                                                                            Netxillon  Technologies                     Hadoop  Upgrade       6.  OpIonally  backup  HDFS  data   7.  Upgrade  process:    Point  to  the  new  directory,  update  environment  variables.     8.  hadoop-­‐daemon.sh  start  namenode  -­‐upgrade   9.  hadoop  dfsadmin  -­‐upgradeProgress  status   10.  Now  start  the  datanode,  aZer  poinIng  to  the  new  hadoop  directory   11.  hadoop  dfsadmin  -­‐safemode  get   12.  hadoop  dfsadmin  -­‐finalizeUpgrade  
  • 27. Hadoop                                                  Netxillon  Technologies                                     Further  Readings:     -­‐  hnp://hadoop.apache.org/docs/r2.7.0/hadoop-­‐project-­‐dist/hadoop-­‐hdfs/HDFSHighAvailabilityWithQJM.html   -­‐  hnps://hadoop.apache.org/docs/stable/hadoop-­‐project-­‐dist/hadoop-­‐hdfs/HDFSHighAvailabilityWithNFS.html     GitHub:  hnps://github.com/netxillon/hadoop/tree/master/HA_QJM    
  • 28. Hadoop                                                  Netxillon  Technologies                                 Further  Reading:       •   hnps://hadoop.apache.org/docs/r1.2.1/hdfs_design.html   •   hnp://www.aosabook.org/en/hdfs.html                                    
  • 29. Hadoop                                      Netxillon  Technologies                                     Topics  for  Next  Class:     •   Hive,  HBASE,  PIG   •   Sqoop,  Flume  
  • 30. Hadoop                                                Netxillon  Technologies                                 Pre-­‐Readings  before  the  next  class:       •   hnps://hbase.apache.org/   •   hnp://hortonworks.com/hadoop/hive/   •   hnps://hive.apache.org/   •   hnps://pig.apache.org/                  
  • 31.                                                Netxillon  Technologies                                                                    Any  Ques9ons  ?                                                  
  • 32.                                                Netxillon  Technologies                                 GitHub: https://github.com/netxillon/hadoop                                    Thanks  !                                                                        trainings@netxillon.com