[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-21 Thread zsxwing
Github user zsxwing commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10860446 --- Diff: core/src/main/scala/org/apache/spark/ui/WebUI.scala --- @@ -23,12 +23,15 @@ import java.util.Date /** * Utilities used throughout the web U

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-21 Thread pwendell
Github user pwendell commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38335726 Thanks, I've merged this into master and did a somewhat hairy backport into 0.9 --- If your project is set up for it, you can reply to this email and have your reply app

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-21 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/179 --- 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 enabl

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-21 Thread pwendell
Github user pwendell commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38335726 Thanks, I've merged this into master and did a somewhat hairy backport into 0.9 --- If your project is set up for it, you can reply to this email and have your reply app

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-21 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10857905 --- Diff: core/src/main/scala/org/apache/spark/util/FileLogger.scala --- @@ -111,7 +114,7 @@ class FileLogger( def log(msg: String, withTime: Boolean =

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-21 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10857881 --- Diff: core/src/main/scala/org/apache/spark/ui/WebUI.scala --- @@ -23,12 +23,15 @@ import java.util.Date /** * Utilities used throughout the web

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-21 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10857873 --- Diff: core/src/main/scala/org/apache/spark/scheduler/JobLogger.scala --- @@ -55,7 +55,9 @@ class JobLogger(val user: String, val logDirName: String) exten

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-20 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38214337 Merged build finished. --- 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

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-20 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38214341 All automated tests passed. Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13305/ --- If your project

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-20 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38208029 Merged build triggered. --- 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 hav

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-20 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38208031 Merged build started. --- 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 t

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-20 Thread mateiz
Github user mateiz commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38204176 Jenkins, test this please --- 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

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-20 Thread zsxwing
Github user zsxwing commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38141424 Overrode the previous commit and updated to the latest master codes. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38134429 @zsxwing ah I see ya you are right about that (read your comments in reverse order). Maybe it's simplest to just use the thread local then. --- If your project is set up

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38134330 @zsxwing we could do that too, but I thought it seemed a bit more complex/overkill for this. In particular because different components use different date formats and pro

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread zsxwing
Github user zsxwing commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38133625 Could we use `ThreadLocal` liek this: ```Scala private[spark] object WebUI { private val dateFormat = new ThreadLocal[SimpleDateFormat]() { o

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread zsxwing
Github user zsxwing commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38133229 > A single page/table cannot be access concurrently from multiple threads, so this is safe. I just checked `JobProgressUI`. Looks all of requests use the same pag

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread srowen
Github user srowen commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38116957 @pwendell the thread-safety problem would manifest as just returning the wrong parsed or formatted date. The objects use instance fields as part of these processes. Have a

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38076446 Hey @zsxwing just wondering - what happens when this gets accessed from multiple threads. Is there an exception or anything? --- If your project is set up for it, you ca

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38084443 Hey @zsxwing thanks for reporting this and proposing a fix! The way it is now has some performance implications because it creates a new date format every time on

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10761429 --- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala --- @@ -45,7 +45,7 @@ private[spark] class Master(host: String, port: Int, webUiPor

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10761448 --- Diff: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala --- @@ -56,7 +56,8 @@ private[spark] class Worker( Utils.checkHost(host, "Exp

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10761749 --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala --- @@ -32,7 +33,7 @@ import org.apache.spark.util.{Utils, Distribution} /** Page s

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10761741 --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/JobProgressUI.scala --- @@ -33,7 +33,7 @@ import org.apache.spark.util.Utils private[spark] class

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10761764 --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala --- @@ -30,7 +31,7 @@ import org.apache.spark.util.Utils private[spark] class Stag

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10761674 --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/ExecutorTable.scala --- @@ -27,7 +29,7 @@ import org.apache.spark.util.Utils private[spark] class

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10761648 --- Diff: core/src/main/scala/org/apache/spark/deploy/WebUI.scala --- @@ -17,18 +17,18 @@ package org.apache.spark.deploy -import java.tex

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10761567 --- Diff: core/src/main/scala/org/apache/spark/deploy/WebUI.scala --- @@ -17,18 +17,18 @@ package org.apache.spark.deploy -import java.tex

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread pwendell
Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/179#discussion_r10761323 --- Diff: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala --- @@ -320,7 +321,7 @@ private[spark] class Worker( } def gener

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/179#issuecomment-38053337 Can one of the admins verify this patch? --- 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 proj

[GitHub] spark pull request: SPARK-1278: Fix improper use of SimpleDateForm...

2014-03-19 Thread zsxwing
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 wi