Class RunBatch
- java.lang.Object
-
- dk.netarkivet.common.tools.ToolRunnerBase
-
- dk.netarkivet.archive.tools.RunBatch
-
public class RunBatch extends ToolRunnerBase
A command-line tool to run batch jobs in the bitarchive.Usage: java dk.netarkivet.archive.tools.RunBatch with arguments as defined in local class BatchParameters
where:
-J<jarfile> is a file containing all the classes needed by a BatchJob
-C<classfile> is a file containing a FileBatchJob implementation
-R<regexp> is a regular expression that will be matched against file names in the archive, by default .*
-B<replica> is the name of the bitarchive replica this should be run on, by default taken from settings.
-O<outputfile< is a file where the output from the batch job will be written. By default, it goes to stdout.
-E<errorFile> is a file where the errors from the batch job will be written. By default, it goes to stderr.
-N<className> is the name of the primary class to be loaded when doing a LoadableJarBatchJob
-A<Arguments> The arguments for the batchjob, separated by '##', e.g. -Aarg1##arg2##...
Examples:
java dk.netarkivet.archive.tools.RunBatch -CFindMime.class \ -R10-*.arc -BReplicaOne -Omimes
java dk.netarkivet.archive.tools.RunBatch -JFindMime.jar -NFindMime \ -R10-*.arc -BReplicaOne -Omimes
Note that you probably want to set the application instance id setting ( CommonSettings#APPLICATION_INSTANCE_ID) to something other than its default value to avoid clashing with other channel listeners.
-
-
Constructor Summary
Constructors Constructor Description RunBatch()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] argv)
Main method.protected SimpleCmdlineTool
makeMyTool()
Create an instance of the actual RunBatchTool.-
Methods inherited from class dk.netarkivet.common.tools.ToolRunnerBase
runTheTool, showMessage
-
-
-
-
Method Detail
-
main
public static void main(String[] argv)
Main method. Runs a batch job in the bitarchive. Setup, teardown and run is delegated to the RunBatchTool class. Management of this, exception handling etc. is delegated to ToolRunnerBase class.- Parameters:
argv
- command line parameters as defined in local class BatchParameters required: The name of a class-file containing an implementation of FileBatchJob Name of jar file which includes the class file, and the className
-
makeMyTool
protected SimpleCmdlineTool makeMyTool()
Create an instance of the actual RunBatchTool.- Specified by:
makeMyTool
in classToolRunnerBase
- Returns:
- an instance of RunBatchTool.
-
-