Costin, thanks very much for your reply.
Yes, the job is unusual. The business requirement involves being able to configure new hadoop clusters from within the tool. Therefore, we cannot write properties files in advance. And we're not sure in advance where each job will need to be launched. So the information on the file system resides in a domain object. The only way I could find to get settings from the domain object into the batch process was via the jobParameters class. However, I'm quite new to this library and very open to suggestions.
Is it harmful to have the configuration object exist only within the step scope? I was not able find the syntax to define the configuration in-line, so to speak. The pseudo-code would be something like (built lazily from the example page)
Code:
<batch:job id="helloWorldJob">
<batch:step id="helloWorldStep" next="copyFiles">
<tasklet ref="helloWorldTasklet"/>
</batch:step>
<batch:step id="copyFiles" next="wordCount">
<hdp:script-tasklet scope="step">
// Define a file system here to copy files around
// getting the fs.default.name from jobParameters['fs.default.name']
<hdp:script language="groovy" location="classpath:/scripts/copy-files.groovy">
<hdp:property name="myFs" value="#{jobParameters['message']}"/>
<hdp:property name="inputDir" value="#{jobParameters['wordcount.input.path']}"/>
<hdp:property name="outputDir" value="#{jobParameters['wordcount.output.path']}"/>
<hdp:property name="localFile" value="#{jobParameters['local.data']}"/>
</hdp:script>
</hdp:script-tasklet>
</batch:step>
<batch:step id="wordCount">
// Define probably the same file system here, along with M/R classes
// getting the fs.default.name from jobParameters['fs.default.name']
//
// execute job
//
</batch:step>
</batch:job>
However I can't seem to find a syntax that won't error.
Your suggestion on not using namespace is a bit confusing to me. I was using
Code:
<hdp:configuration />
because it instantiates the ConfigurationFactoryBean type. I'm probably mis-understanding you.
Any other insights would be welcome. I'm more interested in solutions to the underlying use case than this particular method, so if they occur to you please share.
And I thank you again for your time, I know that you are a significant contributor to the project.
b