示例#1
0
    def test_start_spark(self, get_spark_history_server,
                         start_spark_history_server):
        get_spark_history_server.return_value = 0
        starting_scripts.start_spark(self.cluster)
        get_spark_history_server.assert_called_once_with(self.cluster)

        get_spark_history_server.return_value = 1
        starting_scripts.start_spark(self.cluster)
        start_spark_history_server.assert_called_once_with(1)
        self.assertEqual(get_spark_history_server.call_count, 2)
示例#2
0
    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)