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

    https://github.com/apache/spark/pull/13842#discussion_r68059672
  
    --- Diff: core/src/main/scala/org/apache/spark/internal/Logging.scala ---
    @@ -41,13 +44,7 @@ private[spark] trait Logging {
       }
     
       // Method to get or create the logger for this object
    -  protected def log: Logger = {
    -    if (log_ == null) {
    -      initializeLogIfNecessary(false)
    -      log_ = LoggerFactory.getLogger(logName)
    -    }
    -    log_
    -  }
    +  protected def log: Logger = log_
    --- End diff --
    
    In class `DriverEndpoint` under CoarseGrainedSchedulerBackend.scala,
    `log()` seems to be overridden[1]
    
    Not sure, what's the logic behind that but if we can remove that, `log()`
    can also be removed from Logging trait.
    
    [1]
    
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala#L103
    
    On Wed, Jun 22, 2016 at 12:48 PM, Sean Owen <[email protected]>
    wrote:
    
    > In core/src/main/scala/org/apache/spark/internal/Logging.scala
    > <https://github.com/apache/spark/pull/13842#discussion_r68046045>:
    >
    > > @@ -41,13 +44,7 @@ private[spark] trait Logging {
    > >    }
    > >
    > >    // Method to get or create the logger for this object
    > > -  protected def log: Logger = {
    > > -    if (log_ == null) {
    > > -      initializeLogIfNecessary(false)
    > > -      log_ = LoggerFactory.getLogger(logName)
    > > -    }
    > > -    log_
    > > -  }
    > > +  protected def log: Logger = log_
    >
    > Do we even need log_ separately from log? log can now be the lazy val.
    >
    > —
    > You are receiving this because you authored the thread.
    > Reply to this email directly, view it on GitHub
    > 
<https://github.com/apache/spark/pull/13842/files/88ffc87c670deb675f443891a4b2e3315467098e#r68046045>,
    > or mute the thread
    > 
<https://github.com/notifications/unsubscribe/AACdKruY8xLoqhQEkqS167NIyEM-v4Qtks5qOS8lgaJpZM4I7vOl>
    > .
    >
    
    
    
    -- 
    --
    Cheers,
    Praj



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to