def test_start_secondarynamenode(self, get_secondarynamenode, _start_secondarynamenode): get_secondarynamenode.return_value = 0 starting_scripts.start_secondarynamenode(self.cluster) get_secondarynamenode.assert_called_once_with(self.cluster) get_secondarynamenode.return_value = 1 starting_scripts.start_secondarynamenode(self.cluster) _start_secondarynamenode.assert_called_once_with(1) self.assertEqual(get_secondarynamenode.call_count, 2)
def start_cluster(self, cluster): keypairs.provision_keypairs(cluster) starting_scripts.start_namenode(cluster) starting_scripts.start_secondarynamenode(cluster) starting_scripts.start_resourcemanager(cluster) run.start_dn_nm_processes(utils.get_instances(cluster)) run.await_datanodes(cluster) starting_scripts.start_historyserver(cluster) starting_scripts.start_oozie(self.pctx, cluster) starting_scripts.start_hiveserver(self.pctx, cluster) starting_scripts.start_zookeeper(cluster) swift_helper.install_ssl_certs(utils.get_instances(cluster)) self._set_cluster_info(cluster) starting_scripts.start_spark(cluster)