[Swift-commit] r2689 - provenancedb

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Mar 16 08:18:00 CDT 2009


Author: benc
Date: 2009-03-16 08:17:59 -0500 (Mon, 16 Mar 2009)
New Revision: 2689

Added:
   provenancedb/swift-prov-import-all-logs
Removed:
   provenancedb/import-all
Modified:
   provenancedb/provenance.xml
Log:
Rename user-exposed commands to swift-*

Deleted: provenancedb/import-all
===================================================================
--- provenancedb/import-all	2009-03-16 13:17:12 UTC (rev 2688)
+++ provenancedb/import-all	2009-03-16 13:17:59 UTC (rev 2689)
@@ -1,56 +0,0 @@
-#!/bin/bash
-
-PROVDIR=$(pwd)/$(dirname $0)/
-
-# we need to keep this out of the log-proceesing dir because import
-# of individual runs will clean other files.
-
-source paths.source
-export PATH=$PROVDIR:$PATH
-
-swift-plot-log $LOGREPO everylog-vs-versions.data
-
-# TODO better tmp handling that always using the same name in a shared
-# directory
-cp everylog-vs-versions.data /tmp/
-
-echo first commandline param is $1
-if [ "$1" == "rebuild" ]; then
-  echo CLEANING DATABASE
-  $SQLCMD < $PROVDIR/prov-init.sql
-fi
-
-while read start version filename; do
- if [ $version -ge 1538 ]; then
-   echo -n "Log: $filename ... "
-
-# TODO: this only works for psql, not for other DBs, so for now force it
-# to be non-existing
-#EXISTING=$(psql -p 5435 -d $PROVDB -U benc --tuples-only -c "select count(*) from known_workflows where workflow_log_filename='$filename';")
-EXISTING=0
-
-if [ "$EXISTING" -eq "0" ];  then
-echo IMPORTING
-
-if grep --silent "DEBUG Loader Swift finished with no errors" $filename; then
-
-   echo version $version in log file $filename
-     echo ============= will import =============
-     prepare-for-import $filename
-     import-run-to-sql $filename
-#     import-run-to-xml $filename
-     $SQLCMD -c "INSERT INTO known_workflows (workflow_log_filename, version, importstatus) VALUES ('$filename','$version','imported');"
-   else
-     echo SKIP: Workflow does not report successful end.
-     $SQLCMD -c "INSERT INTO known_workflows (workflow_log_filename, version, importstatus) VALUES ('$filename','$version','skipped - workflow did not end sucessfully');"
-   fi
-else
-echo SKIP: Already known in workflow
-fi
- fi
-done < /tmp/everylog-vs-versions.data
-
-# now pull the XML data into eXist, in as few runs as possible to avoid
-# JVM startup.
-# ls `pwd`/*.log.xml | time xargs ~/work/eXist/bin/client.sh -m /db/prov -ouri=xmldb:exist:// -p
-

Modified: provenancedb/provenance.xml
===================================================================
--- provenancedb/provenance.xml	2009-03-16 13:17:12 UTC (rev 2688)
+++ provenancedb/provenance.xml	2009-03-16 13:17:59 UTC (rev 2689)
@@ -182,7 +182,7 @@
 <para>
 Now import your logs for the first time like this:
 <screen>
-$ <userinput>./import-all rebuild</userinput>
+$ <userinput>./swift-prov-import-all-logs rebuild</userinput>
 </screen>
 </para>
 </section>

Copied: provenancedb/swift-prov-import-all-logs (from rev 2688, provenancedb/import-all)
===================================================================
--- provenancedb/swift-prov-import-all-logs	                        (rev 0)
+++ provenancedb/swift-prov-import-all-logs	2009-03-16 13:17:59 UTC (rev 2689)
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+PROVDIR=$(pwd)/$(dirname $0)/
+
+# we need to keep this out of the log-proceesing dir because import
+# of individual runs will clean other files.
+
+source paths.source
+export PATH=$PROVDIR:$PATH
+
+swift-plot-log $LOGREPO everylog-vs-versions.data
+
+# TODO better tmp handling that always using the same name in a shared
+# directory
+cp everylog-vs-versions.data /tmp/
+
+echo first commandline param is $1
+if [ "$1" == "rebuild" ]; then
+  echo CLEANING DATABASE
+  $SQLCMD < $PROVDIR/prov-init.sql
+fi
+
+while read start version filename; do
+ if [ $version -ge 1538 ]; then
+   echo -n "Log: $filename ... "
+
+# TODO: this only works for psql, not for other DBs, so for now force it
+# to be non-existing
+#EXISTING=$(psql -p 5435 -d $PROVDB -U benc --tuples-only -c "select count(*) from known_workflows where workflow_log_filename='$filename';")
+EXISTING=0
+
+if [ "$EXISTING" -eq "0" ];  then
+echo IMPORTING
+
+if grep --silent "DEBUG Loader Swift finished with no errors" $filename; then
+
+   echo version $version in log file $filename
+     echo ============= will import =============
+     prepare-for-import $filename
+     import-run-to-sql $filename
+#     import-run-to-xml $filename
+     $SQLCMD -c "INSERT INTO known_workflows (workflow_log_filename, version, importstatus) VALUES ('$filename','$version','imported');"
+   else
+     echo SKIP: Workflow does not report successful end.
+     $SQLCMD -c "INSERT INTO known_workflows (workflow_log_filename, version, importstatus) VALUES ('$filename','$version','skipped - workflow did not end sucessfully');"
+   fi
+else
+echo SKIP: Already known in workflow
+fi
+ fi
+done < /tmp/everylog-vs-versions.data
+
+# now pull the XML data into eXist, in as few runs as possible to avoid
+# JVM startup.
+# ls `pwd`/*.log.xml | time xargs ~/work/eXist/bin/client.sh -m /db/prov -ouri=xmldb:exist:// -p
+




More information about the Swift-commit mailing list