diff --git a/public/scala/src/org/broadinstitute/sting/queue/QScript.scala b/public/scala/src/org/broadinstitute/sting/queue/QScript.scala index 3120d5d62..fce65c997 100755 --- a/public/scala/src/org/broadinstitute/sting/queue/QScript.scala +++ b/public/scala/src/org/broadinstitute/sting/queue/QScript.scala @@ -64,7 +64,8 @@ trait QScript extends Logging with PrimitiveOptionConversions with StringFileCon */ def onExecutionDone(jobs: Map[QFunction, JobRunInfo], success: Boolean) { logger.info("Script %s with %d total jobs".format(if (success) "completed successfully" else "failed", jobs.size)) - for ( (f, info) <- jobs ) logger.info(" %s %s".format(f.jobName, info)) + // this is too much output + // for ( (f, info) <- jobs ) logger.info(" %s %s".format(f.jobName, info)) } /** diff --git a/public/scala/src/org/broadinstitute/sting/queue/engine/InProcessRunner.scala b/public/scala/src/org/broadinstitute/sting/queue/engine/InProcessRunner.scala index 25baaca4f..a580be473 100644 --- a/public/scala/src/org/broadinstitute/sting/queue/engine/InProcessRunner.scala +++ b/public/scala/src/org/broadinstitute/sting/queue/engine/InProcessRunner.scala @@ -3,6 +3,7 @@ package org.broadinstitute.sting.queue.engine import org.broadinstitute.sting.queue.function.InProcessFunction import java.util.Date import org.broadinstitute.sting.queue.util.{Logging, IOUtils} +import org.broadinstitute.sting.utils.Utils /** * Runs a function that executes in process and does not fork out an external process. @@ -12,6 +13,7 @@ class InProcessRunner(val function: InProcessFunction) extends JobRunner[InProce def start() = { getRunInfo.startTime = new Date() + getRunInfo.exechosts = Utils.resolveHostname() runStatus = RunnerStatus.RUNNING function.run() diff --git a/public/scala/src/org/broadinstitute/sting/queue/engine/JobRunInfo.scala b/public/scala/src/org/broadinstitute/sting/queue/engine/JobRunInfo.scala index 03124a420..2caa4d2aa 100644 --- a/public/scala/src/org/broadinstitute/sting/queue/engine/JobRunInfo.scala +++ b/public/scala/src/org/broadinstitute/sting/queue/engine/JobRunInfo.scala @@ -39,6 +39,7 @@ class JobRunInfo { var startTime: Date = _ /** The done time with millisecond resolution of this job */ var doneTime: Date = _ + var exechosts: String = "localhost" def getStartTime = startTime def getDoneTime = doneTime @@ -48,6 +49,8 @@ class JobRunInfo { /** Helper function that pretty prints the date */ private def formatTime(d: Date) = if ( d != null ) formatter.format(d) else "null" + def getExecHosts = exechosts + /** * Was any information set for this jobInfo? JobInfo can be unset because * the job never ran or because it already completed. diff --git a/public/scala/src/org/broadinstitute/sting/queue/engine/QGraph.scala b/public/scala/src/org/broadinstitute/sting/queue/engine/QGraph.scala index 557230b05..4469874e2 100755 --- a/public/scala/src/org/broadinstitute/sting/queue/engine/QGraph.scala +++ b/public/scala/src/org/broadinstitute/sting/queue/engine/QGraph.scala @@ -39,6 +39,7 @@ import org.broadinstitute.sting.queue.util._ import collection.immutable.{TreeSet, TreeMap} import org.broadinstitute.sting.queue.function.scattergather.{ScatterFunction, CloneFunction, GatherFunction, ScatterGatherableFunction} import java.util.Date +import org.broadinstitute.sting.utils.Utils /** * The internal dependency tracker between sets of function input and output files. @@ -321,6 +322,7 @@ class QGraph extends Logging { foreachFunction(readyJobs.toList, edge => { if (running) { edge.myRunInfo.startTime = new Date() + edge.getRunInfo.exechosts = Utils.resolveHostname() logEdge(edge) edge.myRunInfo.doneTime = new Date() edge.markAsDone diff --git a/public/scala/src/org/broadinstitute/sting/queue/engine/lsf/Lsf706JobRunner.scala b/public/scala/src/org/broadinstitute/sting/queue/engine/lsf/Lsf706JobRunner.scala index 166008c26..323cc63ff 100644 --- a/public/scala/src/org/broadinstitute/sting/queue/engine/lsf/Lsf706JobRunner.scala +++ b/public/scala/src/org/broadinstitute/sting/queue/engine/lsf/Lsf706JobRunner.scala @@ -276,6 +276,13 @@ object Lsf706JobRunner extends Logging { // the platform LSF startTimes are in seconds, not milliseconds, so convert to the java convention runner.getRunInfo.startTime = new Date(jobInfo.startTime.longValue * 1000) runner.getRunInfo.doneTime = new Date(jobInfo.endTime.longValue * 1000) + val exHostsRaw = jobInfo.exHosts.getStringArray(0) + //logger.warn("exHostsRaw = " + exHostsRaw) + val exHostsList = exHostsRaw.toList + //logger.warn("exHostsList = " + exHostsList) + val exHosts = exHostsList.reduceLeft(_ + "," + _) + //logger.warn("exHosts = " + exHosts) + runner.getRunInfo.exechosts = exHosts } runner.updateStatus( diff --git a/public/scala/src/org/broadinstitute/sting/queue/engine/shell/ShellJobRunner.scala b/public/scala/src/org/broadinstitute/sting/queue/engine/shell/ShellJobRunner.scala index 4124f65a0..ae899868a 100755 --- a/public/scala/src/org/broadinstitute/sting/queue/engine/shell/ShellJobRunner.scala +++ b/public/scala/src/org/broadinstitute/sting/queue/engine/shell/ShellJobRunner.scala @@ -28,6 +28,8 @@ import org.broadinstitute.sting.queue.function.CommandLineFunction import org.broadinstitute.sting.queue.util.ShellJob import org.broadinstitute.sting.queue.engine.{RunnerStatus, CommandLineJobRunner} import java.util.Date +import org.broadinstitute.sting.gatk.phonehome.GATKRunReport +import org.broadinstitute.sting.utils.Utils /** * Runs jobs one at a time locally @@ -52,6 +54,7 @@ class ShellJobRunner(val function: CommandLineFunction) extends CommandLineJobRu updateJobRun(job) getRunInfo.startTime = new Date() + getRunInfo.exechosts = Utils.resolveHostname() updateStatus(RunnerStatus.RUNNING) job.run() getRunInfo.doneTime = new Date() diff --git a/public/scala/src/org/broadinstitute/sting/queue/util/QJobReport.scala b/public/scala/src/org/broadinstitute/sting/queue/util/QJobReport.scala index 04ae54c21..85896da66 100644 --- a/public/scala/src/org/broadinstitute/sting/queue/util/QJobReport.scala +++ b/public/scala/src/org/broadinstitute/sting/queue/util/QJobReport.scala @@ -48,12 +48,13 @@ trait QJobReport extends Logging { def disableReport() { reportEnabled = false } def setRunInfo(info: JobRunInfo) { - logger.info("info " + info) + //logger.info("info " + info) reportFeatures = Map( "iteration" -> 1, "analysisName" -> getReportGroup, "jobName" -> QJobReport.workAroundSameJobNames(this), "intermediate" -> self.isIntermediate, + "exechosts" -> info.getExecHosts, "startTime" -> info.getStartTime.getTime, "doneTime" -> info.getDoneTime.getTime, "formattedStartTime" -> info.getFormattedStartTime,