{"url":"https://api.github.com/repos/ray-project/ray/pulls/5693","id":316730136,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE2NzMwMTM2","html_url":"https://github.com/ray-project/ray/pull/5693","diff_url":"https://github.com/ray-project/ray/pull/5693.diff","patch_url":"https://github.com/ray-project/ray/pull/5693.patch","issue_url":"https://api.github.com/repos/ray-project/ray/issues/5693","number":5693,"state":"closed","locked":false,"title":"[Java] Fix some potential bugs about `Ray.shutdown()`","user":{"login":"kfstorm","id":3626358,"node_id":"MDQ6VXNlcjM2MjYzNTg=","avatar_url":"https://avatars3.githubusercontent.com/u/3626358?v=4","gravatar_id":"","url":"https://api.github.com/users/kfstorm","html_url":"https://github.com/kfstorm","followers_url":"https://api.github.com/users/kfstorm/followers","following_url":"https://api.github.com/users/kfstorm/following{/other_user}","gists_url":"https://api.github.com/users/kfstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/kfstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kfstorm/subscriptions","organizations_url":"https://api.github.com/users/kfstorm/orgs","repos_url":"https://api.github.com/users/kfstorm/repos","events_url":"https://api.github.com/users/kfstorm/events{/privacy}","received_events_url":"https://api.github.com/users/kfstorm/received_events","type":"User","site_admin":false},"body":"\r\n\r\n## Why are these changes needed?\r\n\r\nIn Java tests, if `Ray.init()` failed in `BaseTest.setUpBase`, the `BaseTest.tearDownBase` will also fail due to `filesToDelete` is null.\r\n\r\nThis PR also adds statements to set some variables to null during the shutdown process. And it makes sure the `ExecutorService` in `LocalModeTaskSubmitter` will be shut down.\r\n\r\n## Related issue number\r\n\r\n\r\n\r\n## Checks\r\n\r\n- [ ] I've run `scripts/format.sh` to lint the changes in this PR.\r\n- [ ] I've included any doc changes needed for https://ray.readthedocs.io/en/latest/.\r\n","created_at":"2019-09-12T04:59:00Z","updated_at":"2019-09-24T02:44:22Z","closed_at":"2019-09-24T02:44:18Z","merged_at":"2019-09-24T02:44:18Z","merge_commit_sha":"c580955840458a339483ac03c6925c52ff03f3a1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jovany-wang","id":19473861,"node_id":"MDQ6VXNlcjE5NDczODYx","avatar_url":"https://avatars0.githubusercontent.com/u/19473861?v=4","gravatar_id":"","url":"https://api.github.com/users/jovany-wang","html_url":"https://github.com/jovany-wang","followers_url":"https://api.github.com/users/jovany-wang/followers","following_url":"https://api.github.com/users/jovany-wang/following{/other_user}","gists_url":"https://api.github.com/users/jovany-wang/gists{/gist_id}","starred_url":"https://api.github.com/users/jovany-wang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jovany-wang/subscriptions","organizations_url":"https://api.github.com/users/jovany-wang/orgs","repos_url":"https://api.github.com/users/jovany-wang/repos","events_url":"https://api.github.com/users/jovany-wang/events{/privacy}","received_events_url":"https://api.github.com/users/jovany-wang/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"draft":false,"commits_url":"https://api.github.com/repos/ray-project/ray/pulls/5693/commits","review_comments_url":"https://api.github.com/repos/ray-project/ray/pulls/5693/comments","review_comment_url":"https://api.github.com/repos/ray-project/ray/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ray-project/ray/issues/5693/comments","statuses_url":"https://api.github.com/repos/ray-project/ray/statuses/5303eb20edd8e92a95cae31556dd5625bd1c3384","head":{"label":"alipay:java_test_teardown_fix","ref":"java_test_teardown_fix","sha":"5303eb20edd8e92a95cae31556dd5625bd1c3384","user":{"login":"alipay","id":1299356,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTkzNTY=","avatar_url":"https://avatars0.githubusercontent.com/u/1299356?v=4","gravatar_id":"","url":"https://api.github.com/users/alipay","html_url":"https://github.com/alipay","followers_url":"https://api.github.com/users/alipay/followers","following_url":"https://api.github.com/users/alipay/following{/other_user}","gists_url":"https://api.github.com/users/alipay/gists{/gist_id}","starred_url":"https://api.github.com/users/alipay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alipay/subscriptions","organizations_url":"https://api.github.com/users/alipay/orgs","repos_url":"https://api.github.com/users/alipay/repos","events_url":"https://api.github.com/users/alipay/events{/privacy}","received_events_url":"https://api.github.com/users/alipay/received_events","type":"Organization","site_admin":false},"repo":{"id":125461261,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU0NjEyNjE=","name":"ray","full_name":"alipay/ray","private":false,"owner":{"login":"alipay","id":1299356,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTkzNTY=","avatar_url":"https://avatars0.githubusercontent.com/u/1299356?v=4","gravatar_id":"","url":"https://api.github.com/users/alipay","html_url":"https://github.com/alipay","followers_url":"https://api.github.com/users/alipay/followers","following_url":"https://api.github.com/users/alipay/following{/other_user}","gists_url":"https://api.github.com/users/alipay/gists{/gist_id}","starred_url":"https://api.github.com/users/alipay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alipay/subscriptions","organizations_url":"https://api.github.com/users/alipay/orgs","repos_url":"https://api.github.com/users/alipay/repos","events_url":"https://api.github.com/users/alipay/events{/privacy}","received_events_url":"https://api.github.com/users/alipay/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/alipay/ray","description":"A high-performance distributed execution engine","fork":true,"url":"https://api.github.com/repos/alipay/ray","forks_url":"https://api.github.com/repos/alipay/ray/forks","keys_url":"https://api.github.com/repos/alipay/ray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alipay/ray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alipay/ray/teams","hooks_url":"https://api.github.com/repos/alipay/ray/hooks","issue_events_url":"https://api.github.com/repos/alipay/ray/issues/events{/number}","events_url":"https://api.github.com/repos/alipay/ray/events","assignees_url":"https://api.github.com/repos/alipay/ray/assignees{/user}","branches_url":"https://api.github.com/repos/alipay/ray/branches{/branch}","tags_url":"https://api.github.com/repos/alipay/ray/tags","blobs_url":"https://api.github.com/repos/alipay/ray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alipay/ray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alipay/ray/git/refs{/sha}","trees_url":"https://api.github.com/repos/alipay/ray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alipay/ray/statuses/{sha}","languages_url":"https://api.github.com/repos/alipay/ray/languages","stargazers_url":"https://api.github.com/repos/alipay/ray/stargazers","contributors_url":"https://api.github.com/repos/alipay/ray/contributors","subscribers_url":"https://api.github.com/repos/alipay/ray/subscribers","subscription_url":"https://api.github.com/repos/alipay/ray/subscription","commits_url":"https://api.github.com/repos/alipay/ray/commits{/sha}","git_commits_url":"https://api.github.com/repos/alipay/ray/git/commits{/sha}","comments_url":"https://api.github.com/repos/alipay/ray/comments{/number}","issue_comment_url":"https://api.github.com/repos/alipay/ray/issues/comments{/number}","contents_url":"https://api.github.com/repos/alipay/ray/contents/{+path}","compare_url":"https://api.github.com/repos/alipay/ray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alipay/ray/merges","archive_url":"https://api.github.com/repos/alipay/ray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alipay/ray/downloads","issues_url":"https://api.github.com/repos/alipay/ray/issues{/number}","pulls_url":"https://api.github.com/repos/alipay/ray/pulls{/number}","milestones_url":"https://api.github.com/repos/alipay/ray/milestones{/number}","notifications_url":"https://api.github.com/repos/alipay/ray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alipay/ray/labels{/name}","releases_url":"https://api.github.com/repos/alipay/ray/releases{/id}","deployments_url":"https://api.github.com/repos/alipay/ray/deployments","created_at":"2018-03-16T03:58:55Z","updated_at":"2020-06-04T07:31:52Z","pushed_at":"2020-06-06T13:01:05Z","git_url":"git://github.com/alipay/ray.git","ssh_url":"git@github.com:alipay/ray.git","clone_url":"https://github.com/alipay/ray.git","svn_url":"https://github.com/alipay/ray","homepage":"","size":65392,"stargazers_count":21,"watchers_count":21,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":22,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":7,"open_issues":22,"watchers":21,"default_branch":"master"}},"base":{"label":"ray-project:master","ref":"master","sha":"56ab9a00bbeabdd35373b2e399ce1fb63003749c","user":{"login":"ray-project","id":22125274,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTI1Mjc0","avatar_url":"https://avatars3.githubusercontent.com/u/22125274?v=4","gravatar_id":"","url":"https://api.github.com/users/ray-project","html_url":"https://github.com/ray-project","followers_url":"https://api.github.com/users/ray-project/followers","following_url":"https://api.github.com/users/ray-project/following{/other_user}","gists_url":"https://api.github.com/users/ray-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ray-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray-project/subscriptions","organizations_url":"https://api.github.com/users/ray-project/orgs","repos_url":"https://api.github.com/users/ray-project/repos","events_url":"https://api.github.com/users/ray-project/events{/privacy}","received_events_url":"https://api.github.com/users/ray-project/received_events","type":"Organization","site_admin":false},"repo":{"id":71932349,"node_id":"MDEwOlJlcG9zaXRvcnk3MTkzMjM0OQ==","name":"ray","full_name":"ray-project/ray","private":false,"owner":{"login":"ray-project","id":22125274,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTI1Mjc0","avatar_url":"https://avatars3.githubusercontent.com/u/22125274?v=4","gravatar_id":"","url":"https://api.github.com/users/ray-project","html_url":"https://github.com/ray-project","followers_url":"https://api.github.com/users/ray-project/followers","following_url":"https://api.github.com/users/ray-project/following{/other_user}","gists_url":"https://api.github.com/users/ray-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ray-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray-project/subscriptions","organizations_url":"https://api.github.com/users/ray-project/orgs","repos_url":"https://api.github.com/users/ray-project/repos","events_url":"https://api.github.com/users/ray-project/events{/privacy}","received_events_url":"https://api.github.com/users/ray-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ray-project/ray","description":"A fast and simple framework for building and running distributed applications. Ray is packaged with RLlib, a scalable reinforcement learning library, and Tune, a scalable hyperparameter tuning library.","fork":false,"url":"https://api.github.com/repos/ray-project/ray","forks_url":"https://api.github.com/repos/ray-project/ray/forks","keys_url":"https://api.github.com/repos/ray-project/ray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ray-project/ray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ray-project/ray/teams","hooks_url":"https://api.github.com/repos/ray-project/ray/hooks","issue_events_url":"https://api.github.com/repos/ray-project/ray/issues/events{/number}","events_url":"https://api.github.com/repos/ray-project/ray/events","assignees_url":"https://api.github.com/repos/ray-project/ray/assignees{/user}","branches_url":"https://api.github.com/repos/ray-project/ray/branches{/branch}","tags_url":"https://api.github.com/repos/ray-project/ray/tags","blobs_url":"https://api.github.com/repos/ray-project/ray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ray-project/ray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ray-project/ray/git/refs{/sha}","trees_url":"https://api.github.com/repos/ray-project/ray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ray-project/ray/statuses/{sha}","languages_url":"https://api.github.com/repos/ray-project/ray/languages","stargazers_url":"https://api.github.com/repos/ray-project/ray/stargazers","contributors_url":"https://api.github.com/repos/ray-project/ray/contributors","subscribers_url":"https://api.github.com/repos/ray-project/ray/subscribers","subscription_url":"https://api.github.com/repos/ray-project/ray/subscription","commits_url":"https://api.github.com/repos/ray-project/ray/commits{/sha}","git_commits_url":"https://api.github.com/repos/ray-project/ray/git/commits{/sha}","comments_url":"https://api.github.com/repos/ray-project/ray/comments{/number}","issue_comment_url":"https://api.github.com/repos/ray-project/ray/issues/comments{/number}","contents_url":"https://api.github.com/repos/ray-project/ray/contents/{+path}","compare_url":"https://api.github.com/repos/ray-project/ray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ray-project/ray/merges","archive_url":"https://api.github.com/repos/ray-project/ray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ray-project/ray/downloads","issues_url":"https://api.github.com/repos/ray-project/ray/issues{/number}","pulls_url":"https://api.github.com/repos/ray-project/ray/pulls{/number}","milestones_url":"https://api.github.com/repos/ray-project/ray/milestones{/number}","notifications_url":"https://api.github.com/repos/ray-project/ray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ray-project/ray/labels{/name}","releases_url":"https://api.github.com/repos/ray-project/ray/releases{/id}","deployments_url":"https://api.github.com/repos/ray-project/ray/deployments","created_at":"2016-10-25T19:38:30Z","updated_at":"2020-06-07T07:18:26Z","pushed_at":"2020-06-07T05:11:39Z","git_url":"git://github.com/ray-project/ray.git","ssh_url":"git@github.com:ray-project/ray.git","clone_url":"https://github.com/ray-project/ray.git","svn_url":"https://github.com/ray-project/ray","homepage":"https://ray.io","size":58890,"stargazers_count":11785,"watchers_count":11785,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1770,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1075,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1770,"open_issues":1075,"watchers":11785,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ray-project/ray/pulls/5693"},"html":{"href":"https://github.com/ray-project/ray/pull/5693"},"issue":{"href":"https://api.github.com/repos/ray-project/ray/issues/5693"},"comments":{"href":"https://api.github.com/repos/ray-project/ray/issues/5693/comments"},"review_comments":{"href":"https://api.github.com/repos/ray-project/ray/pulls/5693/comments"},"review_comment":{"href":"https://api.github.com/repos/ray-project/ray/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ray-project/ray/pulls/5693/commits"},"statuses":{"href":"https://api.github.com/repos/ray-project/ray/statuses/5303eb20edd8e92a95cae31556dd5625bd1c3384"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"raulchen","id":2883335,"node_id":"MDQ6VXNlcjI4ODMzMzU=","avatar_url":"https://avatars2.githubusercontent.com/u/2883335?v=4","gravatar_id":"","url":"https://api.github.com/users/raulchen","html_url":"https://github.com/raulchen","followers_url":"https://api.github.com/users/raulchen/followers","following_url":"https://api.github.com/users/raulchen/following{/other_user}","gists_url":"https://api.github.com/users/raulchen/gists{/gist_id}","starred_url":"https://api.github.com/users/raulchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raulchen/subscriptions","organizations_url":"https://api.github.com/users/raulchen/orgs","repos_url":"https://api.github.com/users/raulchen/repos","events_url":"https://api.github.com/users/raulchen/events{/privacy}","received_events_url":"https://api.github.com/users/raulchen/received_events","type":"User","site_admin":false},"comments":3,"review_comments":4,"maintainer_can_modify":false,"commits":5,"additions":18,"deletions":3,"changed_files":5}