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

    https://github.com/apache/spark/pull/15248#discussion_r80791402
  
    --- Diff: 
core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala ---
    @@ -222,6 +222,7 @@ private[spark] object ApiRootResource {
     private[spark] trait UIRoot {
       def getSparkUI(appKey: String): Option[SparkUI]
       def getApplicationInfoList: Iterator[ApplicationInfo]
    +  def getApplicationInfoList(limit: Int): Iterator[ApplicationInfo]
    --- End diff --
    
    The default value doesn't help because 
    1) The parameter **limit** that you have added in /applications endpoint is 
an **Integer**. So it can be null. When it is null, the default value won't 
help. Still need to differentiate null with not null.
    2) When limit is a negative number, take(-1) is same as take(0) which 
returns an empty list. So I still need to judge whether it is less than or 
equals to 0.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to