纱线:自动清除文件缓存& usercache [英] Yarn : Automatic clearing of filecache & usercache

查看:3486
本文介绍了纱线:自动清除文件缓存& usercache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用yarn作为资源管理器运行Spark Streaming作业,注意到这两个目录在数据节点上已经满了,而当我们只运行几分钟的时候,我们的空间不足了。



/ tmp / hadoop / data / nm-local-dir / filecache
$ b $ p

这些目录不会自动清除,因为我的研究发现需要设置此属性 yarn.nodemanager.localizer.cache.cleanup。间隔-ms



即使设置完成后,它也不会自动清除任何帮助,不胜感激

 < configuration> 

〜<属性>
〜< name> yarn.nodemanager.aux-services< / name>
〜<值> mapreduce_shuffle< /值>
〜< / property>

〜<属性>
〜< name> yarn.resourcemanager.hostname< / name>
〜<值> hdfs-name-node< /值>
〜< / property>

〜<属性>
〜< name> yarn.nodemanager.resource.memory-mb< / name>
〜<值> 16384< /值>
〜< / property>

〜<属性>
〜< name> yarn.nodemanager.resource.cpu-vcores< / name>
〜<值> 6< /值>
〜< / property>

〜<属性>
〜< name> yarn.scheduler.maximum-allocation-mb< / name>
〜<值> 16384< /值>
〜< / property>
<属性>
〜< name> yarn.nodemanager.localizer.cache.cleanup.interval-ms< / name>
〜< value> 3000< /值>
〜< / property>

〜<! - 需要明确设置为YARN-367解决方案的一部分。
〜|如果更改此属性,则还必须更改
〜| hdfs-site.xml中的hadoop.tmp.dir属性。这个位置必须总是
〜|是hadoop.tmp.dir中指定位置的子目录。这
〜|影响Yarn 2.0.0到2.7.3+的所有版本。 - >
〜<属性>
〜< name> yarn.nodemanager.local-dirs< / name>
〜< value> file:/// tmp / hadoop / data / nm-local-dir< / value>
〜< / property>

〜< / configuration>


解决方案

如果主要问题是您用完了然后尝试为yarn属性yarn.nodemanager.localizer.cache.target-size-mb设置一个较低的值。默认情况下,这是10240 MB(10GB)。



至于自动清理没有被触发,这可能是由于(或至少与此有关)在Yarn 2.7.1上报告的错误: https://issues.apache.org/jira/浏览/ YARN-4540


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 not automatically clearing out any help will be greatly appreciated

<configuration>
    ~
    ~   <property>
    ~       <name>yarn.nodemanager.aux-services</name>
    ~       <value>mapreduce_shuffle</value>
    ~   </property>
    ~
    ~   <property>
    ~       <name>yarn.resourcemanager.hostname</name>
    ~       <value>hdfs-name-node</value>
    ~   </property>
    ~
    ~   <property>
    ~       <name>yarn.nodemanager.resource.memory-mb</name>
    ~       <value>16384</value>
    ~   </property>
    ~
    ~   <property>
    ~       <name>yarn.nodemanager.resource.cpu-vcores</name>
    ~       <value>6</value>
    ~   </property>
    ~
    ~   <property>
    ~       <name>yarn.scheduler.maximum-allocation-mb</name>
    ~       <value>16384</value>
    ~   </property>
         <property>
    ~       <name>yarn.nodemanager.localizer.cache.cleanup.interval-ms</name>
    ~       <value>3000</value>
    ~   </property>
    ~
    ~   <!-- Needs to be explicitly set as part of a workaround for YARN-367.
    ~      | If changing this property, you must also change the
    ~      | hadoop.tmp.dir property in hdfs-site.xml. This location must always
    ~      | be a subdirectory of the location specified in hadoop.tmp.dir. This
    ~      | affects all versions of Yarn 2.0.0 through 2.7.3+. -->
    ~   <property>
    ~       <name>yarn.nodemanager.local-dirs</name>
    ~       <value>file:///tmp/hadoop/data/nm-local-dir</value>
    ~   </property>
    ~
    ~ </configuration>

解决方案

If the primary problem is that you are running out of space then try setting a lower value for the yarn property "yarn.nodemanager.localizer.cache.target-size-mb". By default this is 10240 MB(10GB).

As for automatic clean up not getting triggered, well it may be due to (or at-least related to) this unresolved bug reported on Yarn 2.7.1: https://issues.apache.org/jira/browse/YARN-4540

这篇关于纱线:自动清除文件缓存&amp; usercache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