Setup
Login to a bitarchive server, eg.
$ ssh kb-test-acs-001 $ 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_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
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/EvilBatch.class -R.*.arc -Ooutput.evil
This should produce a file output.evil with:
Legal Legal Legal Legal
This is run on the KBN replica, which has four bitapps (according to the configuration file 'deploy_config_multi_bitapps.xml'). Therefore the sentence 'Legal' is written four times.
The SBN replica one has one bitapp, and it should therefore only have the sentence, 'Legal', written once.
Run
java -cp lib/dk.netarkivet.archive.jar -Dsettings.common.applicationInstanceId=EVILSB -Ddk.netarkivet.settings.file=conf/settings_IndexServerApplication.xml dk.netarkivet.archive.tools.RunBatch -Cbatchprogs/EvilBatch.class -R.*.arc -Ooutput.evil.sb -BSBN
This should produce a file output.evil with:
Legal
This is run on the SBN replica, which has only one bitapp (according to the configuration file 'deploy_config_multi_bitapps.xml'). Therefore the sentence 'Legal' is written once.