diff options
author | Koyo Yoshida <yoshidakuy@oss.nttdata.co.jp> | 2016-01-15 13:32:47 +0900 |
---|---|---|
committer | Kousuke Saruta <sarutak@oss.nttdata.co.jp> | 2016-01-15 13:32:47 +0900 |
commit | 32cca933546b4aaf0fc040b9cfd1a5968171b423 (patch) | |
tree | 89d1c8cb11f4699b037de0d67c5045cfd659c3b1 /core/src/test/scala/org/apache/spark/ui/UIUtilsSuite.scala | |
parent | cc7af86afd3e769d1e2a581f31bb3db5a3d0229f (diff) | |
download | spark-32cca933546b4aaf0fc040b9cfd1a5968171b423.tar.gz spark-32cca933546b4aaf0fc040b9cfd1a5968171b423.tar.bz2 spark-32cca933546b4aaf0fc040b9cfd1a5968171b423.zip |
[SPARK-12708][UI] Sorting task error in Stages Page when yarn mode.
If sort column contains slash(e.g. "Executor ID / Host") when yarn mode,sort fail with following message.
![spark-12708](https://cloud.githubusercontent.com/assets/6679275/12193320/80814f8c-b62a-11e5-9914-7bf3907029df.png)
It's similar to SPARK-4313 .
Author: root <root@R520T1.(none)>
Author: Koyo Yoshida <koyo0615@gmail.com>
Closes #10663 from yoshidakuy/SPARK-12708.
Diffstat (limited to 'core/src/test/scala/org/apache/spark/ui/UIUtilsSuite.scala')
-rw-r--r-- | core/src/test/scala/org/apache/spark/ui/UIUtilsSuite.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/src/test/scala/org/apache/spark/ui/UIUtilsSuite.scala b/core/src/test/scala/org/apache/spark/ui/UIUtilsSuite.scala index dd8d5ec27f..bc8a5d494d 100644 --- a/core/src/test/scala/org/apache/spark/ui/UIUtilsSuite.scala +++ b/core/src/test/scala/org/apache/spark/ui/UIUtilsSuite.scala @@ -67,6 +67,20 @@ class UIUtilsSuite extends SparkFunSuite { s"\nRunning progress bar should round down\n\nExpected:\n$expected\nGenerated:\n$generated") } + test("decodeURLParameter (SPARK-12708: Sorting task error in Stages Page when yarn mode.)") { + val encoded1 = "%252F" + val decoded1 = "/" + val encoded2 = "%253Cdriver%253E" + val decoded2 = "<driver>" + + assert(decoded1 === decodeURLParameter(encoded1)) + assert(decoded2 === decodeURLParameter(encoded2)) + + // verify that no affect to decoded URL. + assert(decoded1 === decodeURLParameter(decoded1)) + assert(decoded2 === decodeURLParameter(decoded2)) + } + private def verify( desc: String, expected: Elem, errorMsg: String = "", baseUrl: String = ""): Unit = { val generated = makeDescription(desc, baseUrl) |