Github user pgandhi999 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21688#discussion_r232838308
  
    --- Diff: 
core/src/main/scala/org/apache/spark/status/api/v1/StagesResource.scala ---
    @@ -117,35 +117,38 @@ private[v1] class StagesResource extends 
BaseAppResource {
           val uriQueryParameters = uriInfo.getQueryParameters(true)
           val totalRecords = uriQueryParameters.getFirst("numTasks")
           var isSearch = false
    -      var searchValue: String = null
    +      var searchValue: Option[String] = None
           var filteredRecords = totalRecords
    -      var _tasksToShow: Seq[TaskData] = null
           // The datatables client API sends a list of query parameters to the 
server which contain
           // information like the columns to be sorted, search value typed by 
the user in the search
           // box, pagination index etc. For more information on these query 
parameters,
           // refer https://datatables.net/manual/server-side.
           if (uriQueryParameters.getFirst("search[value]") != null &&
             uriQueryParameters.getFirst("search[value]").length > 0) {
    -        _tasksToShow = doPagination(uriQueryParameters, stageId, 
stageAttemptId, true,
    -          totalRecords.toInt)
             isSearch = true
    -        searchValue = uriQueryParameters.getFirst("search[value]")
    -      } else {
    -        _tasksToShow = doPagination(uriQueryParameters, stageId, 
stageAttemptId, false,
    -          totalRecords.toInt)
    +        searchValue = try {
    --- End diff --
    
    Yep, makes sense, have changed the code.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to