cd /home/dan/src/jini/spaceor
java -Djava.security.policy=config/policy.all
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:lib/dashboard.jar:lib/stats.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.dash.StartDashBoard dancres
cd /home/dan/src/jini/space
java -Djava.security.policy=config/policy.all
-classpath lib/dashboard.jar:lib/stats.jar:/home/dan/jini/jini2_1/lib/jsk-lib.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.dash.StartDashBoard rogue:4160 dancres
NOTE: The provision of stats can be controlled programmatically or via the configuration file. Currently, for Dashboard to provide full information, you must have enabled appropriate options in the configuration file - e.g.:
import org.dancres.blitz.stats.Switch;
import org.dancres.blitz.stats.OpSwitch;
import org.dancres.blitz.stats.InstanceSwitch;
org.dancres.blitz {
stats = new Switch[] {new OpSwitch(OpSwitch.ALL_TYPES,
OpSwitch.TAKE_OPS, true),
new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.READ_OPS, true),
new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.WRITE_OPS, true),
new InstanceSwitch(InstanceSwitch.ALL_TYPES, true)};
}
StorageModel
s including Transient
.
SyncAndShutdown
supports lookup of a Blitz
JavaSpaces instance via multicast discovery (just specify the space
name) or unicast discovery (specify the lookup service host and the
space name):
cd /home/dan/src/jini/spaceor
java -Djava.security.policy=config/policy.all
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:lib/blitz.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.SyncAndShutdown dancres
cd /home/dan/src/jini/space
java -Djava.security.policy=config/policy.all
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:lib/blitz.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.SyncAndShutdown rogue:4160 dancres
NOTE:The shutdown of a Blitz instance may
result in the loss of state associated with transactions active (not
commited) at the time of shutdown. Typically, entries written under
such transactions will be lost and any takes performed will not have
been completed such that the Entry
s will
remain in the databases. All Entry
s untouched
by transactions are guarenteed to be undamaged.
SyncAndShutdown
. This tool
will work in combination with SyncAndShutdown
against even a transient Blitz instance.
Basic usage of DumpEntries
requires
that you specify the blitz configuration file of the Blitz instance
whose contents you wish to display.
cd /home/dan/src/jini/space
java -Djava.security.policy=config/policy.all
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:dbjava/je.jar:lib/blitz.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.DumpEntries config/blitz.config
DumpEntries
will display not only
Blitz internal information but will also attempt to unpack the Entry
instance and display it using the relevant codebase. To disable this
feature (perhaps because the codebase is not available) run DumpEntries
as follows:
cd /home/dan/src/jini/space
java -Djava.security.policy=config/policy.all -Dnounpack=true
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:dbjava/je.jar:lib/blitz.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.DumpEntries config/blitz.config
NOTE: Dumping the contents of a Blitz
instance should only be done after it's been
shutdown using SyncAndShutdown
. DumpEntries
is strictly read-only and, therefore, cannot damage the contents of the
databases.
cd /home/dan/src/jini/spaceor
java -Djava.security.policy=config/policy.all
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:lib/blitz.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.HotBackup /home/dan/src/jini/space/backups dancres
cd /home/dan/src/jini/space
java -Djava.security.policy=config/policy.all
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:lib/blitz.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.HotBackup /home/dan/src/jini/space/backups rogue:4160 dancres
Note: the specified directory should be empty otherwise the backup will be refused.
The Cleanup
tool remotely connects
to a specified Blitz instance causing it to clean out all old Entry's.
The process performs the following steps:
Cleanup
supports lookup of a Blitz
JavaSpaces instance via multicast discovery (just specify the space
name) or unicast discovery (specify the lookup service host and the
space name):
cd /home/dan/src/jini/spaceor
java -Djava.security.policy=config/policy.all
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:lib/blitz.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.Cleanup dancres
cd /home/dan/src/jini/space
java -Djava.security.policy=config/policy.all
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:lib/blitz.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.Cleanup rogue:4160 dancres
leaseReapInterval
is set to LeaseReaper.MANUAL_REAP
. Failure to
set this option will cause manual lease cleanup to fail.
This tool works with all StorageModel
s
including Transient
. RequestReap
supports lookup of a Blitz JavaSpaces instance via multicast discovery
(just specify the space name) or unicast discovery (specify the lookup
service host and the space name):
cd /home/dan/src/jini/spaceor
java -Djava.security.policy=config/policy.all
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:lib/blitz.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.RequestReap dancres
cd /home/dan/src/jini/space
java -Djava.security.policy=config/policy.all
-classpath /home/dan/jini/jini2_1/lib/jsk-lib.jar:lib/blitz.jar:/home/dan/jini/jini2_1/lib/jsk-platform.jar:/home/dan/jini/jini2_1/lib/sun-util.jar
org.dancres.blitz.tools.RequestReap rogue:4160 dancres
This tool can be used offline in a similar fashion to DumpEntries, to examine Blitz's activity logs allowing the user to form a picture of exactly what operations were performed during a particular run. Log Dumping can only be used for persistent instances and includes details of lease renewals, notification registrations, transactions and read/write/take.
The tool requires a single argument which is the directory
specified in the logDir
variable of the
relevant .config
. Here's an example:
java -Djava.security.policy=config/policy.all
-classpath /Users/dan/jini/jini2_1/lib/jsk-lib.jar:/Users/dan/jini/jini2_1/lib/jsk-platform.jar:lib/blitz.jar
org.prevayler.implementation.SnapshotPrevaylerImpl
/Users/dan/blitz-install/logs/
Note that normally, only successful operations are logged but
it can sometimes be useful to also see failed reads and takes. By
default Blitz does not log these but you can enable it by adding logSearches
= new Boolean(true);
to your blitz configuration file.
You may also wish to enable logging of instance counts by
adding logCounts = new Boolean(true);
to your blitz configuration file.
In accordance with the Jini specifications, Blitz will only read the initial
* lookup parameters from it's configuration file on first boot (in transient mode this means the parameters are re-read every boot, whilst persistent modes will deem first boot to occur when there's no previous log or database state present).
Under various circumstances it can be desirable to reset Blitz's internal lookup settings from a configuration file post first-boot. This ReconfigLookup
tool is used to perform this task providing support to selectively import settings from a specified configuration file.
ReconfigLookup
accepts a path to a configuration file followed by one or more flags indicating which lookup settings to import. These flags are -groups
, -attrs
, -locators
. An example usage of this tool appears below:
java -Djava.security.policy=config/policy.all
-classpath /Users/dan/jini/jini2_1/lib/jsk-lib.jar:/Users/dan/jini/jini2_1/lib/jsk-platform.jar:lib/blitz.jar:dbjava/je.jar
org.dancres.blitz.tools.ReconfigLookup
/Users/dan/blitz/config/blitz.config
-groups -attrs -locators