In Apache Hadoop 3.0 use $HADOOP_HOME/etc/hadoop/workers file to add slave nodes one per line.
$HADOOP_HOME/etc/hadoop/workers