Github user sryza commented on the pull request:

    https://github.com/apache/spark/pull/2504#issuecomment-56879452
  
    I considered that approach as well, but found that this one sat more 
elegantly with the metrics collecting code.
    
    DiskObjectWriter, which is used both when spilling and when writing out 
final shuffle data, accepts a WriteMetrics (nee ShuffleWriteMetrics) object, 
and increments it as it writes.  Having a more complex ShuffleWriteMetrics 
object would require pushing down knowledge about the purpose of the write into 
DiskObjectWriter so it could increment the appropriate fields.  Or we could 
make a distinction between the metric-collecting objects that DiskObjectWriters 
takes and the ShuffleWriteMetrics/ShuffleReadMetrics that go into the 
TaskMetrics, but this seems to me like a layer of complexity that's worth 
avoiding if we can.


---
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