Skip to content
This repository has been archived by the owner on Jan 6, 2018. It is now read-only.

Why oozie run configuration in xml will replace local configuration? #842

Open
Mshinom opened this issue Dec 12, 2016 · 0 comments
Open

Comments

@Mshinom
Copy link

Mshinom commented Dec 12, 2016

Now I will call the jobRun method with some special parameters to run coordinator job. And these parameters were writed in co_XXX.xml. I want these special parameters not to be replaced with those in co_XXX.xml. Can I do these modifies?
Modifies:
core/src/main/java/org/apache/oozie/command/coord/CoordActionStartXCommand.java:
143:--XConfiguration.copyNotReplace(localConf, runConf);
143:++XConfiguration.copyNotReplace(localConf, runConf);
core/src/main/java/org/apache/oozie/util/XConfiguration.java:
++ public static void copyNotReplace(Configuration source, Configuration target) {
++ for (Map.Entry<String, String> entry : source) {
++ if(target.get(entry.getKey()) == null) {
++ target.set(entry.getKey(), entry.getValue());
++ }
++ }
++ }
My purpose is that let the run configuration not replaced by configuration in xml.
What extra erros will happen if I do these changes?
And I want to know original purpose of original replacing.
Thanks very much for any suggestions!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant