transform_service.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:monasca-transform 作者: openstack 项目源码 文件源码
def stop_spark_submit_process():
    """Stop spark submit program."""
    LOG = log.getLogger(__name__)
    try:
        # get the driver proc
        pr = get_process(SPARK_SUBMIT_PROC_NAME)

        if pr:
            # terminate (SIGTERM) spark driver proc
            for cpr in pr.children(recursive=False):
                LOG.info("Terminate child pid {%s} ..." % str(cpr.pid))
                cpr.terminate()

            # terminate spark submit proc
            LOG.info("Terminate pid {%s} ..." % str(pr.pid))
            pr.terminate()

    except Exception as e:
        LOG.error("Error killing spark submit "
                  "process: got exception: {%s}" % str(e))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号