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

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

@Mshinom

Description

@Mshinom

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions