dk.netarkivet.archive.tools
Class RunBatch

java.lang.Object
  extended by dk.netarkivet.common.tools.ToolRunnerBase
      extended by 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
RunBatch()
           
 
Method Summary
static void main(java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunBatch

public RunBatch()
Method Detail

main

public static void main(java.lang.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 class ToolRunnerBase
Returns:
an instance of RunBatchTool.