This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
recoverall
executable file
·62 lines (50 loc) · 1.57 KB
/
recoverall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env bash
APPNAME="recoverall"
# find voltdb binaries in either installation or distribution directory.
if [ -n "$(which voltdb 2> /dev/null)" ]; then
VOLTDB_BIN=$(dirname "$(which voltdb)")
else
VOLTDB_BIN="$(dirname $(dirname $(dirname $(pwd))))/bin"
echo "The VoltDB scripts are not in your PATH."
echo "For ease of use, add the VoltDB bin directory: "
echo
echo $VOLTDB_BIN
echo
echo "to your PATH."
echo
fi
# call script to set up paths, including
# java classpaths and binary paths
source $VOLTDB_BIN/voltenv
VOLTDB="$VOLTDB_BIN/voltdb"
LOG4J="$VOLTDB_VOLTDB/log4j.xml"
HOST="localhost"
function recoverall() {
java -classpath voltexport.jar:$APPCLASSPATH -Dlog4j.configuration=file:$LOG4J \
org.voltdb.utils.voltexport.VoltExport \
--properties=FILE.properties \
--exportall=true \
--nousage=true \
$@
}
function help() {
echo "
Scans an export overflow directory to export all streams/partitions found in that directory.
By default exports in the same directory unless --outdir is provided.
Usage: recoverall [parameters]
Parameters:
indir: full path to export_overflow directory, e.g
--indir=/home/test/voltdbroot/export_overflow
outdir: full path to an output directory, e.g
--outdir=/home/test/voltdbroot/export_overflow
default value = --indir
catalog: full path of catalog jar file, e.g.
--catalog=/home/test/voltdbroot/config/catalog.jar
"
}
# Simple wrap of voltexport
if [[ "$@" == "--help" || -z "$@" ]]; then
help
else
recoverall $@
fi