Functionize code into Magpie_am_I_a_hadoop_master for consistency