GitHub user ConeyLiu opened a pull request:

    https://github.com/apache/spark/pull/18830

    [SPARK-21621][Core] Reset numRecordsWritten after 
DiskBlockObjectWriter.commitAndGet called

    ## What changes were proposed in this pull request?
    
    We should reset numRecordsWritten to zero after 
DiskBlockObjectWriter.commitAndGet called.
    Because when `revertPartialWritesAndClose` be called, we decrease the 
written records in `ShuffleWriteMetrics` . However, we decreased the written 
records to zero, this should be wrong, we should only decreased the number 
reords after the last `commitAndGet` called.
    
    ## How was this patch tested?
    Modified existing test.
    
    Please review http://spark.apache.org/contributing.html before opening a 
pull request.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ConeyLiu/spark DiskBlockObjectWriter

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18830.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18830
    
----
commit d82401d1771009e02a81152b70b4fa48ce077593
Author: Xianyang Liu <xianyang....@intel.com>
Date:   2017-08-03T05:55:09Z

    reset numRecordsWritten to zero after commitAndGet called

----


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

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

Reply via email to