GitHub user zsxwing opened a pull request:
https://github.com/apache/spark/pull/6406
[SPARK-7863][Core] Use ThreadLocal to protect SimpleDateFormat which is not
thread-safe and fix a test
1. `SimpleDateFormat` is not thread-safe. So it should be put into
`ThreadLocal`.
2. `CDT` is ambiguous. In the test, it expects CDT is interpreted as
`Central Daylight Time`. But actually in my environment, it's interpreted as
`China Standard Time` and makes it fail in my enviroment. I just updated the
test to use `MDT` which is deterministic. See:
http://www.timeanddate.com/time/zones/
http://en.wikipedia.org/wiki/CST#Time_zones
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zsxwing/spark SPARK-7863
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/6406.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 #6406
----
commit 0a3153c641ab3e0c801d25a3b8cd40a566007002
Author: zsxwing <[email protected]>
Date: 2015-05-26T08:06:58Z
Use ThreadLocal to protect SimpleDateFormat which is not thread-safe and
fix a test
1. SimpleDateFormat is not thread-safe. So it should be put into
`ThreadLocal`.
2. `CDT` is ambiguous. In the test, it expects CDT is interpreted as
`Central Daylight Time`. But actually in my environment, it's interpreted as
`China Standard Time` and makes it fail in my enviroment. I just updated the
test to use `MDT` which is deterministi.
----
---
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]