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 ...
随机推荐
- zookeeper 监控 —— 阿里taokeeper
TaoKeeper是一个围绕ZooKeeper做的监控与报表系统. 主要功能如下: 能够统计ZK集群连接数,Watcher数目 ,节点数等系列信息,并按一定规则进行一些聚合操作; 能够通过设置一些阈值 ...
- svn: E175002: can not read HTTP status line
问题:eclipse连接svn:https://bdsvn-pc/svn/Project,报错svn: E175002: can not read HTTP status line 解决办法:将域名改 ...
- BestCoder Round #79 (div.2)
1001.没推到题解那么细,枚举一下也可以.用通分可以避免小数精度问题. #include<iostream> #include<stdio.h> using namespac ...
- POJ 2135 Farm Tour [最小费用最大流]
题意: 有n个点和m条边,让你从1出发到n再从n回到1,不要求所有点都要经过,但是每条边只能走一次.边是无向边. 问最短的行走距离多少. 一开始看这题还没搞费用流,后来搞了搞再回来看,想了想建图不是很 ...
- eclipse高效快捷键
代码快速对齐:Ctrl+shift+f 添加注释,取消注释:Ctrl+shift+/ Ctrl+shift+\ Ctrl+/ Alt+Shift+R:一秒钟重命名 Ctrl+D:一秒钟删除行 ...
- java静态内部类
public class StaticInnerClass { int x=100; static class inner{ void doitInner() ...
- Hadoop修改SSH端口号
hadoop-env.sh export HADOOP_SSH_OPTS="-p 16022"
- transform的使用
*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...
- Android中常用的5大布局详述
Android的界面是有布局和组件协同完成的,布局好比是建筑里的框架,而组件则相当于建筑里的砖瓦.组件按照布局的要求依次排列,就组成了用户所看见的界面. 所有的布局方式都可以归类为ViewGroup的 ...
- [drp 6]接口和抽象类的区别,及其应用场景
导读:在很多时候,接口和抽象类可以替换.发现这个问题,还是之前学习设计模式的时候,看到那个UML图发现的.那么,究竟在什么时候使用接口,什么时候使用抽象类呢?现在结合这个项目,做一个总结. 一.接口 ...