...
- -O<outputfile> is a file where the output from the batch job will be written. By default, it goes to stdout, but it will be mixed with other output to stdout.
- -E<errorFile> is a file where the errors from the batch job will be written. By default, it goes to stderr.
An example of an execution command is:
Code Block |
---|
export SETTINGSFILENAME=settings_ArcRepositoryApplication.xml java -Ddk.netarkivet.settings.file=/home/user/conf/settings_ArcRepositoryApplication.xml$SETTINGSFILENAME \ -cp lib/dk.netarkivet.archive.jar \ dk.netarkivet.archive.tools.RunBatch \ -CFindMime.class -R10-*.arc -BReplicaOne -Oresfile |
which will take in lib/dk.netarkivet.archive.jar* in the class path and execute the general NetarchiveSuite program *dk.netarkivet.archive.tools.RunBatch based on settings from file /home/user/conf/settings_ArcRepositoryApplication.xml. This will result in running the batch program FindMime.class*on the bitarchive replica named *ReplicaOne, but only on files with names matching the pattern 10-.arc*. The results written by the batch program is concatenated and placed in the output file named resfile.
...
To package the files do the following:
Code Block |
---|
jar -cvf batchfile.jar |
...
PATH/batchProgram.class |
where path PATH is the path to the directory where the batch class files are placed. This is under the bin/ directory in the eclipse project. The batchProgram.class is the compiled file for your batch program.
The call to run this batch job is then:
Code Block |
---|
export SETTINGSFILENAME=settings_ArcRepositoryApplication.xml java -Ddk.netarkivet.settings.file=conf/settings_ArcRepositoryApplication.xml$SETTINGSFILENAME \ -cp lib/dk.netarkivet.archive.jar \ dk.netarkivet.archive.tools.RunBatch \ -Jbatch.jar -Npath.batchProgram |
...