方便调试spark参数的python脚本
2016-01-26 17:29
483 查看
# encoding:utf-8 __author__ = 'jwang' import os cmd_list = [] spark_submit = '/usr/local/datacenter/spark/bin/spark-submit' cmd_list.append(spark_submit) cmd_list.append('--class') cmd_list.append('com.xx.xx.RBK') cmd_list.append('--master') cmd_list.append('yarn') cmd_list.append('--name') cmd_list.append('XXRBK') cmd_list.append('--executor-memory') cmd_list.append('3g') cmd_list.append('--driver-memory') cmd_list.append('3g') cmd_list.append('--executor-cores') cmd_list.append('16') cmd_list.append('xxxx.jar') params = [] params.append('xx') params.append('rule') cmd_list.extend(params) exec_cmd = ' '.join(cmd_list) #'' print 'start to execute ::: ' + exec_cmd os.system(exec_cmd) os._exit(0)
相关文章推荐
- 举例讲解Python设计模式编程中的访问者与观察者模式
- Python 为什么要迁移到 Github
- Python 为什么要迁移到 Github
- [python]pythonic的字典常用操作
- Python + Pexpect远程监控服务器
- python数字图像处理(17):边缘与轮廓
- Python 连接 Hbase
- MySQL Connector/Python
- Python 全栈开发 -- 监控篇
- Python 全栈开发 -- 监控篇
- Python中APScheduler模块的使用
- python正则表达式例子说明
- 【LEETCODE】313-Super Ugly Number [Python]
- python-->>第四天
- python模块系列之 - time,datetime,calendar
- Python之 with and as
- Python3.4 tkinter,PIL图片转换(GUI)
- Python3.4 垃圾清理(GUI)
- python代码片段——获得三天前时间
- python正则--简单匹配身份证号