Now captures the exechost in the job report
-- Works for in process, shell, and LSF runners -- Cleanup of debugging output
This commit is contained in:
parent
7bf006278d
commit
b38de1fa35
|
|
@ -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))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue