我有一个火花工作,我在两个数据帧之间进行外连接.第一个数据帧的大小为260 GB,文件格式为文本文件,分为2200个文件,第二个数据帧的大小为2GB.然后将大约260 GB的数据帧输出写入S3需要很长时间超过2小时后我取消因为我已经在EMR上进行了大量更改.
这是我的群集信息.
emr-5.9.0
Master: m3.2xlarge
Core: r4.16xlarge 10 machines (each machine has 64 vCore, 488 GiB memory,EBS Storage:100 GiB)
Run Code Online (Sandbox Code Playgroud)
这是我正在设置的群集配置
capacity-scheduler yarn.scheduler.capacity.resource-calculator :org.apache.hadoop.yarn.util.resource.DominantResourceCalculator
emrfs-site fs.s3.maxConnections: 200
spark maximizeResourceAllocation: true
spark-defaults spark.dynamicAllocation.enabled: true
Run Code Online (Sandbox Code Playgroud)
我尝试手动设置内存组件,如下所示,性能更好,但同样的事情又花了很长时间
--num-executors 60 - conf spark.yarn.executor.memoryOverhead = 9216 --executor-memory 72G --conf spark.yarn.driver.memoryOverhead = 3072 --driver-memory 26G --execeror-cores 10 - driver-cores 3 --conf spark.default.parallelism = 1200
我没有使用默认分区将数据保存到S3.
添加有关作业和查询计划的所有详细信息,以便于理解.
真正的原因是分区.这大部分时间都在占用.因为我有2K文件,所以如果我使用像200这样的重新分区,输出文件以十万分之一形式出现,然后在spark中重新加载并不是一个好故事.
在下面Image GC对我来说太高了..请oi必须处理这个请建议如何?

下面是节点健康状态.这一点数据被保存到S3中,难怪为什么我只能看到两个节点处于活动状态并且都处于空闲状态.

这是加载时的集群细节.在这一点上,我可以看到集群已被充分利用,但在将数据保存到S3时,许多节点都是免费的.

