Sample node label file

The following example shows both glob identifiers and regular expression identifiers.

/perfnode200.*/ big, "Production Machines"
/perfnode203.*/ big, 'Development Machines'
perfnode15* good
perfnode201* slow
perfnode204* good, big

If glob identifiers overlap, so that patterns from multiple lines match a particular node, only the last line in the file that matches is applied.

The file path and name are specified in the parameter mapreduce.jobtracker.node.labels.file in mapred-site.xml (MapReduce v1). If no file is specified, jobs can run on any nodes in the cluster.

Note:

You can use hadoop job - showlabels to view the labels of all active nodes.

The parameter mapreduce.jobtracker.node.labels.monitor.interval in mapred-site.xml (MapReduce v1) determines how often the JobTracker should poll the node label file for changes (the default is two minutes). You can also use hadoop job - refreshlabels to manually tell the JobTracker to re-load the node label file.