yarn

Yarn : Automatic clearing of filecache & usercache

╄→гoц情女王★ 提交于 2019-12-07 12:06:39
问题 We are running a spark streaming job with yarn as resource manager, noticing that these two directories are getting filled up on the data nodes and we are running out of space when we only run for couple of min's /tmp/hadoop/data/nm-local-dir/filecache /tmp/hadoop/data/nm-local-dir/filecache these directories are not getting cleared automatically , from my research found that this property need's to be set, yarn.nodemanager.localizer.cache.cleanup.interval-ms Even after setting this up ..it's

1、spark-submit脚本的使用及理解

南笙酒味 提交于 2019-12-07 11:15:16
一、介绍 1、安装省略,因为现在基本上都用大数据集成平台:cdh,hdp等 2、spark-submit脚本是spark提供的一个用于提交任务的脚本,通过它的--master 参数可以很方便的将任务提交到对应的平台去执行,比如yarn、standalone、mesos等。 3、spark-submit会在提交任务时,把集群大部分的配置文件都打包在__spark_conf__.zip中,包括core-site.xml、hdfs-site.xml、yarn-site.xml、mapreduce-site.xml、hbase-site.xml、hive-site.xml等。然后将其和工程依赖的第三方jar(flume、kafka、以及com.apache.org.lang3等)一同发送到spark的资源存放目录下,默认是:/user/root/.sparkStaging/xxxId/。 4、上述的__spark_conf__.zip还包含一个重要的配置文件__spark_conf__.properties,里面包含着spark-submit脚本的启动参数 在main类中SparkConf conf = new SparkConf();时会加载这个配置文件,所以不再需要执行conf.setMaster("yarn"); 如图: 5、有了上面配置文件和jar,就可以很方便的访问 hive

大数据Hadoop之 YARN认识

会有一股神秘感。 提交于 2019-12-07 10:17:44
大数据Hadoop之 YARN认识 2 Yarn是一个分布式的资源管理系统,用以提高分布式的集群环境下的资源利用率,这些资源包括内存、IO、网络、磁盘等。其产生的原因是为了解决原MapReduce框架的不足。 Yarn是一个分布式的资源管理系统,用以提高分布式的集群环境下的资源利用率,这些资源包括内存、IO、网络、磁盘等。其产生的原因是为了解决原MapReduce框架的不足。 最初MapReduce的committer们还可以周期性的在已有的代码上进行修改,可是随着代码的增加以及原MapReduce框架设计的不足,在原MapReduce框架上进行修改变得越来越困难, 所以MapReduce的committer们决定从架构上重新设计MapReduce,使下一代的MapReduce(MRv2/Yarn)框架具有更好的扩展性、可用性、可靠性、向后兼容性和更高的资源利用率以及能支持除了MapReduce计算框架外的更多的计算框架。 1、MapReduce框架的不足 现在比较流行的说法是jobtracker的问题,比如单点故障,任务过重。但除了Jobtracker,同时还有一个TaskTracker。我们看下图: JobTacker概述 JobTacker其承担的任务有:接受任务、计算资源、分配资源、与DataNode进行交流。 在hadoop中每个应用程序被表示成一个作业

CDH集群中YARN的参数配置

喜欢而已 提交于 2019-12-07 10:17:29
CDH 集群中 YARN 的参数配置 前言: Hadoop 2.0 之后,原先的 MapReduce 不在是简单的离线批处理 MR 任务的框架,升级为 MapReduceV2 ( Yarn )版本,也就是把资源调度和任务分发两块分离开来。而在最新的 CDH 版本中,同时集成了 MapReduceV1 和 MapReduceV2 ( Yarn )两个版本,如果集群中需要使用 Yarn 做统一的资源调度,建议使用 Yarn 。 CDH 对 Yarn 的部分参数做了少了修改,并且添加了相关的中文说明,本文着重介绍了 CDH 中相比 MapReduceV1 一些参数改动的配置。 一、 CPU 配置 ApplicationMaster 虚拟 CPU 内核 yarn.app.mapreduce.am.resource.cpu-vcores // ApplicationMaster 占用的 cpu 内核数( Gateway-- 资源管理 ) 容器虚拟 CPU 内核 yarn.nodemanager.resource.cpu-vcores // 单 个 NodeManager 最大能分配的 cpu 核数 ( NodeManager -- 资源管理 ) 结论:当前 nodemanager 申请的 ApplicationMaster 数总 和小于 nodemanager 最大 cpu 内核数 二

Hadoop MapReduceV2(Yarn) 框架

