[Swift-commit] r4234 - in provenancedb: . apps/oops

lgadelha at ci.uchicago.edu lgadelha at ci.uchicago.edu
Thu Mar 31 19:29:56 CDT 2011


Author: lgadelha
Date: 2011-03-31 19:29:56 -0500 (Thu, 31 Mar 2011)
New Revision: 4234

Modified:
   provenancedb/apps/oops/oops_extractor.sh
   provenancedb/swift-prov-import-all-logs
Log:
Minor updates.


Modified: provenancedb/apps/oops/oops_extractor.sh
===================================================================
--- provenancedb/apps/oops/oops_extractor.sh	2011-03-31 22:05:18 UTC (rev 4233)
+++ provenancedb/apps/oops/oops_extractor.sh	2011-04-01 00:29:56 UTC (rev 4234)
@@ -39,10 +39,10 @@
 		LOG_FILENAME=$(ls *-*-*-*.log)
  		WORKFLOW_ID=$(echo "select id from run where log_filename like '%$LOG_FILENAME%'" | $SQLCMD -t | awk '{print $1}')
 		cd $IMPORT_HOME/swift-logs
-		echo "insert into annot_run_text (id, name, value) values ('$WORKFLOW_ID','oops_run_id','$OOPS_RUN_ID');" | $SQLCMD
+		echo "insert into annot_run_text (run_id, name, value) values ('$WORKFLOW_ID','oops_run_id','$OOPS_RUN_ID');" | $SQLCMD
 		
 		#extracts scientific parameters given as input to the workflow in file *.params.
-		echo "select file.id,file.filename from process, dataset_production, dataset_containment, file where  process.id=dataset_production.process_id and dataset_usage.dataset_id=out_id and file.id=dataset_containment.in_id and filename like '%.params' and process.name='PrepLoop' and process.run_id='$WORKFLOW_ID';" > query.sql;
+		echo "select file.id,file.filename from process, dataset_production, dataset_containment, file where  process.id=dataset_production.process_id and dataset_production.dataset_id=out_id and file.id=dataset_containment.in_id and filename like '%.params' and process.name='PrepLoop' and process.run_id='$WORKFLOW_ID';" > query.sql;
 		
 		$SQLCMD -t -A -F " " -f query.sql -o result.txt
 		
@@ -110,28 +110,28 @@
 		    while read token1 token2 token3 token4; do
 			if [ "$token2" = "(Initial Energy:" ]; then
 			    initialenergy=$(echo $token3 | awk 'BEGIN { FS = "\)" }; {print $1}')
-			    echo "insert into annot_dataset_numeric (id, name, value) values ('$dataset', 'initial_energy', $initialenergy);" | $SQLCMD
+			    echo "insert into annot_dataset_numeric (dataset_id, name, value) values ('$dataset', 'initial_energy', $initialenergy);" | $SQLCMD
 			fi
 			if [ "$token1" = "Total" ] && [ "$token2" = "Function" ] && [ "$token3" = "Evaluations:" ]; then
-			    echo "insert into annot_dataset_numeric (id, name, value) values ('$dataset', 'total_function_evaluations', $token4);" | $SQLCMD
+			    echo "insert into annot_dataset_numeric (dataset_id, name, value) values ('$dataset', 'total_function_evaluations', $token4);" | $SQLCMD
 			fi 
 			if [ "$token1" = "Increasing" ] && [ "$token2" = "transitions:" ]; then
-			    echo "insert into annot_dataset_numeric (id, name, value) values ('$dataset', 'accepted_increasing_transitions', $token3);" | $SQLCMD
+			    echo "insert into annot_dataset_numeric (dataset_id, name, value) values ('$dataset', 'accepted_increasing_transitions', $token3);" | $SQLCMD
 			fi 
 			if [ "$token1" = "Decreasing" ] && [ "$token2" = "transitions:" ]; then
-			    echo "insert into annot_dataset_numeric (id, name, value) values ('$dataset', 'accepted_decreasing_transitions', $token3);" | $SQLCMD
+			    echo "insert into annot_dataset_numeric (dataset_id, name, value) values ('$dataset', 'accepted_decreasing_transitions', $token3);" | $SQLCMD
 			fi 
 			if [ "$token1" = "Rejected" ] && [ "$token2" = "transitions:" ]; then
-			    echo "insert into annot_dataset_numeric (id, name, value) values ('$dataset', 'rejected_transitions', $token3);" | $SQLCMD
+			    echo "insert into annot_dataset_numeric (dataset_id, name, value) values ('$dataset', 'rejected_transitions', $token3);" | $SQLCMD
 			fi 
 			if [ "$token1" = "Final" ] && [ "$token2" = "Energy:" ]; then
-			    echo "insert into annot_dataset_numeric (id, name, value) values ('$dataset', 'final_energy', $token3);" | $SQLCMD
+			    echo "insert into annot_dataset_numeric (dataset_id, name, value) values ('$dataset', 'final_energy', $token3);" | $SQLCMD
 			fi 
 			if [ "$token1" = "Final" ] && [ "$token2" = "Temp:" ]; then
-			    echo "insert into annot_dataset_numeric (id, name, value) values ('$dataset', 'final_temp', $token3);" | $SQLCMD
+			    echo "insert into annot_dataset_numeric (dataset_id, name, value) values ('$dataset', 'final_temp', $token3);" | $SQLCMD
 			fi 
 			if [ "$token1" = "Total" ] && [ "$token2" = "Running" ] && [ "$token3" = "Time:" ]; then
-			    echo "insert into annot_dataset_numeric (id, name, value) values ('$dataset', 'total_running_time', $token4);" | $SQLCMD
+			    echo "insert into annot_dataset_numeric (dataset_id, name, value) values ('$dataset', 'total_running_time', $token4);" | $SQLCMD
 			fi 
 		    done < $FILENAME
 		done < $IMPORT_HOME/swift-logs/result.txt

Modified: provenancedb/swift-prov-import-all-logs
===================================================================
--- provenancedb/swift-prov-import-all-logs	2011-03-31 22:05:18 UTC (rev 4233)
+++ provenancedb/swift-prov-import-all-logs	2011-04-01 00:29:56 UTC (rev 4234)
@@ -45,7 +45,7 @@
 	    if [ $PROV_ENABLED -gt 0 ]; then
 		echo IMPORTING
 		
-		if grep --silent "INFO  Loader Swift finished with no errors" $filename; then
+		if grep --silent "Loader Swift finished with no errors" $filename; then
 		    wfstatus="SUCCESS"
     		else
 		    wfstatus="FAIL"




More information about the Swift-commit mailing list