7 CQLSH="/usr/bin/cqlsh -k authz"
10 if [ "$*" = "" ]; then
12 for Tdat in `ls *.dat`; do
13 if [ -s "${Tdat}" ]; then
14 DATA="$DATA ${Tdat%.dat}"
22 echo "You are about to REPLACE the data in the $ENV DB for the following tables:"
24 echo -n 'If you are VERY sure, type "YES": '
27 if [ ! "$YES" = "YES" ]; then
34 if [ -s "dats/${T}.dat" ]; then
37 # 2.1.14 still has NULL problems for COPY. Fixed in 2.1.15+
38 "approval"|"artifact"|"cred"|"ns"|"x509"|"role"|"notified")
39 $CQLSH -e "truncate $T"
43 $CQLSH -e "truncate $T"
47 $CQLSH -e "truncate $T; COPY authz.${T} FROM 'dats/${T}.dat' WITH DELIMITER='|'"
53 if [ ! "$UPLOAD" = "" ]; then
55 java -Dcadi_prop_files=../authBatch.props -DCASS_ENV=$ENV -jar ../aaf-auth-batch-*-full.jar Upload $UPLOAD
59 if [ "$DO_HISTORY" = "true" ]; then
60 $CQLSH -e "COPY authz.history FROM 'dats/history.dat' WITH DELIMITER='|'"