瀏覽代碼

HUE-3805 [oozie] Add support for oozie schema 0.4 in dashboard graph for external workflows

krish 9 年之前
父節點
當前提交
c04fe12
共有 46 個文件被更改,包括 160 次插入63 次删除
  1. 2 3
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/action.xslt
  2. 2 2
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/control.xslt
  3. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/distcp.0.1.xslt
  4. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/distcp.0.2.xslt
  5. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/email.0.1.xslt
  6. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/email.0.2.xslt
  7. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive.0.2.xslt
  8. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive.0.3.xslt
  9. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive.0.4.xslt
  10. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive.0.5.xslt
  11. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive.0.6.xslt
  12. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive2.0.1.xslt
  13. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive2.0.2.xslt
  14. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/shell.0.1.xslt
  15. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/shell.0.2.xslt
  16. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/shell.0.3.xslt
  17. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/spark.0.1.xslt
  18. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/sqoop.0.2.xslt
  19. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/sqoop.0.3.xslt
  20. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/sqoop.0.4.xslt
  21. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/ssh.0.1.xslt
  22. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/ssh.0.2.xslt
  23. 2 2
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/decision.xslt
  24. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/command.xslt
  25. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/jar_path.xslt
  26. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/job_properties.xslt
  27. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/job_xml.xslt
  28. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/mapper.xslt
  29. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/prepares.xslt
  30. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/reducer.xslt
  31. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/script_path.xslt
  32. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/touchzs.xslt
  33. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/user.xslt
  34. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/xml.xslt
  35. 2 2
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fork.xslt
  36. 2 2
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fs.xslt
  37. 2 2
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/generic.xslt
  38. 2 2
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/java.xslt
  39. 2 2
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/mapreduce.xslt
  40. 2 2
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/pig.xslt
  41. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/streaming.xslt
  42. 2 2
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/subworkflow.xslt
  43. 12 4
      apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/workflow.xslt
  44. 1 1
      apps/oozie/src/oozie/importlib/xslt2/workflows/workflow.xslt
  45. 2 5
      apps/oozie/src/oozie/models2.py
  46. 93 0
      apps/oozie/src/oozie/tests2.py

+ 2 - 3
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/action.xslt

@@ -1,7 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
-
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 <xsl:import href="extensions/distcp.0.1.xslt"/>
 <xsl:import href="extensions/distcp.0.2.xslt"/>
 <xsl:import href="extensions/email.0.1.xslt"/>
@@ -29,7 +28,7 @@
 <xsl:import href="nodes/streaming.xslt"/>
 <xsl:import href="nodes/subworkflow.xslt"/>
 