核能气质少年 提交于 2019-12-07 10:17:16
Hadoop MapReduceV2(Yarn) 框架简介 原 Hadoop MapReduce 框架的问题 对于业界的大数据存储及分布式处理系统来说,Hadoop 是耳熟能详的卓越开源分布式文件存储及处理框架,对于 Hadoop 框架的介绍在此不再累述,读者可参考 Hadoop 官方简介 。使用和学习过老 Hadoop 框架(0.20.0 及之前版本)的同仁应该很熟悉如下的原 MapReduce 框架图: 图 1.Hadoop 原 MapReduce 架构 从上图中可以清楚的看出原 MapReduce 程序的流程及设计思路: 首先用户程序 (JobClient) 提交了一个 job,job 的信息会发送到 Job Tracker 中,Job Tracker 是 Map-reduce 框架的中心,他需要与集群中的机器定时通信 (heartbeat), 需要管理哪些程序应该跑在哪些机器上,需要管理所有 job 失败、重启等操作。 TaskTracker 是 Map-reduce 集群中每台机器都有的一个部分,他做的事情主要是监视自己所在机器的资源情况。 TaskTracker 同时监视当前机器的 tasks 运行状况。TaskTracker 需要把这些信息通过 heartbeat 发送给 JobTracker,JobTracker 会搜集这些信息以给新提交的 job

Running a Spark application on YARN, without spark-submit

余生长醉 提交于 2019-12-07 09:30:30
问题 I know that Spark applications can be executed on YARN using spark-submit --master yarn . The question is: is it possible to run a Spark application on yarn using the yarn command ? If so, the YARN REST API could be used as interface for running spark and MapReduce applications in a uniform way. 回答1: Just like all YARN Applications, Spark implements a Client and an ApplicationMaster when deploying on YARN. If you look at the implementation in the Spark repository, you'll have a clue as to how

Hadoop Nodemanager and Resourcemanager not starting

时光毁灭记忆、已成空白 提交于 2019-12-07 08:05:48
问题 I am trying to setup the latest Hadoop 2.2 single node cluster on Ubuntu 13.10 64 bit. the OS is a fresh installation, and I have tried using both java-6 64 bit and java-7 64 bit. After following the steps from this and after failing, from this link, I am not able to start nodemanager and resourcemanager with the command: sbin/yarn-daemon.sh start nodemanager sudo sbin/yarn-daemon.sh start nodemanager and resource manager with sbin/yarn-daemon.sh start resourcemanager sudo sbin/yarn-daemon.sh

Why would Spark executors be removed (with “ExecutorAllocationManager: Request to remove executorIds” in the logs)?

99封情书 提交于 2019-12-07 07:40:18
问题 Im trying to execute a spark job in an AWS cluster of 6 c4.2xlarge nodes and I don't know why Spark is killing the executors... Any help will be appreciated Here the spark submit command: . /usr/bin/spark-submit --packages="com.databricks:spark-avro_2.11:3.2.0" --jars RedshiftJDBC42-1.2.1.1001.jar --deploy-mode client --master yarn --num-executors 12 --executor-cores 3 --executor-memory 7G --driver-memory 7g --py-files dependencies.zip iface_extractions.py 2016-10-01 > output.log At line this

Why cannot more than 32 cores be requested from YARN to run a job?

落爺英雄遲暮 提交于 2019-12-07 07:07:13
问题 Setup: No. of nodes: 3 No. of cores: 32 Cores per machine RAM: 410GB per machine Spark Version: 1.2.0 Hadoop Version: 2.4.0 (Hortonworks) Objective: I want to run a Spark job with more than 32 executor cores. Problem: When I request more than 32 executor cores for Spark job, I get the following error: Uncaught exception: Invalid resource request, requested virtual cores < 0, or requested virtual cores > max configured, requestedVirtualCores=150, maxVirtualCores=32 at org.apache.hadoop.yarn

YARN REST API - Spark job submission

社会主义新天地 提交于 2019-12-07 05:25:39
问题 I am trying to use the YARN REST API to submit the spark-submit jobs, which I generally run via command line. My command line spark-submit looks like this JAVA_HOME=/usr/local/java7/ HADOOP_CONF_DIR=/etc/hadoop/conf /usr/local/spark-1.5/bin/spark-submit \ --driver-class-path "/etc/hadoop/conf" \ --class MySparkJob \ --master yarn-cluster \ --conf "spark.executor.extraClassPath=/usr/local/hadoop/client/hadoop-*" \ --conf "spark.driver.extraClassPath=/usr/local/hadoop/client/hadoop-*" \ spark