oozie hpdl参数分析
来源:互联网 发布:java 引用类型 编辑:程序博客网 时间:2024/04/28 15:02
一 oozie设置参数方式
1)客户端调用时,例如:
Properties conf = wc.createConfiguration(); conf.setProperty("user.name", "oozie"); conf.setProperty("dataflow.taskMangerURL", "http://172.16.11.253:8081/bdi-api/TaskManagerServlet"); jobId = wc.run(conf);2)Global Configurations3)action的子标签,例:<action name='a2'><dataflow xmlns='uri:oozie:dataflow-action:0.1'> <dataflowId>a2</dataflowId> </dataflow><ok to='end'/><error to='fail'/></action>
二 全局配置
19 Global Configurations
Oozie allows a global section to reduce the redundant job-tracker and name-node declarations for each action. The user can define aglobal section in the beginning of the workflow.xml . The global section may contain the job-xml, configuration, job-tracker, or name-node that the user would like to set for every action. If a user then redefines one of these in a specific action node, Oozie will update use the specific declaration instead of the global one for that action.
Example of a global element:
<workflow-app xmlns="uri:oozie:workflow:0.4" name="wf-name"><global> <job-tracker>${job-tracker}</job-tracker> <name-node>${namd-node}</name-node> <job-xml>job1.xml</job-xml> <configuration> <property> <name>mapred.job.queue.name</name> <value>${queueName}</value> </property> </configuration></global>
xsd片段:
<xs:complexType name="GLOBAL"> <xs:sequence> <xs:element name="job-tracker" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="name-node" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="job-xml" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="configuration" type="workflow:CONFIGURATION" minOccurs="0" maxOccurs="1"/> </xs:sequence> </xs:complexType>
注:在实际运行当中<global>的</configuration>子标签将内容将写入活动的配置,例如:
hpdl:
<workflow-app xmlns='uri:oozie:workflow:0.4' name='workflowId1'><global><configuration><property><name>dataflow.taskMangerURL</name><value>http://172.16.11.253:8081/bdi-api/TaskManagerServlet</value></property></configuration></global>
<start to='a2'/><action name='a2'><dataflow xmlns='uri:oozie:dataflow-action:0.1'> <dataflowId>a2</dataflowId> </dataflow><ok to='end'/><error to='fail'/></action>
通过在action方法中action.getConf()取得的action配置实际值为:
<dataflow xmlns="uri:oozie:dataflow-action:0.1"> <dataflowId>a2</dataflowId> <configuration> <property> <name>dataflow.taskMangerURL</name> <value>http://172.16.11.253:8081/bdi-api/TaskManagerServlet</value> </property> </configuration></dataflow>
三 疑问
除了直接解析action的xml,如何在oozie中通过本身自带的方法取属性值,如下列Property中的值:
Properties conf = wc.createConfiguration(); conf.setProperty("user.name", "oozie"); conf.setProperty("dataflow.taskMangerURL", "http://172.16.11.253:8081/bdi-api/TaskManagerServlet"); String jobId=""; try {jobId = wc.run(conf);
- oozie hpdl参数分析
- oozie 参数含义
- Oozie
- Oozie
- OOZIE
- oozie
- oozie
- oozie
- oozie
- Oozie
- 【新手入门】Oozie workflow如何在action之间传递参数
- Oozie workflow工作流action间参数传递实现
- Oozie调度Pig job常见的问题及分析
- Oozie原理 以及 Action执行模型简单分析
- oozie中运行pig action-node时的错误提示参数参考
- oozie sqoop 参数中不能有空格,否则sqoop解析出错
- Oozie介绍
- Oozie简介
- (转)android之Fragment(官网资料翻译)
- 12--4为小学生出10道计算题
- 递归---求阶乘
- android 上传Bitmap到服务器端
- 37-JavaScript-DOM-小游戏-小球碰撞后折返
- oozie hpdl参数分析
- 和我一起学习OC吧
- 2013-秋季校招之--java笔试--1
- TQ2440裸板---lcd液晶显示(详细注释)
- 服务器端返回json
- gcc和g++的区别
- Java学习的30个目标
- 设计模式--装饰者模式--UML
- Hibernate 文档学习