最后这里是我的代码,我执行Join然后保存到S3 ...
import org.apache.spark.sql.expressions._
val windowSpec = Window.partitionBy("uniqueFundamentalSet", "PeriodId", "SourceId", "StatementTypeCode", "StatementCurrencyId", "FinancialStatementLineItem_lineItemId").orderBy(unix_timestamp($"TimeStamp", …Run Code Online (Sandbox Code Playgroud) Hadoop权威指南说 -
每个Namenode都运行一个轻量级故障转移控制器进程,其工作是监视其Namenode的故障(使用简单的心跳机制),并在namenode失败时触发故障转移.
为什么namenode可以运行某些东西来检测自己的失败?
谁向谁发送心跳?
这个过程在哪里运行?
它如何检测namenode失败?
它向谁通知过渡?
到目前为止,我已经按照迈克尔诺尔的指导,但被困在这里.
hduser@ubuntu:/usr/local/hadoop$ bin/hadoop dfs -copyFromLocal /tmp/gutenberg /user/hduser/gutenberg
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
13/11/11 23:24:13 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
copyFromLocal: `/user/hduser/gutenberg': No such file or directory
hduser@ubuntu:/usr/local/hadoop$
Run Code Online (Sandbox Code Playgroud)
我尝试使用'Y'重新格式化名称节点,但每次获得任意文件夹名称的结果都相同.
有任何想法吗?
我正在使用Hadoop-2.4.0,我的系统配置是24核,96 GB RAM.
我正在使用以下配置
mapreduce.map.cpu.vcores=1
yarn.nodemanager.resource.cpu-vcores=10
yarn.scheduler.minimum-allocation-vcores=1
yarn.scheduler.maximum-allocation-vcores=4
yarn.app.mapreduce.am.resource.cpu-vcores=1
yarn.nodemanager.resource.memory-mb=88064
mapreduce.map.memory.mb=3072
mapreduce.map.java.opts=-Xmx2048m
Run Code Online (Sandbox Code Playgroud)
容量调度程序配置
queue.default.capacity=50
queue.default.maximum_capacity=100
yarn.scheduler.capacity.root.default.user-limit-factor=2
Run Code Online (Sandbox Code Playgroud)
有了上述配置,我预计每个节点纱线不会超过10个映射器,但它每个节点启动28个映射器.难道我做错了什么??
我已经安装了 Javaopenjdk version "10.0.2"并且Hadoop 2.9.0成功了。所有进程都运行良好
hadoopusr@amalendu:~$ jps
19888 NameNode
20388 DataNode
20898 NodeManager
20343 SecondaryNameNode
20539 ResourceManager
21118 Jps
Run Code Online (Sandbox Code Playgroud)
但是当我尝试执行任何命令时,例如hdfs dfs -ls /收到此警告
hadoopusr@amalendu:~$ hdfs dfs -ls /
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/usr/local/hadoop/share/hadoop/common/lib/hadoop-auth-2.9.0.jar) to method sun.security.krb5.Config.getInstance()
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will …Run Code Online (Sandbox Code Playgroud) 我最近在学习 Amazon EMR,据我所知,EMR 集群让我们可以选择 3 个节点。
我问你们为什么 EMR 提供任务节点?hadoop 建议我们应该在同一个节点上安装 Datanode 守护进程和 Tasktracker 守护进程。亚马逊这样做背后的逻辑是什么?您可以将 S3 中的数据通过流传输到核心节点上的 HDFS,在 HDFS 上进行处理,而不是将数据从 HDFS 共享到任务节点,在这种情况下这会增加 IO 开销。因为就我在 hadoop 中的知识而言,TaskTrackers 运行在 DataNodes 上,DataNodes 具有用于该特定任务的数据块,那么为什么在不同的节点上有 TaskTracker 呢?
我正在尝试将一些文件从我的硬盘复制到HDFS,我正在使用此命令
hadoop fs -copyFromLocal /home/hduser/Pictures/Event\ ordering/* input/
Run Code Online (Sandbox Code Playgroud)
这是正确的语法吗?
PS:我正在使用linux
PPS:我收到此错误
copyFromLocal: unexpected URISyntaxException
Run Code Online (Sandbox Code Playgroud) 我正在研究一个hadoop项目,经过多次访问各种博客和阅读文档,我意识到我需要使用hadoop框架提供的二次排序功能.
我的输入格式是以下形式:
DESC(String) Price(Integer) and some other Text
我希望reducer中的值是Price的降序.同时在比较DESC时,我有一个方法,它取两个字符串和百分比,如果两个字符串之间的相似性等于或大于百分比,那么我应该认为它们是相等的.
问题是在Reduce Job完成之后我可以看到一些DESC与其他字符串相似但它们在不同的组中.
这是我的Composite键的compareTo方法
public int compareTo(VendorKey o) {
int result =-
result = compare(token, o.token, ":") >= percentage ? 0:1;
if (result == 0) {
return pid> o.pid ?-1: pid < o.pid ?1:0;
}
return result;
}
Run Code Online (Sandbox Code Playgroud)
比较分组比较器的方法
public int compare(WritableComparable a, WritableComparable b) {
VendorKey one = (VendorKey) a;
VendorKey two = (VendorKey) b;
int result = ClusterUtil.compare(one.getToken(), two.getToken(), ":") >= one.getPercentage() ? 0 : 1;
// if (result != …Run Code Online (Sandbox Code Playgroud) 在EMR中,有没有办法在给定配置键的情况下使用yarn命令获取配置的特定值?
例如,我想做这样的事情
yarn get-config yarn.scheduler.maximum-allocation-mb
Run Code Online (Sandbox Code Playgroud) 我设法在Yarn上启动了一个spark应用程序.但是,如下所示,emory的使用有点奇怪:
记忆保留意味着什么?如何有效地使用所有可用内存?
提前致谢.
hadoop2 ×10
hadoop ×9
hadoop-yarn ×3
amazon-emr ×2
java ×2
mapreduce ×2
apache-spark ×1
cloudera ×1
emr ×1
failover ×1
hdfs ×1
namenode ×1
ubuntu ×1