Yes, they can. But as hot nodes in particular can get very heavily loaded, they may not be ideal as master nodes.
You should always aim to have at least 3 master-eligible nodes in a cluster, so I would recommend making all of them master-eligible and set minimum_master_nodes to 3 as per these guidelines.
If you realise the cluster is having problems with master nodes getting re-elected frequently, you may want to introduce at least one smaller dedicated master node.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.