![]() |
Octopus Replicator replicates SQL tables. It can work between different database backends as long as they contain equivalent schemas (e.g. Atlas Geometry Database, Tag database, etc.). It is configured to replicate between Oracle, MySQL and SQLite, but other possibilities can be supported too:
Octopus contains default mapping rules, they can be customised if needed. Octopus Replicator works in two steps:
Replication task is managed by three files:
|
Octopus uses following files:
Octopus | top level directory |
Octopus/ant | directory fr configuration files |
Octopus/ant/build.xml | Ant build file with instructions |
Octopus/ant/build.properties | Ant properties file |
Octopus/ant/map.properties | customisation mapping rules |
Octopus/run | working directory (all files here are generated by Octopus) |
Octopus/run/LoaderJob.olj | Loader task description |
Octopus/run/sql | directory for SQL scripts |
Octopus/run/xml | directory for auxiliary schema definitions |
Octopus/run/doml | directory database schema in DOML format |
Octopus/run/GeneratorLog*.txt | Generator task log |
Octopus/run/LoaderLog*.txt | Loader task log |
The package distribution is available here. Java 1.5+ and Ant 1.5+ is required to run.
setFetchSize
command,
large tables should be replicated in pieces defined by hand.
This can be easily done by modifying importDefintion
tag in
run/xml/ImportDefinition.oli
file.
The load task should then be run for each chosen interval or run/xml/ImportDefinition.oli
file should contain several importDefinition
elements, one for each interval.
<importDefinition name="rome_tags" tableName="rome_tags" selectStatement="select * from rome_tags where EventNumber > 10 and EventNumber < 20;">
. /afs/cern.ch/sw/lcg/external/Java/bin/setup.sh
Octopus/lib/octopus
,
edit configure.properties
to point to your Java home,
run sh configure
.
# Inside Octopus/ant,
# edit build.properties and map.properties to satisfy your requirements.
...
# Generate replication scripts.
# The work is being done in your Octopus/run directory.
# Octopus generates confguration files (top level one is LoaderJob.olj)
# and sql scripts (in sql subdiretory) to be used later for replication.
ant generate
# Replicate (create replica) using generated scripts.
ant load
# Do everything in one step (= clean, generate, load).
ant replicate
# Recompile Atlas modifications to Octopus.
# They are placed in src subdirectory and results in Octopus/lib/OctopusPatch.jar library.
# To do the recompilation, a User has to copy the whole OctopusReplicator package
# (not just its ant directory used to run).
# Other sources, which could be eventualy modified, can be downloaded
# from http://octopus.objectweb.org site and put into src directory.
ant patch
# Ask for help.
ant -projecthelp
Bugs:
ToDos:
Requests: