def test_start_hiveserver(self, get_hiveserver, start_hiveserver_process): pctx = mock.Mock() get_hiveserver.return_value = 0 starting_scripts.start_hiveserver(pctx, self.cluster) get_hiveserver.assert_called_once_with(self.cluster) get_hiveserver.return_value = 1 starting_scripts.start_hiveserver(pctx, self.cluster) start_hiveserver_process.assert_called_once_with(pctx, 1) self.assertEqual(get_hiveserver.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)