HDP2 and YARN operations point

36
Copyright ©2015 Treasure Data. All Rights Reserved. HDP2 and YARN operations point Ryu Kobayashi Treasure Data Tech Talk 11 and 12 Mar 2015

Transcript of HDP2 and YARN operations point

Page 1: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

HDP2 and

YARN operations pointRyu Kobayashi

Treasure Data Tech Talk 11 and 12 Mar 2015

Page 2: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Who am I?• Ryu Kobayashi • @ryu_kobayashi • https://github.com/ryukobayashi

• Treasure Data, Inc. • Software Engineer

• Background • Hadoop, Cassandra, Machine Learning, ... • I developed Huahin(Hadoop) Framework.

http://huahinframework.org/

Page 3: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

What is YARN?

Page 4: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

YARN(Yet Another Resource Negotiator) Architecture

Page 5: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

• MRv1

• JobTracker

• TaskTracker

Page 6: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

• YARN

• ResourceManager

• NodeManager

• ApplicationMaster

• Job History Server

• YARN Timeline Server

Page 7: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

• MRv1

• JobTracker

• TaskTracker

• YARN

• ResourceManager

• NodeManager

• ApplicationMaster

• Job History Server                                          (We  can  not  see  the  log  job  history  If  it  do  not  install)  

• YARN Timeline Server                                          (We  can  not  see  the  log  YARN  history  If  it  do  not  install)

Page 8: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

YARN Timeline Server • It is included container info

Page 9: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Note!!!

Page 10: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Use the Hadoop 2.4.0 and later!!!

Page 11: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

• The versions which must not be used

• Apache Hadoop 2.2.0

• Apache Hadoop 2.3.0

• HDP 2.0(2.2.0 based)

Page 12: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

• Currently

• Apache Hadoop 2.6.0

• CDH 5.3.2(2.5.0 based and patch)

• HDP 2.2(2.6.0 based and patch)

Page 13: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

• Why should not use?

• Capacity Scheduler

• There is a bug

• Fair Scheduler

• There is a bug

Page 14: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

• Any bugs?

• Each Scheduler will cause a deadlock

Page 15: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

•In fact, there is a bug in 2.4.0 and 2.6.0…

•It is better to use the new version.

•Note: 2.7.0 and later is a different thing

Page 16: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Backport Patch

• I was backport some patch

• https://github.com/ryukobayashi/patches

Page 17: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Backport Patch

• Included dead lock patch

• Format of the counter

• Application kill in Web UI.

Page 18: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Format of the counter

Page 19: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Format of the counter

Page 20: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Application kill in Web UI

Page 21: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Application kill in Web UI

Page 22: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Application kill in Web UI • Job kill in Web UI •

(default false)

• Application kill in Web UI •

(default true)

mapreduce.jobtracker.webinterface.trusted

yarn.resourcemanager.webapp.ui-actions.enabled

Page 23: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Backport Patch

• We want the next…

• Job task attempt kill in Web UI patch (in development)

• Currently, only command line

$ mapred job -kill-task attempt_*

Page 24: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Matter of resources

• total container = 4

• concurrent application = 2

Page 25: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Matter of resources • total container = 4

• concurrent application = 2

Cluster  Application

App  Master Container

Application

App  Master Container

Page 26: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Matter of resources

• total container = 4

• concurrent application = 4

Page 27: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Matter of resources • total container = 4

• concurrent application = 4

Cluster  Application

App  Master

Application

App  Master

Application

App  Master

Application

App  Master

Page 28: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Matter of resources • total container = 4

• concurrent application = 4

Cluster  Application

App  Master

Application

App  Master

Application

App  Master

Application

App  Master

Page 29: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Matter of resources • total container = 4

• concurrent application = 4

Cluster  Application

App  Master

Application

App  Master

Application

App  Master

Application

App  Master

Livelock!

Page 30: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Matter of resources • total container = 4

• concurrent application = 4

Cluster  Application

App  Master

Application

App  Master

Application

App  Master

Container

Application

App  Master

Kill

Page 31: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Matter of resources • total container = 4

• concurrent application = 4

• ^ squeeze the number of applications

Page 32: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Matter of resources • total container = 4

• concurrent application = 4

• ^ squeeze the number of applications

• set the root maxRunningApps

Page 33: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Matter of resources • total container = 4

• concurrent application = 4

• root maxRunningApps = 2

Cluster  Application

App  Master Container

Application

App  Master

Application

App  Master Container

Application

App  Master

Pending

Page 34: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

YANR Resource Managementyarn-site.xml

• yarn.nodemanager.resource.memory-mb • (yarn.nodenamager.vmem-pmem-ratio) • (yarn.scheduler.minimum-allocation-mb)

mapred-site.xml • yarn.app.mapreduce.am.resource.mb • mapreduce.map.memory.mb • mapreduce.reduce.memory.mb

fair-scheduler.xml • maxResources, minResources

etc…

Page 35: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

e.g. Use hdp-configuration-utils.py script http://goo.gl/L2hxyq

Use Ambari http://ambari.apache.org/

See the Cloudera’s document http://goo.gl/EBreca

YANR Resource Management

Page 36: HDP2 and YARN operations point

Copyright  ©2015  Treasure  Data.    All  Rights  Reserved.

Thanks!!!