-<xsl:template match="workflow:action" xmlns:workflow="uri:oozie:workflow:0.5">
+<xsl:template match="workflow5:action | workflow4:action" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
   {
     "name": "<xsl:value-of select="@name"/>",
     "node_type": "<xsl:value-of select="name(*)"/>",

+ 2 - 2
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/control.xslt

@@ -1,11 +1,11 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
 <xsl:import href="nodes/fork.xslt"/>
 <xsl:import href="nodes/decision.xslt"/>
 
-<xsl:template match="workflow:start | workflow:end | workflow:decision | workflow:fork | workflow:join | workflow:kill">
+<xsl:template match="workflow5:start | workflow5:end | workflow5:decision | workflow5:fork | workflow5:join | workflow5:kill | workflow4:start | workflow4:end | workflow4:decision | workflow4:fork | workflow4:join | workflow4:kill">
   {
     "name": "<xsl:value-of select="@name"/>",
     "node_type": "<xsl:value-of select="name(.)"/>",

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/distcp.0.1.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:distcp="uri:oozie:distcp-action:0.1" exclude-result-prefixes="workflow distcp">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:distcp="uri:oozie:distcp-action:0.1">
 
 <xsl:template match="distcp:distcp">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/distcp.0.2.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:distcp="uri:oozie:distcp-action:0.2" exclude-result-prefixes="workflow distcp">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:distcp="uri:oozie:distcp-action:0.2">
 
 <xsl:template match="distcp:distcp">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/email.0.1.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:email="uri:oozie:email-action:0.1" exclude-result-prefixes="workflow email">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:email="uri:oozie:email-action:0.1">
 
 <xsl:template match="email:email">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/email.0.2.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:email="uri:oozie:email-action:0.2" exclude-result-prefixes="workflow email">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:email="uri:oozie:email-action:0.2">
 
 <xsl:template match="email:email">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive.0.2.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:hive="uri:oozie:hive-action:0.2" exclude-result-prefixes="workflow hive">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:hive="uri:oozie:hive-action:0.2">
 
 <xsl:template match="hive:hive">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive.0.3.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:hive="uri:oozie:hive-action:0.3" exclude-result-prefixes="workflow hive">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:hive="uri:oozie:hive-action:0.3">
 
 <xsl:template match="hive:hive">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive.0.4.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:hive="uri:oozie:hive-action:0.4" exclude-result-prefixes="workflow hive">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:hive="uri:oozie:hive-action:0.4">
 
 <xsl:template match="hive:hive">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive.0.5.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:hive="uri:oozie:hive-action:0.5" exclude-result-prefixes="workflow hive">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:hive="uri:oozie:hive-action:0.5">
 
 <xsl:template match="hive:hive">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive.0.6.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:hive="uri:oozie:hive-action:0.6" exclude-result-prefixes="workflow hive">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:hive="uri:oozie:hive-action:0.6">
 
 <xsl:template match="hive:hive">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive2.0.1.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:hive2="uri:oozie:hive2-action:0.1" exclude-result-prefixes="workflow hive">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:hive2="uri:oozie:hive2-action:0.1">
 
 <xsl:template match="hive2:hive2">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/hive2.0.2.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:hive2="uri:oozie:hive2-action:0.2" exclude-result-prefixes="workflow hive">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:hive2="uri:oozie:hive2-action:0.2">
 
 <xsl:template match="hive2:hive2">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/shell.0.1.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:shell="uri:oozie:shell-action:0.1" exclude-result-prefixes="workflow shell">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:shell="uri:oozie:shell-action:0.1">
 
 <xsl:import href="../nodes/fields/command.xslt"/>
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/shell.0.2.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:shell="uri:oozie:shell-action:0.2" exclude-result-prefixes="workflow shell">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:shell="uri:oozie:shell-action:0.2">
 
 <xsl:import href="../nodes/fields/command.xslt"/>
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/shell.0.3.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:shell="uri:oozie:shell-action:0.3" exclude-result-prefixes="workflow shell">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:shell="uri:oozie:shell-action:0.3">
 
 <xsl:import href="../nodes/fields/command.xslt"/>
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/spark.0.1.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:spark="uri:oozie:spark-action:0.1" exclude-result-prefixes="workflow spark">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:spark="uri:oozie:spark-action:0.1">
 
 <xsl:template match="spark:spark">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/sqoop.0.2.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:sqoop="uri:oozie:sqoop-action:0.2" exclude-result-prefixes="workflow sqoop">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sqoop="uri:oozie:sqoop-action:0.2">
 
 <xsl:template match="sqoop:sqoop">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/sqoop.0.3.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:sqoop="uri:oozie:sqoop-action:0.3" exclude-result-prefixes="workflow sqoop">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sqoop="uri:oozie:sqoop-action:0.3">
 
 <xsl:template match="sqoop:sqoop">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/sqoop.0.4.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:sqoop="uri:oozie:sqoop-action:0.4" exclude-result-prefixes="workflow sqoop">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sqoop="uri:oozie:sqoop-action:0.4">
 
 <xsl:template match="sqoop:sqoop">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/ssh.0.1.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:ssh="uri:oozie:ssh-action:0.1" exclude-result-prefixes="workflow ssh">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ssh="uri:oozie:ssh-action:0.1">
 
 <xsl:import href="../nodes/fields/command.xslt"/>
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/extensions/ssh.0.2.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:ssh="uri:oozie:ssh-action:0.2" exclude-result-prefixes="workflow ssh">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ssh="uri:oozie:ssh-action:0.2">
 
 <xsl:import href="../nodes/fields/command.xslt"/>
 

+ 2 - 2
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/decision.xslt

@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
-<xsl:template match="workflow:decision" xmlns:workflow="uri:oozie:workflow:0.5">
+<xsl:template match="workflow5:decision | workflow4:decision" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
   <xsl:for-each select="*[local-name()='switch']/*[local-name()='case']">
     ,"path<xsl:value-of select='position()'/>": "<xsl:value-of select='@to'/>"

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/command.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template name="command">
   "command":"<xsl:value-of select="*[local-name()='exec']"/>"

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/jar_path.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template name="jar_path">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/job_properties.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template name="job_properties">
   ,"job_properties": [

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/job_xml.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template name="job_xml">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/mapper.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template name="mapper">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/prepares.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template name="prepares">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/reducer.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template name="reducer">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/script_path.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template name="script_path">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/touchzs.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template name="touchzs">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/user.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template name="user">
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fields/xml.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 
 <xsl:template match="*" mode="copy-no-namespaces">

+ 2 - 2
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fork.xslt

@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
-<xsl:template match="workflow:fork" xmlns:workflow="uri:oozie:workflow:0.5">
+<xsl:template match="workflow5:fork | workflow4:fork" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
   <xsl:for-each select="*">
     ,"path<xsl:value-of select='position()'/>": "<xsl:value-of select="@start"/>"
   </xsl:for-each>

+ 2 - 2
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/fs.xslt

@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
 <xsl:import href="fields/touchzs.xslt"/>
 
-<xsl:template match="workflow:fs" xmlns:workflow="uri:oozie:workflow:0.5">
+<xsl:template match="workflow5:fs | workflow4:fs" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
   ,"fs": { <xsl:call-template name="touchzs"/> }
 

+ 2 - 2
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/generic.xslt

@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
 <xsl:import href="fields/xml.xslt"/>
 
-<xsl:template match="workflow:*[local-name()!='decision' and local-name()!='end' and local-name()!='fork' and local-name()!='fs' and local-name()!='java' and local-name()!='join' and local-name()!='kill' and local-name()!='map-reduce' and local-name()!='pig' and local-name()!='start' and local-name()!='streaming' and local-name()!='subworkflow' and local-name()!='distcp' and local-name()!='email' and local-name()!='hive' and local-name()!='shell' and local-name()!='sqoop' and local-name()!='ssh' and local-name()!='ok' and local-name()!='error']" xmlns:workflow="uri:oozie:workflow:0.5">
+<xsl:template match="workflow5:*[local-name()!='decision' and local-name()!='end' and local-name()!='fork' and local-name()!='fs' and local-name()!='java' and local-name()!='join' and local-name()!='kill' and local-name()!='map-reduce' and local-name()!='pig' and local-name()!='start' and local-name()!='streaming' and local-name()!='subworkflow' and local-name()!='distcp' and local-name()!='email' and local-name()!='hive' and local-name()!='shell' and local-name()!='sqoop' and local-name()!='ssh' and local-name()!='ok' and local-name()!='error'] | workflow4:*[local-name()!='decision' and local-name()!='end' and local-name()!='fork' and local-name()!='fs' and local-name()!='java' and local-name()!='join' and local-name()!='kill' and local-name()!='map-reduce' and local-name()!='pig' and local-name()!='start' and local-name()!='streaming' and local-name()!='subworkflow' and local-name()!='distcp' and local-name()!='email' and local-name()!='hive' and local-name()!='shell' and local-name()!='sqoop' and local-name()!='ssh' and local-name()!='ok' and local-name()!='error']" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
   ,"generic": {<xsl:call-template name="xml"/>}
 

+ 2 - 2
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/java.xslt

@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
 <xsl:import href="fields/jar_path.xslt"/>
 
-<xsl:template match="workflow:java" xmlns:workflow="uri:oozie:workflow:0.5">
+<xsl:template match="workflow5:java | workflow4:java" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
   ,"java": {
         "main-class": "<xsl:value-of select="*[local-name()='main-class']"/>"

+ 2 - 2
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/mapreduce.xslt

@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
 <xsl:import href="fields/job_properties.xslt"/>
 
-<xsl:template match="workflow:map-reduce" xmlns:workflow="uri:oozie:workflow:0.5">
+<xsl:template match="workflow5:map-reduce | workflow4:map-reduce" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
     <xsl:call-template name="job_properties"/>
 

+ 2 - 2
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/pig.xslt

@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
 <xsl:import href="fields/script_path.xslt"/>
 
-<xsl:template match="workflow:pig" xmlns:workflow="uri:oozie:workflow:0.5">
+<xsl:template match="workflow5:pig | workflow4:pig" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
   ,"pig": {<xsl:call-template name="script_path"/>}
 

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/streaming.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
 <xsl:import href="fields/mapper.xslt"/>
 <xsl:import href="fields/reducer.xslt"/>

+ 2 - 2
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/nodes/subworkflow.xslt

@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
-<xsl:template match="workflow:sub-workflow" xmlns:workflow="uri:oozie:workflow:0.5">
+<xsl:template match="workflow5:sub-workflow | workflow4:sub-workflow" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
   , "subworkflow": { "app-path":"<xsl:value-of select="*[local-name()='app-path']"/>" }
 </xsl:template>
 

+ 12 - 4
apps/oozie/src/oozie/importlib/xslt2/workflows/0.5/workflow.xslt

@@ -1,16 +1,24 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" xmlns:sla="uri:oozie:sla:0.2" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow5="uri:oozie:workflow:0.5" xmlns:workflow4="uri:oozie:workflow:0.4">
 
 <xsl:include href="action.xslt"/>
 <xsl:include href="control.xslt"/>
 
-<xsl:template match="/workflow:workflow-app">
+<xsl:template match="/workflow5:workflow-app">
 
-   [ <xsl:apply-templates select="workflow:start | workflow:end | workflow:decision | workflow:fork | workflow:join | workflow:kill"/>
-    <xsl:apply-templates select="workflow:action"/> {}]
+   [ <xsl:apply-templates select="workflow5:start | workflow5:end | workflow5:decision | workflow5:fork | workflow5:join | workflow5:kill"/>
+    <xsl:apply-templates select="workflow5:action"/> {}]
 
 </xsl:template>
 
+<xsl:template match="/workflow4:workflow-app">
+
+   [ <xsl:apply-templates select="workflow4:start | workflow4:end | workflow4:decision | workflow4:fork | workflow4:join | workflow4:kill"/>
+    <xsl:apply-templates select="workflow4:action"/> {}]
+
+</xsl:template>
+
+
 <xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
 </xsl:stylesheet>

+ 1 - 1
apps/oozie/src/oozie/importlib/xslt2/workflows/workflow.xslt

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:workflow="uri:oozie:workflow:0.5" exclude-result-prefixes="workflow">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="workflow">
 
 <xsl:include href="0.5/workflow.xslt"/>
 

+ 2 - 5
apps/oozie/src/oozie/models2.py

@@ -570,11 +570,8 @@ def _dig_nodes(nodes, adj_list, user, wf_nodes):
         properties['user'] = '%s@%s' % (node.get('ssh').get('user'), node.get('ssh').get('host'))
         properties['ssh_command'] = node.get('ssh').get('command')
       elif node['node_type'] == 'fs':
-        #TBD: all
-        properties['deletes'] = [{'value': f['name']} for f in json.loads(node.get('deletes'))]
-        properties['mkdirs'] = [{'value': f['name']} for f in json.loads(node.get('mkdirs'))]
-        properties['moves'] = json.loads(node.get('moves'))
-        properties['touchzs'] = [{'value': f['name']} for f in json.loads(node.get('touchzs'))]
+        fs_props = node.get('fs')
+        # TBD: gather props for different fs operations
       elif node['node_type'] == 'email':
         properties['to'] = node.get('email').get('to')
         properties['subject'] = node.get('email').get('subject')

+ 93 - 0
apps/oozie/src/oozie/tests2.py

@@ -793,3 +793,96 @@ class TestExternalWorkflowGraph(object):
     assert_equal(workflow_data['layout'][0]['rows'][6]['widgets'][0]['widgetType'], 'decision-widget')
     assert_equal(workflow_data['workflow']['nodes'][7]['type'], 'decision-widget')
     assert_true(len(workflow_data['workflow']['nodes'][7]['children']) == 2)
+
+  def test_gen_workflow_data_from_xml_for_oozie_schema04(self):
+    self.wf.definition = """<workflow-app xmlns="uri:oozie:workflow:0.4" name="capture-output-wf">
+      <credentials>
+        <credential name="hive2" type="hive2">
+          <property>
+            <name>hive2.jdbc.url</name>
+            <value>jdbc:hive2://huetest-1.gce.cloudera.com:10000/default</value>
+          </property>
+          <property>
+            <name>hive2.server.principal</name>
+            <value>hive/huetest-1.gce.cloudera.com@GCE.CLOUDERA.COM</value>
+          </property>
+        </credential>
+      </credentials>
+
+        <start to="fork1"/>
+
+        <fork name="fork1">
+            <path start="capture-shell"/>
+            <path start="hive-node"/>
+        </fork>
+        <action name="capture-shell">
+            <shell xmlns="uri:oozie:shell-action:0.1">
+                <job-tracker>${jobTracker}</job-tracker>
+                <name-node>${nameNode}</name-node>
+                <exec>capture-shell.sh</exec>
+                <file>capture-shell.sh#capture-shell.sh</file>
+                <capture-output/>
+            </shell>
+            <ok to="join1"/>
+            <error to="fail"/>
+        </action>
+        <action name="hive-node" cred="hive2">
+            <hive2 xmlns="uri:oozie:hive2-action:0.1">
+                <job-tracker>${jobTracker}</job-tracker>
+                <name-node>${nameNode}</name-node>
+                <jdbc-url>jdbc:hive2://huetest-1.gce.cloudera.com:10000/default</jdbc-url>
+                <script>/user/cconner/chris1.sql</script>
+            </hive2>
+            <ok to="join1"/>
+            <error to="fail"/>
+        </action>
+
+        <join name="join1" to="email1"/>
+
+        <action name="email1">
+            <email xmlns="uri:oozie:email-action:0.1">
+                <to>oozie@admin1.sec.cloudera.com</to>
+                <subject>capture output workflow</subject>
+                <body>yay</body>
+            </email>
+            <ok to="java-decision"/>
+            <error to="fail"/>
+        </action>
+
+        <action name='java-decision'>
+            <java>
+                <job-tracker>${jobTracker}</job-tracker>
+                <name-node>${nameNode}</name-node>
+                <configuration>
+                    <property>
+                        <name>mapred.job.queue.name</name>
+                        <value>${queueName}</value>
+                    </property>
+                </configuration>
+                <main-class>com.test.CurrentTime</main-class>
+                <capture-output/>
+            </java>
+            <ok to="java-decision1" />
+            <error to="fail" />
+        </action>
+        <decision name="java-decision1">
+               <switch>
+               <case to="end">${(wf:actionData('java-decision')['key1'] == "true")}</case>
+               <default to="fail" />
+               </switch>
+        </decision>
+
+        <kill name="fail">
+            <message>Hive failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
+        </kill>
+        <end name="end"/>
+    </workflow-app>
+    """
+
+    workflow_data = Workflow.gen_workflow_data_from_xml(self.user, self.wf)
+
+    assert_true(len(workflow_data['layout'][0]['rows']) == 10)
+    assert_true(len(workflow_data['workflow']['nodes']) == 10)
+    assert_equal(workflow_data['layout'][0]['rows'][6]['widgets'][0]['widgetType'], 'decision-widget')
+    assert_equal(workflow_data['workflow']['nodes'][7]['type'], 'decision-widget')
+    assert_true(len(workflow_data['workflow']['nodes'][7]['children']) == 2)