luigi学习7--running from command line
最简单去运行一个luigi task的方式是通过luigi命令行工具。
示例代码:
# my_module.py, available in your sys.path
import luigi class MyTask(luigi.Task):
x = luigi.IntParameter()
y = luigi.IntParameter(default=45) def run(self):
print self.x + self.y
在命令行上运行:
(my_python_env)[root@hadoop26 pythonCode]# PYTHONPATH='' luigi --module my_module MyTask --x --y --local-scheduler
或者可以选择这种方式运行:
(my_python_env)[root@hadoop26 pythonCode]# python -m luigi --module my_module MyTask --x --local-scheduler
注意:如果一个参数的名字中含有'_',在命令行中你需要替代为'-'。例如MyTask有一个参数名字是'my_parameter',你需要这么赋值:
luigi --module my_module MyTask --my-parameter 100 --local-scheduler
luigi学习7--running from command line的更多相关文章
- Error running 'xxx': Command line is too long. Shorten command line for xxx
跑单元测试时,报错如下: Error running 'xxx': Command line is too long. Shorten command line for xxx 解决方案: 在项目所在 ...
- 运行springboot项目报错 Error running 'ResourceApplication': Command line is too long. Shorten comma
方法1 IDEA 运行报错:Error running '***': Command line is too long 技术标签: IDEA Error running 'Test': Com ...
- idea报错:Error running $classname: Command line is too long. Shorten command line for $classname.
Command line is too long 打印的变量太长了,超过了限制,这都会报错...我只想知道idea基于什么原理会报这个错... 解决 1.按照提示修改该类的配置,选择jar manif ...
- idea启动springboot项目报Error running 'ServiceStarter': Command line is too long. Shorten command line for ServiceStarter or also for Application
解决办法:在.idea文件夹下面的workspace.xml中的 <component name="PropertiesComponent">标签下面添加: <p ...
- idea 启动 Error running 'XxGatewayApplication': Command line is too long. Shorten command line for XxGatewayApplication or also for Spring Boot default
在idea workspace里 <component name="PropertiesComponent">标签下加入 <property name=" ...
- Error running 'App': Command line is too long. Shorten command line for App or also for Spring Boot default configuration.
找到标签 <component name="PropertiesComponent">.在标签里加一行 : <property name="dynam ...
- IDEA命令行缩短器助你解决此问题:Command line is too long. Shorten command line...
生命太短暂,不要去做一些根本没有人想要的东西.本文已被 https://www.yourbatman.cn 收录,里面一并有Spring技术栈.MyBatis.JVM.中间件等小而美的专栏供以免费学习 ...
- idea运行main方法报错,提示Shorten command line for xxx
在Intell IDEA运行main函数的时候遇到了如下错误: Error running' xxxxxx': Command line is too long. Shorten command li ...
- IntelliJ IDEA 运行项目的时候提示 Command line is too long 错误
在 IntelliJ IDEA 项目运行的时候收到了下面的错误提示: Error running 'Application': Command line is too long. Shorten co ...
- Intellij IDEA中Springboot启动报Command line is too long错误
启动报错:Error running 'CmsFrontApplication': Command line is too long. Shorten command line for CmsFron ...
随机推荐
- js中表单提交后按钮变灰色的功能
表单提交后按钮变成灰色 http://www.111cn.net/wy/js-ajax/45299.htm
- dropdownlist 控件的判断
问题: 三个级联 下拉框.在不点击第一级别直接点击第二级别时,弹出提示窗口."请先选择XXX"之类的,理想的结果是想要下图 这样的: 由于使用的微信公众号的内置浏览器,所以问题来了 ...
- springmvc的3中路径风格
1.导入相应的jar包,文件放置情况 2.web.xml <?xml version="1.0" encoding="UTF-8"?> <we ...
- 九度OJ1081
这道题又一次更新了我的世界观与人生观Orz……最开始我是设计了一个O(n)的递推算法,本以为可以轻松AC没想到居然TLE了……然后搜了一下题解,才发现这道题要用矩阵的思想去做. 通过对题目的分析,我们 ...
- BestCoder Round #79 (div.2)
1001.没推到题解那么细,枚举一下也可以.用通分可以避免小数精度问题. #include<iostream> #include<stdio.h> using namespac ...
- Oracle常用命令1
一. 安装是用户管理: sqlplus /nolog; connect /as sysdba; alter user sys identified by change_on_install; alte ...
- C Primer Plus(第五版)8
第 8 章 字符输入/输出和输入确认 在本章中你将学习下列内容: · 有关输入,输出以及缓冲和非缓冲输入之间的区别的更多内容. · 从键盘模拟文件结尾条件的方法. · 如何重定向将你的程序与文件相连接 ...
- C++primer 练习15.26
定义Quote和Bulk_Quote的拷贝控制成员,令其与合成的版本行为一致.为这些成员以及其他构造函数添加打印状态的 语句,使得我们能够知道正在运行哪个程序.使用这些类编写程序,预测程序将创建和销毁 ...
- SQL查询数据库是否存在
在实际工作中会遇到通过SQL查询数据库是否存在的情况,下面一些语句可以提供一些帮助,本文的语句是在SQL08R2中测试的 1,查询当前数据库服务器所有数据库 select * From master ...
- (转)使用Ping获得局域网机器信息
实际编程中会遇到查找局域网机器的情况,这个时候ping命令对我们帮助比较大,一般来说,都是在命令行中输入“ping XXX -t”,下面的方法是在C#编码中使用Ping. 原文地址:http://zh ...