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

    https://github.com/apache/spark/pull/22612#discussion_r234347780
  
    --- Diff: 
core/src/main/scala/org/apache/spark/metrics/ExecutorMetricType.scala ---
    @@ -84,6 +122,8 @@ case object MappedPoolMemory extends 
MBeanExecutorMetricType(
       "java.nio:type=BufferPool,name=mapped")
     
     private[spark] object ExecutorMetricType {
    +  final val pTreeInfo = new ProcfsBasedSystems
    --- End diff --
    
    this is a weird place to keep this, unless there is some really good reason 
for it.  I think it should go inside `ProcessTreeMetrics`.
    
    also I'm not sure what the problem was with making it an object.  Seems to 
work for me.  its a bit different now as there are arguments to the constructor 
for testing -- but you could still have an object which extends the class
    
    ```scala
    private[spark] object ProcfsBasedSystems extends 
ProcfsBasedSystems("/proc/")
    ```
    
    though doesn't really seem to have much value.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to