Imported Upstream version 1.5.1
This commit is contained in:
BIN
contrib/server-repl-plugin/BabuDB_replication_plugin.jar
Normal file
BIN
contrib/server-repl-plugin/BabuDB_replication_plugin.jar
Normal file
Binary file not shown.
32
contrib/server-repl-plugin/LICENSE
Normal file
32
contrib/server-repl-plugin/LICENSE
Normal file
@@ -0,0 +1,32 @@
|
||||
Copyright (c) 2008-2011, Jan Stender, Bjoern Kolbeck, Mikael Hoegqvist,
|
||||
Felix Hupfeld, Felix Langner, Zuse Institute Berlin
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
* Neither the name of the Zuse Institute Berlin nor the
|
||||
names of its contributors may be used to endorse or promote
|
||||
products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
3
contrib/server-repl-plugin/README
Normal file
3
contrib/server-repl-plugin/README
Normal file
@@ -0,0 +1,3 @@
|
||||
For further details on how to use the BabuDB replication plug-in, please refer to the BabuDB Wiki:
|
||||
|
||||
http://code.google.com/p/babudb/wiki/UsageReplicationForJava
|
||||
82
contrib/server-repl-plugin/config/dir.properties
Normal file
82
contrib/server-repl-plugin/config/dir.properties
Normal file
@@ -0,0 +1,82 @@
|
||||
#####################################################################
|
||||
# BabuDB replication plugin configuration (DIR replication) #
|
||||
#####################################################################
|
||||
|
||||
#####################################################################
|
||||
# List of replicas and replication configuration
|
||||
#####################################################################
|
||||
|
||||
# participants of the replication including this replica
|
||||
babudb.repl.participant.0 = first-DIR-replica
|
||||
babudb.repl.participant.0.port = 35678
|
||||
babudb.repl.participant.1 = second-DIR-replica
|
||||
babudb.repl.participant.1.port = 35678
|
||||
babudb.repl.participant.2 = third-DIR-replica
|
||||
babudb.repl.participant.2.port = 35678
|
||||
|
||||
# number of servers that at least have to be up to date
|
||||
# To have a fault-tolerant system, this value has to be set to the
|
||||
# majority of nodes i.e., if you have three replicas, set this to 2
|
||||
# Please note that a setup with two nodes provides no fault-tolerance.
|
||||
babudb.repl.sync.n = 2
|
||||
|
||||
#####################################################################
|
||||
# Advanced Options (usually you do NOT have to edit these)
|
||||
#####################################################################
|
||||
|
||||
# It's possible to set the local address and port of this server explicitly.
|
||||
# If not, it will be chosen from the list of participants.
|
||||
#babudb.repl.localhost = localhost
|
||||
#babudb.repl.localport = 35678
|
||||
|
||||
# Choose here one of the predefined policies for handling database requests:
|
||||
#
|
||||
# MasterOnly - Redirect any kind of request to the master.
|
||||
# Provides strong consistency.
|
||||
# WriteRestriction - Same as MasterOnly plus lookup operations are also permitted on the slaves.
|
||||
# Consequently, clients may read stale values from a backup replica.
|
||||
# NoRestriction - Allows any kind of request to be performed at the local BabuDB instance.
|
||||
# May result into conflicts which are not resolved.
|
||||
#
|
||||
# default setting is MasterOnly.
|
||||
#babudb.repl.policy = MasterOnly
|
||||
|
||||
# DB backup directory - needed for the initial loading of the BabuDB from the
|
||||
# master in replication context
|
||||
babudb.repl.backupDir = /var/lib/xtreemfs/server-repl-dir
|
||||
|
||||
#####################################################################
|
||||
# SSL options (disabled by default)
|
||||
#####################################################################
|
||||
|
||||
# specify whether SSL is required
|
||||
#babudb.ssl.enabled = false
|
||||
|
||||
# server credentials for SSL handshakes
|
||||
#babudb.ssl.service_creds = /etc/xos/xtreemfs/truststore/certs/osd.p12
|
||||
#babudb.ssl.service_creds.pw = xtreemfs
|
||||
#babudb.ssl.service_creds.container = pkcs12
|
||||
|
||||
# trusted certificates for SSL handshakes
|
||||
#babudb.ssl.trusted_certs = /etc/xos/xtreemfs/truststore/certs/xosrootca.jks
|
||||
#babudb.ssl.trusted_certs.pw = xtreemfs
|
||||
#babudb.ssl.trusted_certs.container = jks
|
||||
|
||||
#babudb.ssl.authenticationWithoutEncryption = false
|
||||
|
||||
#####################################################################
|
||||
# Internal options (usually do not have to be touched)
|
||||
#####################################################################
|
||||
plugin.jar = /usr/share/java/BabuDB_replication_plugin.jar
|
||||
|
||||
# paths to libraries this plugin depends on
|
||||
babudb.repl.dependency.0 = /usr/share/java/Flease.jar
|
||||
|
||||
# local time renew in milliseconds
|
||||
#babudb.localTimeRenew = 0
|
||||
|
||||
# chunk size, for initial load of file chunks
|
||||
#babudb.repl.chunkSize = 5242880
|
||||
|
||||
# decides whether redirects should be handled by the user-application or not
|
||||
#babudb.repl.redirectIsVisible = false
|
||||
82
contrib/server-repl-plugin/config/mrc.properties
Normal file
82
contrib/server-repl-plugin/config/mrc.properties
Normal file
@@ -0,0 +1,82 @@
|
||||
#####################################################################
|
||||
# BabuDB replication plugin configuration (MRC replication) #
|
||||
#####################################################################
|
||||
|
||||
#####################################################################
|
||||
# List of replicas and replication configuration
|
||||
#####################################################################
|
||||
|
||||
# participants of the replication including this replica
|
||||
babudb.repl.participant.0 = first-MRC-replica
|
||||
babudb.repl.participant.0.port = 35676
|
||||
babudb.repl.participant.1 = second-MRC-replica
|
||||
babudb.repl.participant.1.port = 35676
|
||||
babudb.repl.participant.2 = third-MRC-replica
|
||||
babudb.repl.participant.2.port = 35676
|
||||
|
||||
# number of servers that at least have to be up to date
|
||||
# To have a fault-tolerant system, this value has to be set to the
|
||||
# majority of nodes i.e., if you have three replicas, set this to 2
|
||||
# Please note that a setup with two nodes provides no fault-tolerance.
|
||||
babudb.repl.sync.n = 2
|
||||
|
||||
#####################################################################
|
||||
# Advanced Options (usually you do NOT have to edit these)
|
||||
#####################################################################
|
||||
|
||||
# It's possible to set the local address and port of this server explicitly.
|
||||
# If not, it will be chosen from the list of participants.
|
||||
#babudb.repl.localhost = localhost
|
||||
#babudb.repl.localport = 35676
|
||||
|
||||
# Choose here one of the predefined policies for handling database requests:
|
||||
#
|
||||
# MasterOnly - Redirect any kind of request to the master.
|
||||
# Provides strong consistency.
|
||||
# WriteRestriction - Same as MasterOnly plus lookup operations are also permitted on the slaves.
|
||||
# Consequently, clients may read stale values from a backup replica.
|
||||
# NoRestriction - Allows any kind of request to be performed at the local BabuDB instance.
|
||||
# May result into conflicts which are not resolved.
|
||||
#
|
||||
# default setting is MasterOnly.
|
||||
#babudb.repl.policy = MasterOnly
|
||||
|
||||
# DB backup directory - needed for the initial loading of the BabuDB from the
|
||||
# master in replication context
|
||||
babudb.repl.backupDir = /var/lib/xtreemfs/server-repl-mrc
|
||||
|
||||
#####################################################################
|
||||
# SSL options (disabled by default)
|
||||
#####################################################################
|
||||
|
||||
# specify whether SSL is required
|
||||
#babudb.ssl.enabled = false
|
||||
|
||||
# server credentials for SSL handshakes
|
||||
#babudb.ssl.service_creds = /etc/xos/xtreemfs/truststore/certs/osd.p12
|
||||
#babudb.ssl.service_creds.pw = xtreemfs
|
||||
#babudb.ssl.service_creds.container = pkcs12
|
||||
|
||||
# trusted certificates for SSL handshakes
|
||||
#babudb.ssl.trusted_certs = /etc/xos/xtreemfs/truststore/certs/xosrootca.jks
|
||||
#babudb.ssl.trusted_certs.pw = xtreemfs
|
||||
#babudb.ssl.trusted_certs.container = jks
|
||||
|
||||
#babudb.ssl.authenticationWithoutEncryption = false
|
||||
|
||||
#####################################################################
|
||||
# Internal options (usually do not have to be touched)
|
||||
#####################################################################
|
||||
plugin.jar = /usr/share/java/BabuDB_replication_plugin.jar
|
||||
|
||||
# paths to libraries this plugin depends on
|
||||
babudb.repl.dependency.0 = /usr/share/java/Flease.jar
|
||||
|
||||
# local time renew in milliseconds
|
||||
#babudb.localTimeRenew = 0
|
||||
|
||||
# chunk size, for initial load of file chunks
|
||||
#babudb.repl.chunkSize = 5242880
|
||||
|
||||
# decides whether redirects should be handled by the user-application or not
|
||||
#babudb.repl.redirectIsVisible = false
|
||||
60
contrib/server-repl-plugin/update_BabuDB_replication_plugin_jar.sh
Executable file
60
contrib/server-repl-plugin/update_BabuDB_replication_plugin_jar.sh
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2012 Michael Berlin, Zuse Institute Berlin
|
||||
# Licensed under the BSD License, see LICENSE file for details.
|
||||
|
||||
set -e
|
||||
|
||||
trap onexit 1 2 3 15 ERR
|
||||
|
||||
function onexit() {
|
||||
local exit_status=${1:-$?}
|
||||
echo ERROR: Exiting $0 with $exit_status
|
||||
exit $exit_status
|
||||
}
|
||||
|
||||
replication_dir_in_babudb_trunk="java/replication"
|
||||
|
||||
cat <<EOF
|
||||
This script updates the binary .jar file which contains the BabuDB replication plugin.
|
||||
|
||||
EOF
|
||||
|
||||
if [ -z "$BABUDB" ]
|
||||
then
|
||||
known_babudb_dirs="../../../../googlecode-svn-babudb/trunk"
|
||||
for dir in $known_babudb_dirs
|
||||
do
|
||||
if [ -d "$dir" ]
|
||||
then
|
||||
BABUDB="$dir"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -z "$BABUDB" ]
|
||||
then
|
||||
echo "The environment variable BABUDB was not set. Please point it to a checkout directory of the SVN trunk of the BabuDB project (svn checkout http://babudb.googlecode.com/svn/trunk/ babudb)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$BABUDB" ]
|
||||
then
|
||||
echo "The environment variable BABUDB does not point to an existing directory. BABUDB = ${BABUDB}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Updating the .jar files required by the BabuDB replication code first..."
|
||||
${BABUDB}/${replication_dir_in_babudb_trunk}/update_jar_dependencies.sh
|
||||
echo "Finished updating the .jar files required by the BabuDB replication code."
|
||||
|
||||
echo "compiling BabuDB replication plugion (BabuDB_replication_plugin.jar)"
|
||||
babudb_replication_buildfile="${BABUDB}/${replication_dir_in_babudb_trunk}/build.xml"
|
||||
babudb_replication_jar_source="${BABUDB}/${replication_dir_in_babudb_trunk}/../dist/replication/BabuDB_replication_plugin.jar"
|
||||
babudb_replication_jar_dest=$(dirname "$0")
|
||||
|
||||
# ant clean -f "$babudb_replication_buildfile" >/dev/null
|
||||
ant jar -f "$babudb_replication_buildfile" >/dev/null
|
||||
cp -a "$babudb_replication_jar_source" "$babudb_replication_jar_dest"
|
||||
|
||||
echo "finished compiling BabuDB replication plugion (BabuDB_replication_plugin.jar)"
|
||||
Reference in New Issue
Block a user