OOZIE REST API RERUN - START作业功能不起作用

时间:2015-05-29 10:47:45

标签: rest oozie

OOZIE REST API RERUN - START作业功能不起作用

您好,   我想启动Oozie的REST API(Oxie版本4.0.0在CDH 5.3.1中),但作业无法启动或重新运行。

使用Google的ADVANCED REST API启动:

PUT {namenode}:11000/oozie/v1/job/0000001-150528075707705-oozie-oozi-W?action=start

结果是:

200 OK

响应不包含任何数据。

但是工作流程的工作没有开始。

然后我尝试启动

PUT  {namenode}:11000/oozie/v1/job/0000001-150528075707705-oozie-oozi-W?action=rerun

结果是:

500 Internal Server Error

Apache Tomcat / 6.0.41 - 错误报告

HTTP状态500 - org.xml.sax.SAXParseException;文件过早结束。

类型异常报告

消息 org.xml.sax.SAXParseException;文件过早结束。

描述服务器遇到内部错误,无法完成此请求。

异常 < / p>

java.io.IOException: org.xml.sax.SAXParseException; Premature end of file.
    org.apache.oozie.util.XConfiguration.parse(XConfiguration.java:253)
    org.apache.oozie.util.XConfiguration.<init>(XConfiguration.java:63)
    org.apache.oozie.servlet.BaseJobServlet.doPut(BaseJobServlet.java:114)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:730)
    org.apache.oozie.servlet.JsonRestServlet.service(JsonRestServlet.java:287)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    org.apache.oozie.servlet.AuthFilter$2.doFilter(AuthFilter.java:154)
    org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:592)
    org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:555)
    org.apache.oozie.servlet.AuthFilter.doFilter(AuthFilter.java:159)
    org.apache.oozie.servlet.HostnameFilter.doFilter(HostnameFilter.java:84)

根本原因

org.xml.sax.SAXParseException; Premature end of file.
    org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
    org.apache.oozie.util.XConfiguration.parse(XConfiguration.java:248)
    org.apache.oozie.util.XConfiguration.<init>(XConfiguration.java:63)
    org.apache.oozie.servlet.BaseJobServlet.doPut(BaseJobServlet.java:114)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:730)
    org.apache.oozie.servlet.JsonRestServlet.service(JsonRestServlet.java:287)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    org.apache.oozie.servlet.AuthFilter$2.doFilter(AuthFilter.java:154)
    org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:592)
    org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:555)
    org.apache.oozie.servlet.AuthFilter.doFilter(AuthFilter.java:159)
    org.apache.oozie.servlet.HostnameFilter.doFilter(HostnameFilter.java:84)

注意 Apache Tomcat / 6.0.41日志中提供了根本原因的完整堆栈跟踪。

Apache Tomcat / 6.0.41

代码突出显示得益于Code Mirror

作业在HDFS和其余命令上:

GET {namenode}:11000/oozie/v1/job/0000001-150528075707705-oozie-oozi-W?show=info

工作正常。答案是:

200 OK

{
appPath: "hdfs://{namenode}/user/hue/oozie/workspaces/_yarn_-oozie-57-1432735905.63"
acl: null
status: "SUCCEEDED"
createdTime: "Thu, 28 May 2015 15:34:37 GMT"
conf ......

使用API​​ Rest重新运行Oozie中与工作流程相关的工作的最简单方法是什么? 根据官方文档中的建议,这项工作不起作用:

http://archive-primary.cloudera.com/cdh5/cdh/5/oozie-4.0.0-cdh5.3.1/WebServicesAPI.html#Re-Runing_a_Workflow_Job

提前致谢。

塞巴斯蒂亚。

1 个答案:

答案 0 :(得分:0)

PUT对于重播似乎是正确的。但是,它还需要为两个属性之一提供XML

<?xml version="1.0" encoding="UTF-8"?><configuration><property> <name>oozie.wf.rerun.failnodes</name> <value>false</value> </property></configuration>

<?xml version="1.0" encoding="UTF-8"?><configuration><property> <name>oozie.wf.rerun.skip.nodes</name> <value>,</value> </property></configuration>

确定重新运行或跳过哪些节点。