From 021062af099d06b4b0095c677b3a81d21f867a9d Mon Sep 17 00:00:00 2001 From: Stan Zhai <zhaishidan@haizhi.com> Date: Fri, 17 Feb 2017 15:11:06 +0000 Subject: [PATCH] [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.  ## How was this patch tested? Tested manually with my browser. Author: Stan Zhai <zhaishidan@haizhi.com> Closes #16953 from stanzhai/fix-webui-paged-table. --- core/src/main/scala/org/apache/spark/ui/PagedTable.scala | 5 +++-- 1 file 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) -- GitLab