11

From the Oozie CLI I want to do something like this:

oozie job -oozie http://host:port/oozie -config jobConfig.properties, baseConfig.properties -submit

I have a lot of different jobs I'm running where a portion of the .properties file is identical. I'd like to be able to move that duplicated portion into a single baseConfig.properties file, and combine this with the job-specific part when I submit the job.

Tim Goodman
  • 20,835
  • 7
  • 54
  • 80

2 Answers2

11

If the number of overridden properties is small, you can just reference the base config file, and then use the -Dprop1=value notation for each property you want to customize.

Otherwise i think you have two (possibly three) alternatives (as you can't pass multiple config options to the current OOZIE client):

  1. Create a script that concatenates the base and job specific property files together, and the run oozie with the name of the merged file
  2. Using the source from OozieCLI as a starting point, write an extension class that can handle a CSV value for the -config option, or can handle multiple -config argument instances
  3. Are you able to move the common attributes into static jobXml files for each action, then you would only need a single config file for the actual differences between the job runs.
Chris White
  • 29,241
  • 4
  • 69
  • 92
3

I could put default values into config-default.xml file as desribed here: http://oozie.apache.org/docs/3.3.2/WorkflowFunctionalSpec.html#a4.1_Workflow_Job_Properties_or_Parameters

It works in most of cases.

Oleksii
  • 1,071
  • 7
  • 12