You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/05/03 22:34:16 UTC

[GitHub] [spark] xccui opened a new pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

xccui opened a new pull request #28444:
URL: https://github.com/apache/spark/pull/28444


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   
   This PR adds a while loop check for the `ApplicationInfo` returned in `AppStatusStore.applicationInfo()`. It eliminates the `NoSuchElementError` exception occasionally happens when a user accesses the Web UI during Spark startup.
   
   ### Why are the changes needed?
   During the initialization of `SparkContext`, it first starts the Web UI and then set up the `LiveListenerBus` thread for dispatching the `SparkListenerApplicationStart` event (which will trigger writing the requested `ApplicationInfo` to `InMemoryStore`). If the Web UI is accessed before this info's being written to `InMemoryStore`, the following `NoSuchElementException` will be thrown.
   ```
    WARN org.eclipse.jetty.server.HttpChannel: /jobs/
    java.util.NoSuchElementException
    at java.util.Collections$EmptyIterator.next(Collections.java:4191)
    at org.apache.spark.util.kvstore.InMemoryStore$InMemoryIterator.next(InMemoryStore.java:467)
    at org.apache.spark.status.AppStatusStore.applicationInfo(AppStatusStore.scala:39)
    at org.apache.spark.ui.jobs.AllJobsPage.render(AllJobsPage.scala:266)
    at org.apache.spark.ui.WebUI.$anonfun$attachPage$1(WebUI.scala:89)
    at org.apache.spark.ui.JettyUtils$$anon$1.doGet(JettyUtils.scala:80)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623)
    at org.apache.spark.ui.HttpSecurityFilter.doFilter(HttpSecurityFilter.scala:95)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
    at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:753)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.eclipse.jetty.server.Server.handle(Server.java:505)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804)
    at java.lang.Thread.run(Thread.java:748)
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Manually tested


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-626276260


   ok to test


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-626276384


   **[Test build #122472 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122472/testReport)** for PR 28444 at commit [`0951f3d`](https://github.com/apache/spark/commit/0951f3d3eda712688d7ded8ca8da0db85fde3c4b).


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on a change in pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #28444:
URL: https://github.com/apache/spark/pull/28444#discussion_r422588340



##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -35,8 +36,24 @@ private[spark] class AppStatusStore(
     val store: KVStore,
     val listener: Option[AppStatusListener] = None) {
 
+  /**
+   * This method contains an automatic retry logic and tries to get a valid [[v1.ApplicationInfo]].

Review comment:
       `ApplicationInfo` seems a proper class which can properly converted into Java class via `Unidoc` in principal. If it works, let's uses `[[...]]`. If it fails to generate the documentation, let's stick to `` `...` ``.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-623194443


   Can one of the admins verify this patch?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-626284221


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] Ngone51 commented on a change in pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on a change in pull request #28444:
URL: https://github.com/apache/spark/pull/28444#discussion_r422750454



##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -35,8 +36,24 @@ private[spark] class AppStatusStore(
     val store: KVStore,
     val listener: Option[AppStatusListener] = None) {
 
+  /**
+   * This method contains an automatic retry logic and tries to get a valid [[v1.ApplicationInfo]].
+   * See [SPARK-31632] The ApplicationInfo in KVStore may be accessed before it's prepared
+   */
   def applicationInfo(): v1.ApplicationInfo = {

Review comment:
       Also sounds reasonable to me.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] jiangxb1987 commented on a change in pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
jiangxb1987 commented on a change in pull request #28444:
URL: https://github.com/apache/spark/pull/28444#discussion_r421987777



##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -35,8 +36,24 @@ private[spark] class AppStatusStore(
     val store: KVStore,
     val listener: Option[AppStatusListener] = None) {
 
+  /**
+   * This method contains an automatic retry logic and tries to get a valid [[v1.ApplicationInfo]].
+   * See [SPARK-31632] The ApplicationInfo in KVStore may be accessed before it's prepared
+   */
   def applicationInfo(): v1.ApplicationInfo = {

Review comment:
       Instead of make this function blocking, how about capture the Exception outside and display the proper message?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] xccui commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
xccui commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-624721293


   As there're no more other comments, I just updated the PR as @Ngone51 suggested.
   Please take a look when it's convenient for you. Thanks.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] Ngone51 commented on a change in pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on a change in pull request #28444:
URL: https://github.com/apache/spark/pull/28444#discussion_r420906618



##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -35,8 +36,21 @@ private[spark] class AppStatusStore(
     val store: KVStore,
     val listener: Option[AppStatusListener] = None) {
 
+  /**
+   * This method contains an automatic retry logic and tries to get a valid [[v1.ApplicationInfo]].
+   * See [SPARK-31632] The ApplicationInfo in KVStore may be accessed before it's prepared
+   */
   def applicationInfo(): v1.ApplicationInfo = {
-    store.view(classOf[ApplicationInfoWrapper]).max(1).iterator().next().info
+    var iterator = store.view(classOf[ApplicationInfoWrapper]).max(1).iterator()
+    val startTime = System.nanoTime()
+    while (!iterator.hasNext &&
+      System.nanoTime() - startTime < AppStatusStore.FETCH_APP_INFO_TIMEOUT) {
+      // Wait a while to see if the ApplicationInfo has been written to the store.
+      Thread.sleep(200)
+      iterator = store.view(classOf[ApplicationInfoWrapper]).max(1).iterator()
+    }
+    // The next() call may still throw a NoSuchElement exception.

Review comment:
       I think we should explicitly throw a SparkException here if the `iterator` is still empty to say something like "No available ApplicationInfo after waiting 5 seconds..."




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on a change in pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #28444:
URL: https://github.com/apache/spark/pull/28444#discussion_r422588491



##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -35,8 +36,24 @@ private[spark] class AppStatusStore(
     val store: KVStore,
     val listener: Option[AppStatusListener] = None) {
 
+  /**
+   * This method contains an automatic retry logic and tries to get a valid [[v1.ApplicationInfo]].

Review comment:
       We should use `` `...` `` in case the classes are a trait or a type alias which doesn't generate a canonical Java class. 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on a change in pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #28444:
URL: https://github.com/apache/spark/pull/28444#discussion_r422588340



##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -35,8 +36,24 @@ private[spark] class AppStatusStore(
     val store: KVStore,
     val listener: Option[AppStatusListener] = None) {
 
+  /**
+   * This method contains an automatic retry logic and tries to get a valid [[v1.ApplicationInfo]].

Review comment:
       `ApplicationInfo` seems a proper class which can properly converted into Java class via `Unidoc` in principle. If it works, let's uses `[[...]]`. If it fails to generate the documentation, let's stick to `` `...` ``.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Enrich the exception message when application information is unavailable

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-628358981


   Thanks @xccui and all. Merged to master, branch-3.0 and branch-2.4.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-626284223


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/122472/
   Test FAILed.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-623194303


   Can one of the admins verify this patch?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] xccui commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Enrich the exception message when application information is unavailable

Posted by GitBox <gi...@apache.org>.
xccui commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-628360134


   Thanks all for your suggestions and feedbacks.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] xccui commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
xccui commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-623532777


   Hi @HeartSaVioR, thanks for your suggestion. 
   
   Yes, I'm also not quite sure if doing a while-loop-check is suitable here. I also considered the solutions you mentioned, e.g., making the `AppStatusStore.applicationInfo()` return an optional `ApplicationInfo` or constructing an "empty" `ApplicationInfo` when it's unavailable in the KVStore. I made the current choice because after checking all the invokers of this method, I found they all expect to get a valid `ApplicationInfo`. If this is the so-called contract and we keep the current initialized logic, this fix could just work. However, I can definitely make another choice if we reach a consensus.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-626276384


   **[Test build #122472 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122472/testReport)** for PR 28444 at commit [`0951f3d`](https://github.com/apache/spark/commit/0951f3d3eda712688d7ded8ca8da0db85fde3c4b).


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HeartSaVioR commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
HeartSaVioR commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-623328188


   Just 2 cents as I'm not committer as well as not an expert of web UI area.
   
   I see what's happening, but I'm not sure the fix is on the right way. I feel it's probably better to wait from other place (instead of AppStatusStore which is simply serving the information), even better if we can serve web UI once such precondition is fulfilled.
   
   Having empty ApplicationInfo (and showing properly) might be also one of valid options.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-623194443


   Can one of the admins verify this patch?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-626276473






----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon closed pull request #28444: [SPARK-31632][CORE][WEBUI] Enrich the exception message when application information is unavailable

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #28444:
URL: https://github.com/apache/spark/pull/28444


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on a change in pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #28444:
URL: https://github.com/apache/spark/pull/28444#discussion_r422589241



##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -35,8 +36,24 @@ private[spark] class AppStatusStore(
     val store: KVStore,
     val listener: Option[AppStatusListener] = None) {
 
+  /**
+   * This method contains an automatic retry logic and tries to get a valid [[v1.ApplicationInfo]].
+   * See [SPARK-31632] The ApplicationInfo in KVStore may be accessed before it's prepared
+   */
   def applicationInfo(): v1.ApplicationInfo = {

Review comment:
       I think capturing the exception outside is actually a good compromise considering the issue is rather a corner case. Let's scope narrow here since the issue is rather minor, and consider a better fix with a standard approach when any bigger issue is found in the design.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] xccui commented on a change in pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
xccui commented on a change in pull request #28444:
URL: https://github.com/apache/spark/pull/28444#discussion_r422200227



##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -35,8 +36,24 @@ private[spark] class AppStatusStore(
     val store: KVStore,
     val listener: Option[AppStatusListener] = None) {
 
+  /**
+   * This method contains an automatic retry logic and tries to get a valid [[v1.ApplicationInfo]].
+   * See [SPARK-31632] The ApplicationInfo in KVStore may be accessed before it's prepared
+   */
   def applicationInfo(): v1.ApplicationInfo = {

Review comment:
       If blocking is supposed to be harmful, I'd prefer an optional result instead of throwing an exception here. In fact, due to the previous design and implementation, all the invokers of the method are expecting a valid `ApplicationInfo`, which means they are not capable of dealing with a `None` value or an exception now. If we change the returned type to `Option`, all the logic of the invokers (and invokers of these invokers maybe) should be somehow adjusted. There will be more design choices then.
   
   Adding the retry logic solves the problem from the root. As I said, however, I can definitely make another choice if we reach a consensus.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-626284221






----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-623194303


   Can one of the admins verify this patch?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] Ngone51 commented on a change in pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on a change in pull request #28444:
URL: https://github.com/apache/spark/pull/28444#discussion_r421515647



##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -546,6 +563,11 @@ private[spark] class AppStatusStore(
 
 private[spark] object AppStatusStore {
 
+  /**
+   * The timeout value used by [[AppStatusStore.applicationInfo()]].

Review comment:
       ditto

##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
##########
@@ -35,8 +36,24 @@ private[spark] class AppStatusStore(
     val store: KVStore,
     val listener: Option[AppStatusListener] = None) {
 
+  /**
+   * This method contains an automatic retry logic and tries to get a valid [[v1.ApplicationInfo]].

Review comment:
       nit: shall we use `` instead of  [[]]? @HyukjinKwon 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] Ngone51 commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-624135714


   I've took a look at those invokers. It seems we still need some retry logic where the end user can not help. If that's the truth, I'd prefer to keep retry with a timeout in `applicationInfo()`.  


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] xccui commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
xccui commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-624116531


   Hi @Ngone51 and @HyukjinKwon , do you have any suggestions on fixing this?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-626284156


   **[Test build #122472 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122472/testReport)** for PR 28444 at commit [`0951f3d`](https://github.com/apache/spark/commit/0951f3d3eda712688d7ded8ca8da0db85fde3c4b).
    * This patch **fails due to an unknown error code, -9**.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28444: [SPARK-31632][CORE][WEBUI] Make the ApplicationInfo always available when accessed

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28444:
URL: https://github.com/apache/spark/pull/28444#issuecomment-626276473






----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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