GitHub user zsxwing opened a pull request:

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

    SPARK-1278: Fix improper use of SimpleDateFormat

    `SimpleDateFormat` is not immutable and thread-safe. Some places use the 
same SimpleDateFormat object without safeguard in the multiple threads. It will 
cause that the Web UI displays improper date.
    
    This PR creates `SimpleDateFormat` when it's necessary. Another solution is 
using `ThreadLocal` to store a `SimpleDateFormat` in each thread. If this PR 
impacts the performance, I can change to the latter one.

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

    $ git pull https://github.com/zsxwing/spark SPARK-1278

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

    https://github.com/apache/spark/pull/179.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 #179
    
----
commit 5618092d6254c31629affd0107cb0f7ae5de6d5f
Author: zsxwing <zsxw...@gmail.com>
Date:   2014-03-19T07:40:40Z

    SPARK-1278: Fix improper use of SimpleDateFormat

----


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