Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/42#discussion_r10633389
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/JobLogger.scala ---
    @@ -80,187 +81,78 @@ class JobLogger(val user: String, val logDirName: 
String)
     
       /**
        * Create a log file for one job
    -   * @param jobID ID of the job
    +   * @param jobId ID of the job
        * @throws FileNotFoundException Fail to create log file
        */
    -  protected def createLogWriter(jobID: Int) {
    +  protected def createLogWriter(jobId: Int) {
         try {
    -      val fileWriter = new PrintWriter(logDir + "/" + logDirName + "/" + 
jobID)
    -      jobIDToPrintWriter += (jobID -> fileWriter)
    +      val fileWriter = new PrintWriter(logDir + "/" + logDirName + "/" + 
jobId)
    +      jobIdToPrintWriter += (jobId -> fileWriter)
         } catch {
           case e: FileNotFoundException => e.printStackTrace()
         }
       }
     
       /**
    -   * Close log file, and clean the stage relationship in stageIDToJobID
    -   * @param jobID ID of the job
    +   * Close log file, and clean the stage relationship in stageIdToJobId
    +   * @param jobId ID of the job
        */
    -  protected def closeLogWriter(jobID: Int) {
    -    jobIDToPrintWriter.get(jobID).foreach { fileWriter =>
    +  protected def closeLogWriter(jobId: Int) {
    +    jobIdToPrintWriter.get(jobId).foreach { fileWriter =>
           fileWriter.close()
    -      jobIDToStages.get(jobID).foreach(_.foreach{ stage =>
    -        stageIDToJobID -= stage.id
    +      jobIdToStageIds.get(jobId).foreach(_.foreach { stageId =>
    +        stageIdToJobId -= stageId
           })
    -      jobIDToPrintWriter -= jobID
    -      jobIDToStages -= jobID
    +      jobIdToPrintWriter -= jobId
    +      jobIdToStageIds -= jobId
         }
       }
     
       /**
    +   * Build up the maps that represent stage-job relationships
    +   * @param jobId ID of the job
    +   * @param stageIds IDs of the associated stages
    +   */
    +  protected def buildJobStageDependencies(jobId: Int, stageIds: Seq[Int]) 
= {
    +    jobIdToStageIds(jobId) = stageIds
    +    stageIds.foreach { stageId => stageIdToJobId(stageId) = jobId }
    +  }
    +
    +  /**
        * Write info into log file
    -   * @param jobID ID of the job
    +   * @param jobId ID of the job
        * @param info Info to be recorded
        * @param withTime Controls whether to record time stamp before the 
info, default is true
        */
    -  protected def jobLogInfo(jobID: Int, info: String, withTime: Boolean = 
true) {
    +  protected def jobLogInfo(jobId: Int, info: String, withTime: Boolean = 
true) {
         var writeInfo = info
         if (withTime) {
           val date = new Date(System.currentTimeMillis())
           writeInfo = DATE_FORMAT.format(date) + ": " + info
         }
    -    jobIDToPrintWriter.get(jobID).foreach(_.println(writeInfo))
    +    jobIdToPrintWriter.get(jobId).foreach(_.println(writeInfo))
       }
     
       /**
        * Write info into log file
    -   * @param stageID ID of the stage
    +   * @param stageId ID of the stage
        * @param info Info to be recorded
        * @param withTime Controls whether to record time stamp before the 
info, default is true
        */
    -  protected def stageLogInfo(stageID: Int, info: String, withTime: Boolean 
= true) {
    --- End diff --
    
    Yes, the dependency graph for both job-stage dependency and RDD dependency


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to