This commit is contained in:
dawncx 2014-01-17 15:18:10 +08:00
parent 771353e634
commit e037f7d6ae
1 changed files with 9 additions and 3 deletions

View File

@ -11,6 +11,8 @@ import haflow.module.AbstractJavaModule;
import haflow.module.Module; import haflow.module.Module;
import haflow.service.NodeConfigurationService; import haflow.service.NodeConfigurationService;
import haflow.util.DocumentTransformer; import haflow.util.DocumentTransformer;
import haflow.util.OozieJobGlobalConfiguration;
import haflow.util.XmlFilter;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -81,8 +83,12 @@ public class OozieFlowXmlGenerator {
.getNodeConfiguration(node.getId()); .getNodeConfiguration(node.getId());
for (NodeConfiguration ncp : ncps) { for (NodeConfiguration ncp : ncps) {
String key = ncp.getKey(); String key = ncp.getKey();
String value = ncp.getValue(); 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 ){ if( inputConfigurations.get(node.getId()) != null ){
@ -143,7 +149,7 @@ public class OozieFlowXmlGenerator {
} }
private NodeConfigurationService nodeConfigurationService; private NodeConfigurationService nodeConfigurationService;
private GlobalConfiguration globalConfiguration; private OozieJobGlobalConfiguration globalConfiguration;
private GraphTransformer graphTransformer; private GraphTransformer graphTransformer;
@Autowired @Autowired
@ -153,7 +159,7 @@ public class OozieFlowXmlGenerator {
} }
@Autowired @Autowired
private void setGlobalConfiguration(GlobalConfiguration globalConfiguration) { private void setGlobalConfiguration(OozieJobGlobalConfiguration globalConfiguration) {
this.globalConfiguration = globalConfiguration; this.globalConfiguration = globalConfiguration;
} }