Uses a command-line tool several times and check that the output from the tool is correct as well as that the appropriate bit archives have been queried.
Setup
Login to a bitarchive server, eg.
$ ssh netarkiv@sb-test-bar-001.statsbiblioteket.dk $ export TESTX=TEST11A $ cd ${TESTX}
Create dir for batchprograms:
$ mkdir batchprogs $ scp test@kb-prod-udv-001.kb.dk:/home/test/test-batch/* batchprogs/.
Run batch programs
ChecksumJob
Calculating the MD5 checksum on the archive files (only .arc files).
Run
java -cp lib/dk.netarkivet.archive.jar -Dsettings.common.applicationInstanceId=CHECKSUM -Ddk.netarkivet.settings.file=conf/settings_IndexServerApplication.xml dk.netarkivet.archive.tools.RunBatch -Cbatchprogs/ChecksumJob.class -R.*.arc -Ooutput.checksum
Consol output should be something like:
Mar 16, 2009 11:23:12 AM dk.netarkivet.archive.arcrepository.distribute.JMSArcRepositoryClient <init> INFO: JMSArcRepositoryClient will retry a store 3 times and timeout on each try after 3600000 milliseconds, and timeout on each getrequest after 60000 milliseconds. Mar 16, 2009 11:23:12 AM dk.netarkivet.common.distribute.JMSConnectionSunMQ <init> INFO: Creating instance of dk.netarkivet.common.distribute.JMSConnectionSunMQ Mar 16, 2009 11:23:12 AM dk.netarkivet.common.distribute.JMSConnection initConnection INFO: Initializing a JMS connection of type 'class dk.netarkivet.common.distribute.JMSConnectionSunMQ' to Broker at kb-test-adm-001.kb.dk:7676. Mar 16, 2009 11:23:13 AM dk.netarkivet.archive.arcrepository.distribute.JMSArcRepositoryClient <init> INFO: JMSArcRepository listens for replies on channel '[Queue 'JOLF_COMMON_THIS_REPOS_CLIENT_130_226_228_5_ISA']' Running batch job 'batchprogs/ChecksumJob.class' on files matching 'arc.*' on replica 'KBN', output written to file 'output.checksum', errors written to stderr Processed 11 files with 0 failures Cleaning up dk.netarkivet.common.distribute.JMSConnectionSunMQ Cleaned up dk.netarkivet.common.distribute.JMSConnectionSunMQ
Content of fileĀ output.checksum should be something like:
1-1-20090316092641-00003-kb-test-har-002.kb.dk.arc##c68b3e18f7b870b76d86de7970a822c2 2-2-20090316092643-00003-kb-test-har-001.kb.dk.arc##7d723dd4d374437c5e29e995521bf014 1-1-20090316092641-00001-kb-test-har-002.kb.dk.arc##038c1a09bed89a6f7bdb7db029c98c9b 2-2-20090316092643-00002-kb-test-har-001.kb.dk.arc##7eef07cc6332c5e97ef80b92d1428e2d 2-metadata-1.arc##1ef96326228f9e705db6d14087be9fe8 1-1-20090316092641-00002-kb-test-har-002.kb.dk.arc##b2ce92e8381b3e4ee4780af0be24b0ee 1-metadata-1.arc##ff2b5bdd901a4045f06e8c3171f7b6e9 2-2-20090316092643-00000-kb-test-har-001.kb.dk.arc##a050db8b02c05270eeacac6de3f328e9 1-1-20090316092641-00000-kb-test-har-002.kb.dk.arc##e0dedb1584f422d54a36f2684ce8ee56 1-1-20090316093403-00004-kb-test-har-002.kb.dk.arc##bb3f96f74d9c8d1ae545ec84d914d976 2-2-20090316092643-00001-kb-test-har-001.kb.dk.arc##a321400d7a168230e5ed7d8427be05be