Functionize common code into Magpie_am_I_a_hadoop_node and Magpie_am_I_a_zookeeper_node