[Swift-commit] r3767 - provenancedb/apps/oops

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sun Dec 12 17:47:03 CST 2010


Author: lgadelha
Date: 2010-12-12 17:47:03 -0600 (Sun, 12 Dec 2010)
New Revision: 3767

Removed:
   provenancedb/apps/oops/raptor_extractor.sh
Modified:
   provenancedb/apps/oops/oops_extractor.sh
Log:
Minor fixes.


Modified: provenancedb/apps/oops/oops_extractor.sh
===================================================================
--- provenancedb/apps/oops/oops_extractor.sh	2010-12-12 23:29:54 UTC (rev 3766)
+++ provenancedb/apps/oops/oops_extractor.sh	2010-12-12 23:47:03 UTC (rev 3767)
@@ -85,8 +85,7 @@
 		$SQLCMD -t -A -F " " -f query.sql -o result.txt
 		
 		while read dataset filename; do
-		    DATASET_ID=$(awk '{if (NR==1) print $1}' result.txt)
-		    FILENAME=$(awk '{if (NR==1) print $2}' result.txt | sed 's/file:\/\/localhost\///g')
+		    FILENAME=$(echo $filename | sed 's/file:\/\/localhost\///g')
 		    while read token1 token2 token3 token4; do
 			if [ "$token2" = "(Initial Energy:" ]; then
 			    initialenergy=$(echo $token3 | awk 'BEGIN { FS = "\)" }; {print $1}')

Deleted: provenancedb/apps/oops/raptor_extractor.sh
===================================================================
--- provenancedb/apps/oops/raptor_extractor.sh	2010-12-12 23:29:54 UTC (rev 3766)
+++ provenancedb/apps/oops/raptor_extractor.sh	2010-12-12 23:47:03 UTC (rev 3767)
@@ -1,75 +0,0 @@
-#!/bin/bash
-
-# Annotation extractor for the OOPS application
-# 
-# The directory $PROTESTS/swift-logs contains symbolic links to 
-# OOPS' Swift logs. 
-PROVDB_HOME=~/provenancedb
-PROTESTS_HOME=/gpfs/pads/oops/aashish/CASP
-IMPORT_HOME=~/protests
-
-source $PROVDB_HOME/etc/provenance.config
-
-# provdb_imported records runs already imported to the provenance database
-cd $IMPORT_HOME
-if [ ! -a provdb_imported_raptor ]; then
-    touch provdb_imported_raptor
-fi
-
-cd $PROTESTS_HOME
-for k in $(ls -1);
-do
-    cd $PROTESTS_HOME/$k
-    for i in $(ls | grep run.raptorloops; ls | grep run.loops);
-    do 
-	cd $IMPORT_HOME
-	if ! grep --silent $i provdb_imported_raptor; then
-	    if grep --silent "Swift finished with no errors" $PROTESTS_HOME/$k/$i/RaptorLoops-*.log; then
-	        # 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_raptor
-		cd swift-logs
-	    # annotate workflows with their oops runid
-		OOPS_RUN_ID=$(echo $i | awk -F . '{print $3}')
-		cd $PROTESTS_HOME/$k/$i
-		LOG_FILENAME=$(ls | grep RaptorLoops- | grep "\."log$)
- 		WORKFLOW_ID=$(echo "select id from workflow where log_filename like '%$LOG_FILENAME%'" | $SQLCMD -t | awk '{print $1}')
-		cd $IMPORT_HOME/swift-logs
-		echo "insert into annot_wf_txt values ('$WORKFLOW_ID','oops_run_id','$OOPS_RUN_ID');" | $SQLCMD
-		
-		echo "select file.id,file.filename from process, ds_usage, ds_containment, file where  process.id=ds_usage.process_id and ds_usage.dataset_id=out_id and file.id=ds_containment.in_id and filename like '%.params' and process.name='PrepLoop' and process.workflow_id='$WORKFLOW_ID';" > query.sql;
-		
-		$SQLCMD -t -A -F " " -f query.sql -o result.txt
-		
-        DATASET_ID=$(awk '{if (NR==1) print $1}' result.txt)
-        FILENAME=$(awk '{if (NR==1) print $2}' result.txt | sed 's/file:\/\/localhost\///g')
-		
-		cd $PROTESTS_HOME/$k/run.raptorloops.$OOPS_RUN_ID
-		
-		while read line; do
-		    NAME=$(echo $line | awk 'BEGIN { FS = "=" }; {print $1}')
-		    if [ "$NAME" = "SAMPLE RANGE" ]; then
-			VALUE1=$(echo $line | awk 'BEGIN { FS = "=" }; {print $2}' | awk 'BEGIN { FS = "-" }; {print $1}')
-			VALUE2=$(echo $line | awk 'BEGIN { FS = "=" }; {print $2}' | awk 'BEGIN { FS = "-" }; {print $2}')
-			echo "insert into annot_ds_num values ('$DATASET_ID', '$NAME BEGIN', $VALUE1);" | $SQLCMD
-			echo "insert into annot_ds_num values ('$DATASET_ID', '$NAME END', $VALUE2);" | $SQLCMD
-		    fi 
-		    if [ "$NAME" = "RESTRAIN DISTANCE" ]; then
-			VALUE1=$(echo $line | awk 'BEGIN { FS = "=" }; {print $2}' | awk 'BEGIN { FS = "," }; {print $1}')
-			VALUE2=$(echo $line | awk 'BEGIN { FS = "=" }; {print $2}' | awk 'BEGIN { FS = "," }; {print $2}')
-			echo "insert into annot_ds_num values ('$DATASET_ID', '$NAME 1', $VALUE1);" | $SQLCMD
-			echo "insert into annot_ds_num values ('$DATASET_ID', '$NAME 2', $VALUE2);" | $SQLCMD
-		    fi 
-		    if [ "$NAME" = "MAXIMUM NUMBER OF STEPS" ]; then
-			VALUE=$(echo $line | awk 'BEGIN { FS = "=" }; {print $2}')
-			echo "insert into annot_ds_num values ('$DATASET_ID', '$NAME', $VALUE);" | $SQLCMD
-		    fi 
-		done < $FILENAME
-	    fi
-	fi 
-    done
-done




More information about the Swift-commit mailing list