{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/20481","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/20481/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/20481/comments","events_url":"https://api.github.com/repos/apache/spark/issues/20481/events","html_url":"https://github.com/apache/spark/pull/20481","id":293704593,"number":20481,"title":"[SPARK-23307][WEBUI]Sort jobs/stages/tasks/queries with the completed timestamp before cleaning up them","user":{"login":"zsxwing","id":1000778,"avatar_url":"https://avatars0.githubusercontent.com/u/1000778?v=4","gravatar_id":"","url":"https://api.github.com/users/zsxwing","html_url":"https://github.com/zsxwing","followers_url":"https://api.github.com/users/zsxwing/followers","following_url":"https://api.github.com/users/zsxwing/following{/other_user}","gists_url":"https://api.github.com/users/zsxwing/gists{/gist_id}","starred_url":"https://api.github.com/users/zsxwing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsxwing/subscriptions","organizations_url":"https://api.github.com/users/zsxwing/orgs","repos_url":"https://api.github.com/users/zsxwing/repos","events_url":"https://api.github.com/users/zsxwing/events{/privacy}","received_events_url":"https://api.github.com/users/zsxwing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-02-01T22:20:15Z","updated_at":"2018-02-02T02:04:29Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/20481","html_url":"https://github.com/apache/spark/pull/20481","diff_url":"https://github.com/apache/spark/pull/20481.diff","patch_url":"https://github.com/apache/spark/pull/20481.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nSort jobs/stages/tasks/queries with the completed timestamp before cleaning up them to make the behavior consistent with 2.2.\r\n\r\n## How was this patch tested?\r\n\r\n- Jenkins.\r\n- Manually ran the following codes and checked the UI for jobs/stages/tasks/queries.\r\n\r\n```\r\nspark.ui.retainedJobs 10\r\nspark.ui.retainedStages 10\r\nspark.sql.ui.retainedExecutions 10\r\nspark.ui.retainedTasks 10\r\n```\r\n\r\n```\r\nnew Thread() {\r\n  override def run() {\r\n    spark.range(1, 2).foreach { i =>\r\n        Thread.sleep(10000)\r\n    }\r\n  }\r\n}.start()\r\n\r\nThread.sleep(5000)\r\n\r\nfor (_ <- 1 to 20) {\r\n    new Thread() {\r\n      override def run() {\r\n        spark.range(1, 2).foreach { i =>\r\n        }\r\n      }\r\n    }.start()\r\n}\r\n\r\nThread.sleep(15000)\r\n  spark.range(1, 2).foreach { i =>\r\n}\r\n\r\nsc.makeRDD(1 to 100, 100).foreach { i =>\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/362463155","html_url":"https://github.com/apache/spark/pull/20481#issuecomment-362463155","issue_url":"https://api.github.com/repos/apache/spark/issues/20481","id":362463155,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars3.githubusercontent.com/u/4031291?v=4","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T02:04:29Z","updated_at":"2018-02-02T02:04:29Z","author_association":"NONE","body":"Test PASSed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/86947/\nTest PASSed."}}
{"actor":{"display_login":"AmplabJenkins"}}