yabola commented on code in PR #38882:
URL: https://github.com/apache/spark/pull/38882#discussion_r1037993126
##########
core/src/main/scala/org/apache/spark/status/api/v1/StagesResource.scala:
##########
@@ -143,7 +148,10 @@ private[v1] class StagesResource extends BaseAppResource {
@Context uriInfo: UriInfo):
HashMap[String, Object] = {
withUI { ui =>
- val uriQueryParameters = uriInfo.getQueryParameters(true)
+ // Decode URI twice here to avoid percent-encoding twice on the query
string
+ val decodeURI = URLDecoder.decode(uriInfo.getRequestUri.getRawQuery,
UTF_8.name())
+ val uriQueryParameters = new ImmutableMultivaluedMap[String, String](
+ UriComponent.decodeQuery(decodeURI, true))
Review Comment:
Not sure if decoding twice is appropriate here.
If do not change here, the stage page can be opened, but the task sort
column button cannot be clicked (locality level etc.)
Given this change before, I think it is reasonable.
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/ui/UIUtils.scala#L626
##########
core/src/main/scala/org/apache/spark/status/api/v1/StagesResource.scala:
##########
@@ -143,7 +148,10 @@ private[v1] class StagesResource extends BaseAppResource {
@Context uriInfo: UriInfo):
HashMap[String, Object] = {
withUI { ui =>
- val uriQueryParameters = uriInfo.getQueryParameters(true)
+ // Decode URI twice here to avoid percent-encoding twice on the query
string
+ val decodeURI = URLDecoder.decode(uriInfo.getRequestUri.getRawQuery,
UTF_8.name())
+ val uriQueryParameters = new ImmutableMultivaluedMap[String, String](
+ UriComponent.decodeQuery(decodeURI, true))
Review Comment:
Not sure if decoding twice is appropriate here.
If do not change here, the stage page can be opened, but the task sort
column button cannot be clicked (locality level etc.)
Given the change before, I think it is reasonable.
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/ui/UIUtils.scala#L626
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]