7. Configure Node Label Support for YARN Applications

Node labels can be used to restrict YARN applications so that the applications run only on cluster nodes that have a specified node label. Node Labels are supported on Windows. To enable node label support, make the following changes. See the Linux Node Labels documentation for more information. If you do not plan to use node labels, none of these changes are needed.

  1. Open the command prompt using the hadoop account:

    runas /user:hadoop cmd 

  2. Create a top-level YARN application directory in HDFS:

    %HADOOP_HOME%\bin\hdfs dfs -mkdir -p /system/yarn/node-labels

  3. Make sure permissions are set for write access from the hadoop account (rwx for all the directories in the path).

  4. Change the owner of the file to hadoop:

    %HADOOP_HOME%\bin\hdfs dfs -chown -R hadoop:users /system/yarn
    %HADOOP_HOME%\bin\hdfs dfs -chmod -R 700 /system/yarn

  5. Add the following property values to yarn-site.xml:

     

    Table 4.2. Required properties

    Property

    Value

    yarn.node-labels.manager-class

    org.apache.hadoop.yarn.server.resourcemanager. nodelabels.RMNodeLabelsManager

    yarn.node-labels.fs-store.root-dir

    /system/yarn/node-labels

    yarn.node-labels.fs-store.retry-policy-spec

    2000,500


  6. To verify that the installation process succeeded, run smoke tests as described in Validating the Installation.


loading table of contents...