CCAH-CCA-500-4题:Where are Hadoop task log files stored?
For each YARN job, the Hadoop framework generates task log file. Where are Hadoop task log files stored?
A. Cached by the NodeManager managing the job containers, then written to a log directory on the NameNode
B. Cached in the YARN container running the task, then copied into HDFS on job completion
C. In HDFS, in the directory of the user who generates the job
D. On the local disk of the slave mode running the task
问题:
对于每个yarn job,hadoop框架产生的task日志文件存储在哪个位置上?
解析:
1.对于学习hadoop有段时间的和亲手搭建过,就会知道log文件一般 肯定是存储在 local disk(本地磁盘)上,而不是存储在hdfs文件系统中。
2.一般输出位置由yarn.nodemanager.log-dirs参数设置(Default Path is ${yarn.log.dir}/userlogs)
<property>
<name>yarn.nodemanager.log-dirs</name>
<value>/home/root/workspace-yarn/nm/log</value>
</property>.
如果不配置将使得NodeManager进程处于Unhealthy状态,无法提供服务,现象是提交作业时,作业一直处于pending状态无法往下执行,所以必须配置。

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
CCAH-CCA-500-3题:Table schemas in Hive are?
3.Table schemas in Hive are: A. Stored as metadata on the NameNode B. Stored along with the data in HDFS C. Stored in the Metadata D. Stored in ZooKeeper 问题: Hive组件的table schemas在哪里存储着? 解析: Hive分为元数据metadata和数据data,元数据一般存储在mysql中(默认在derby),数据存储在hdfs文件系统上. 元数据包括表的名字,表的列和分区及其属性,表的属性(是否为外部表等),表的数据所在目录等. 在安装过程,我们一般会初始化schema,在服务端执行一次“schematool -dbType mysql -initSchema”,以完成对metastore的初始化,所以 table schemas are stored in the metadata at the mysql database.
- 下一篇
Yarn源码分析之MRAppMaster上MapReduce作业处理总流程(一)
我们知道,如果想要在Yarn上运行MapReduce作业,仅需实现一个ApplicationMaster组件即可,而MRAppMaster正是MapReduce在Yarn上ApplicationMaster的实现,由其控制MR作业在Yarn上的执行。如此,随之而来的一个问题就是,MRAppMaster是如何控制MapReduce作业在Yarn上运行的,换句话说,MRAppMaster上MapReduce作业处理总流程是什么?这就是本文要研究的重点。 通过MRAppMaster类的定义我们就能看出,MRAppMaster继承自CompositeService,而CompositeService又继承自AbstractService,也就是说MRAppMaster也是Hadoop中的一种服务,我们看下服务启动的serviceStart()方法中关于MapReduce作业的处理,关键代码如下: @SuppressWarnings("unchecked") @Override protected void serviceStart() throws Exception { // ......
相关文章
文章评论
共有0条评论来说两句吧...