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/conf/settings_BitarchiveApplication.xml dk.netarkivet.archive.tools.RunBatch -Cbatchprogs/ChecksumJob.class -R.*.arc -Ooutput.checksum
This should produce a fileĀ output.checksum with be something like:
1-metadata-1.arc##9dca301f9ecd3663bbb3cdc91009562c 1-1-20130114144130-00001-kb-test-har-001.kb.dk.arc##1abe93f92569154da3f629255146dcfd 1-1-20130114144130-00002-kb-test-har-001.kb.dk.arc##6b2801ca68d7c96af8b05ba9e9ae47b4 1-1-20130114144130-00003-kb-test-har-001.kb.dk.arc##5c77d44ad9fc9290f2cd6639562ed11a 1-1-20130114144130-00000-kb-test-har-001.kb.dk.arc##c1e533f574a46576fc14393581428129
EvilBatch
Writes the sentence 'evil' for each bitarchive.
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
This should produce a fileĀ output.checksum with be something like:
1-metadata-1.arc##9dca301f9ecd3663bbb3cdc91009562c 1-1-20130114144130-00001-kb-test-har-001.kb.dk.arc##1abe93f92569154da3f629255146dcfd 1-1-20130114144130-00002-kb-test-har-001.kb.dk.arc##6b2801ca68d7c96af8b05ba9e9ae47b4 1-1-20130114144130-00003-kb-test-har-001.kb.dk.arc##5c77d44ad9fc9290f2cd6639562ed11a 1-1-20130114144130-00000-kb-test-har-001.kb.dk.arc##c1e533f574a46576fc14393581428129