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
/
scan
executable file
·62 lines (50 loc) · 1.54 KB
/
scan
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="scan"
# 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 scan() {
java -classpath voltexport.jar:$APPCLASSPATH -Dlog4j.configuration=file:$LOG4J \
org.voltdb.utils.voltexport.VoltExport \
--properties=FILE.properties \
--onlyscan=true \
--nousage=true \
$@
}
function help() {
echo "
Scans an export overflow directory to display the sequence numbers of one streams/partition found in that directory.
Usage: scan [parameters]
Parameters:
indir: full path to export_overflow directory, e.g.
--indir=/home/test/voltdbroot/export_overflow
stream_name: name of stream to scan, e.g.:
--stream=SOURCE003
partition: partition to scan (default=0), e.g.:
--partition=5
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
scan $@
fi