diff options
author | Stan Zhai <zhaishidan@haizhi.com> | 2017-02-17 15:11:06 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2017-02-17 15:11:06 +0000 |
commit | 021062af099d06b4b0095c677b3a81d21f867a9d (patch) | |
tree | 360627e7be0a0cd774ab2339340527318817ef6c /core/src/main | |
parent | 9d2d2204cb27dce8c4ede1bd8a6399763a4bd589 (diff) | |
download | spark-021062af099d06b4b0095c677b3a81d21f867a9d.tar.gz spark-021062af099d06b4b0095c677b3a81d21f867a9d.tar.bz2 spark-021062af099d06b4b0095c677b3a81d21f867a9d.zip |
[SPARK-19622][WEBUI] Fix a http error in a paged table when using a `Go` button to search.
## What changes were proposed in this pull request?
The search function of paged table is not available because of we don't skip the hash data of the reqeust path.
![](https://issues.apache.org/jira/secure/attachment/12852996/screenshot-1.png)
## How was this patch tested?
Tested manually with my browser.
Author: Stan Zhai <zhaishidan@haizhi.com>
Closes #16953 from stanzhai/fix-webui-paged-table.
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/scala/org/apache/spark/ui/PagedTable.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/main/scala/org/apache/spark/ui/PagedTable.scala b/core/src/main/scala/org/apache/spark/ui/PagedTable.scala index 2a7c16b04b..79974df260 100644 --- a/core/src/main/scala/org/apache/spark/ui/PagedTable.scala +++ b/core/src/main/scala/org/apache/spark/ui/PagedTable.scala @@ -175,13 +175,14 @@ private[ui] trait PagedTable[T] { val hiddenFormFields = { if (goButtonFormPath.contains('?')) { - val querystring = goButtonFormPath.split("\\?", 2)(1) + val queryString = goButtonFormPath.split("\\?", 2)(1) + val search = queryString.split("#")(0) Splitter .on('&') .trimResults() .omitEmptyStrings() .withKeyValueSeparator("=") - .split(querystring) + .split(search) .asScala .filterKeys(_ != pageSizeFormField) .filterKeys(_ != prevPageSizeFormField) |