From e037f7d6ae3cba23879870877f671cf43a1f9726 Mon Sep 17 00:00:00 2001 From: dawncx Date: Fri, 17 Jan 2014 15:18:10 +0800 Subject: [PATCH] merge --- .../haflow/engine/oozie/OozieFlowXmlGenerator.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/haflow/engine/oozie/OozieFlowXmlGenerator.java b/src/main/java/haflow/engine/oozie/OozieFlowXmlGenerator.java index cb82490..3e985ab 100644 --- a/src/main/java/haflow/engine/oozie/OozieFlowXmlGenerator.java +++ b/src/main/java/haflow/engine/oozie/OozieFlowXmlGenerator.java @@ -11,6 +11,8 @@ import haflow.module.AbstractJavaModule; import haflow.module.Module; import haflow.service.NodeConfigurationService; import haflow.util.DocumentTransformer; +import haflow.util.OozieJobGlobalConfiguration; +import haflow.util.XmlFilter; import java.util.HashMap; import java.util.List; @@ -81,8 +83,12 @@ public class OozieFlowXmlGenerator { .getNodeConfiguration(node.getId()); for (NodeConfiguration ncp : ncps) { String key = ncp.getKey(); + String value = ncp.getValue(); - userConfs.put(key, value); + //convert to formatter xml style + String xmlValue=XmlFilter.encodeXml(value); + + userConfs.put(key, xmlValue); } if( inputConfigurations.get(node.getId()) != null ){ @@ -143,7 +149,7 @@ public class OozieFlowXmlGenerator { } private NodeConfigurationService nodeConfigurationService; - private GlobalConfiguration globalConfiguration; + private OozieJobGlobalConfiguration globalConfiguration; private GraphTransformer graphTransformer; @Autowired @@ -153,7 +159,7 @@ public class OozieFlowXmlGenerator { } @Autowired - private void setGlobalConfiguration(GlobalConfiguration globalConfiguration) { + private void setGlobalConfiguration(OozieJobGlobalConfiguration globalConfiguration) { this.globalConfiguration = globalConfiguration; }