Support Questions
Find answers, ask questions, and share your expertise

Yarn : yarn-site.xml changes not taking effect

Yarn : yarn-site.xml changes not taking effect

Explorer

We have a spark streaming application running on HDFS 2.7.3 with Yarn as the resource manager....while running the application .. these two folders

    /tmp/hadoop/data/nm-local-dir/filecache
    /tmp/hadoop/data/nm-local-dir/filecache 

are filling up and hence the disk ..... so from my research found that configuring these two properties in yarn-site.xml will help

<property>
            <name>yarn.nodemanager.localizer.cache.cleanup.interval-ms</name>
            <value>2000</value>
    </property>
    <property>
             <name>yarn.nodemanager.localizer.cache.target-size-mb</name>
             <value>2048</value>
    </property> 

i have configured them on each namenode and masternode ..and restarted the yarn on masternode ..but still doesn't seem to help ...please let me know if i'm missing anything ...while doing the configuration changes ...this is the yarn-site.xml

 
<configuration>
    <!-- Site specific YARN configuration properties -->
    <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.local-dirs</name>
        <value>file:///tmp/hadoop/data/nm-local-dir</value>
    </property>
    <property>
        <name>yarn.nodemanager.localizer.cache.cleanup.interval-ms</name>
        <value>2000</value>
    </property>
    <property>
         <name>yarn.nodemanager.localizer.cache.target-size-mb</name>
         <value>2048</value>
    </property>
    </configuration>

**Update**: i tried with this property but still doesn't clean up and disk is getting full

<property>
            <name>yarn.nodemanager.local-dirs</name>
            <value>file:///tmp/hadoop/data/nm-local-dir,file:///tmp/hadoop/data/nm-local-dir/filecache,file:///tmp/hadoop/data/nm-local-dir/usercache</value>
       </property>
4 REPLIES 4

Re: Yarn : yarn-site.xml changes not taking effect

Rising Star

> i have configured them on each namenode and masternode ..and restarted the yarn on masternode

The properties you are changing are yarn.nodemanager.* properties, which indicates that those properties need to be changed and restarts performed on all the worker (NodeManager) nodes, not just the master node.

Re: Yarn : yarn-site.xml changes not taking effect

Explorer

Thanks a lot for your answer Bill .......on master node i ran stop-yarn.sh ..so do u suggest running the same on worker nodes or is there a way i'm missing please help

Re: Yarn : yarn-site.xml changes not taking effect

Rising Star

Yes, the stop-yarn.sh script will stop all the NodeManagers, so that should be okay. Did you change the yarn-site.xml on all the nodes?

Re: Yarn : yarn-site.xml changes not taking effect

Explorer

yes i updated yarn-site.xml on all nodes