[Swift-commit] r3749 - in provenancedb: . apps/oops
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Wed Dec 8 16:28:44 CST 2010
Author: lgadelha
Date: 2010-12-08 16:28:44 -0600 (Wed, 08 Dec 2010)
New Revision: 3749
Modified:
provenancedb/apps/oops/oops_extractor.sh
provenancedb/prov-init.sql
provenancedb/swift-prov-import-all-logs
Log:
Minor fixes.
Modified: provenancedb/apps/oops/oops_extractor.sh
===================================================================
--- provenancedb/apps/oops/oops_extractor.sh 2010-12-08 19:28:18 UTC (rev 3748)
+++ provenancedb/apps/oops/oops_extractor.sh 2010-12-08 22:28:44 UTC (rev 3749)
@@ -6,7 +6,7 @@
# OOPS' Swift logs.
PROVDB_HOME=~/provenancedb
-PROTESTS_HOME=//CASP
+PROTESTS_HOME=/gpfs/pads/oops/aashish/CASP
IMPORT_HOME=~/protests
source $PROVDB_HOME/etc/provenance.config
@@ -27,12 +27,14 @@
if ! grep --silent $i provdb_imported; then
if grep --silent "Swift finished with no errors" $PROTESTS_HOME/$k/$i/psim.loops-*.log; then
cd swift-logs
- for j in `ls $PROTESTS_HOME/$k/$i | grep psim.loops-`; do
- ln -s $PROTESTS_HOME/$k/$i/$j
- done
+ #for j in `ls $PROTESTS_HOME/$k/$i | grep psim.loops-`; do
+ # ln -s $PROTESTS_HOME/$k/$i/$j
+ #done
cd import
# swift-prov-import-all-logs also controls what already has been
# imported, so it does not repeat work
+ echo "export LOGREPO=$PROTESTS_HOME/$k/$i" > $PROVDB_HOME/etc/provenance.config
+ echo "export SQLCMD=\"psql -U provdb -h db.ci.uchicago.edu provdb\"" >> $PROVDB_HOME/etc/provenance.config
$PROVDB_HOME/swift-prov-import-all-logs
cd $IMPORT_HOME
echo $i >> provdb_imported
Modified: provenancedb/prov-init.sql
===================================================================
--- provenancedb/prov-init.sql 2010-12-08 19:28:18 UTC (rev 3748)
+++ provenancedb/prov-init.sql 2010-12-08 22:28:44 UTC (rev 3749)
@@ -252,7 +252,7 @@
annot_wf_num,
annot_wf_txt,
annot_wf_bool,
- extrainfo,
+-- extrainfo,
createarray,
createarray_member,
array_range
Modified: provenancedb/swift-prov-import-all-logs
===================================================================
--- provenancedb/swift-prov-import-all-logs 2010-12-08 19:28:18 UTC (rev 3748)
+++ provenancedb/swift-prov-import-all-logs 2010-12-08 22:28:44 UTC (rev 3749)
@@ -41,35 +41,38 @@
EXISTING=$($SQLCMD --tuples-only -c "select count(*) from workflow where log_filename='$filename';")
if [ "$EXISTING" -eq "0" ]; then
- echo IMPORTING
-
- if grep --silent "DEBUG Loader Swift finished with no errors" $filename; then
- wfstatus="SUCCESS"
- else
- wfstatus="FAIL"
+ PROV_ENABLED=$(grep provenance $filename | wc -l)
+ if [ "$PROV_ENABLED" -ge "0" ]; then
+ echo IMPORTING
+
+ if grep --silent "DEBUG Loader Swift finished with no errors" $filename; then
+ wfstatus="SUCCESS"
+ else
+ wfstatus="FAIL"
+ fi
+
+ export RUNID=$(basename $filename .log)
+
+ export WF="${RUNID}"
+
+ echo "INSERT INTO workflow (id, log_filename, swift_version, import_status) VALUES ('$WF','$filename','$version','$wfstatus');" | $SQLCMD
+
+ echo version $version in log file $filename
+ echo ============= will import =============
+ prepare-for-import $filename
+ if [ "$?" != "0" ]; then
+ echo prepare-for-import failed
+ exit 2
+ fi
+ version=$version import-run-to-sql $filename
+ if [ "$?" != "0" ]; then
+ echo import-run-to-sql failed
+ exit 3
+ fi
+
+ # import-run-to-xml $filename
+ echo SKIP: provenance.log not true in swift.properties
fi
-
- export RUNID=$(basename $filename .log)
-
- export WF="${RUNID}"
-
- echo "INSERT INTO workflow (id, log_filename, swift_version, import_status) VALUES ('$WF','$filename','$version','$wfstatus');" | $SQLCMD
-
- echo version $version in log file $filename
- echo ============= will import =============
- prepare-for-import $filename
- if [ "$?" != "0" ]; then
- echo prepare-for-import failed
- exit 2
- fi
- version=$version import-run-to-sql $filename
- if [ "$?" != "0" ]; then
- echo import-run-to-sql failed
- exit 3
- fi
-
- # import-run-to-xml $filename
-
else
echo SKIP: Already known in workflow
fi
More information about the Swift-commit
mailing list