{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/340143956","pull_request_review_id":308599924,"id":340143956,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0MDE0Mzk1Ng==","diff_hunk":"@@ -0,0 +1,81 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with the License.  You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.apache.flink.runtime.checkpoint.hooks;\n+\n+import org.apache.flink.core.io.SimpleVersionedSerializer;\n+import org.apache.flink.runtime.checkpoint.CheckpointCoordinatorMasterHooksTest;\n+import org.apache.flink.runtime.checkpoint.MasterTriggerRestoreHook;\n+\n+import javax.annotation.Nullable;\n+\n+import java.util.concurrent.CompletableFuture;\n+import java.util.concurrent.Executor;\n+\n+/**\n+ * A {@link MasterTriggerRestoreHook} implementation for testing.\n+ */\n+public class TestMasterHook implements MasterTriggerRestoreHook<String> {\n+\n+\tprivate static final String DEFAULT_STATE = \"default\";\n+\n+\tprivate final String id;\n+\n+\tprivate int restoreCount = 0;\n+\n+\tprivate boolean failOnRestore = false;\n+\n+\tpublic TestMasterHook(String id) {","path":"flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/hooks/TestMasterHook.java","position":null,"original_position":43,"commit_id":"42942c280924287ae63138049059931804ae0523","original_commit_id":"e2942f200186291e37ee4a41b8234591ba2ea476","user":{"login":"zhuzhurk","id":5869249,"node_id":"MDQ6VXNlcjU4NjkyNDk=","avatar_url":"https://avatars2.githubusercontent.com/u/5869249?v=4","gravatar_id":"","url":"https://api.github.com/users/zhuzhurk","html_url":"https://github.com/zhuzhurk","followers_url":"https://api.github.com/users/zhuzhurk/followers","following_url":"https://api.github.com/users/zhuzhurk/following{/other_user}","gists_url":"https://api.github.com/users/zhuzhurk/gists{/gist_id}","starred_url":"https://api.github.com/users/zhuzhurk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhuzhurk/subscriptions","organizations_url":"https://api.github.com/users/zhuzhurk/orgs","repos_url":"https://api.github.com/users/zhuzhurk/repos","events_url":"https://api.github.com/users/zhuzhurk/events{/privacy}","received_events_url":"https://api.github.com/users/zhuzhurk/received_events","type":"User","site_admin":false},"body":"Ok. done.","created_at":"2019-10-29T15:20:29Z","updated_at":"2019-10-29T15:20:30Z","html_url":"https://github.com/apache/flink/pull/9920#discussion_r340143956","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/9920","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/340143956"},"html":{"href":"https://github.com/apache/flink/pull/9920#discussion_r340143956"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/9920"}},"in_reply_to_id":340069076},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/9920","id":329056845,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI5MDU2ODQ1","html_url":"https://github.com/apache/flink/pull/9920","diff_url":"https://github.com/apache/flink/pull/9920.diff","patch_url":"https://github.com/apache/flink/pull/9920.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/9920","number":9920,"state":"open","locked":false,"title":"[FLINK-14389][runtime] Restore task state before restarting tasks in DefaultScheduler","user":{"login":"zhuzhurk","id":5869249,"node_id":"MDQ6VXNlcjU4NjkyNDk=","avatar_url":"https://avatars2.githubusercontent.com/u/5869249?v=4","gravatar_id":"","url":"https://api.github.com/users/zhuzhurk","html_url":"https://github.com/zhuzhurk","followers_url":"https://api.github.com/users/zhuzhurk/followers","following_url":"https://api.github.com/users/zhuzhurk/following{/other_user}","gists_url":"https://api.github.com/users/zhuzhurk/gists{/gist_id}","starred_url":"https://api.github.com/users/zhuzhurk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhuzhurk/subscriptions","organizations_url":"https://api.github.com/users/zhuzhurk/orgs","repos_url":"https://api.github.com/users/zhuzhurk/repos","events_url":"https://api.github.com/users/zhuzhurk/events{/privacy}","received_events_url":"https://api.github.com/users/zhuzhurk/received_events","type":"User","site_admin":false},"body":"\r\n## What is the purpose of the change\r\n\r\nThis PR is to enabled DefaultScheduler to restore task state before restarting tasks.\r\n\r\n## Brief change log\r\n\r\n  - *Added SchedulerBase#restartState for task state restore*\r\n  - *Changed DefaultScheduler to invoke SchedulerBase#restartState before restarting tasks*\r\n\r\n## Verifying this change\r\n\r\nThis change added tests and can be verified as follows:\r\n  - *Added unit tests*\r\n  - *KeyedStateCheckpointingITCase is able to pass with this fix when using ng scheduler*\r\n\r\n## Does this pull request potentially affect one of the following parts:\r\n\r\n  - Dependencies (does it add or upgrade a dependency): (yes / **no**)\r\n  - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)\r\n  - The serializers: (yes / **no** / don't know)\r\n  - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)\r\n  - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (**yes** / no / don't know)\r\n  - The S3 file system connector: (yes / **no** / don't know)\r\n\r\n## Documentation\r\n\r\n  - Does this pull request introduce a new feature? (yes / **no**)\r\n  - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)\r\n","created_at":"2019-10-17T04:15:35Z","updated_at":"2019-10-29T15:20:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c129d4ad202fba7e12c302e15b387e900c84212","assignee":{"login":"GJL","id":1681921,"node_id":"MDQ6VXNlcjE2ODE5MjE=","avatar_url":"https://avatars2.githubusercontent.com/u/1681921?v=4","gravatar_id":"","url":"https://api.github.com/users/GJL","html_url":"https://github.com/GJL","followers_url":"https://api.github.com/users/GJL/followers","following_url":"https://api.github.com/users/GJL/following{/other_user}","gists_url":"https://api.github.com/users/GJL/gists{/gist_id}","starred_url":"https://api.github.com/users/GJL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GJL/subscriptions","organizations_url":"https://api.github.com/users/GJL/orgs","repos_url":"https://api.github.com/users/GJL/repos","events_url":"https://api.github.com/users/GJL/events{/privacy}","received_events_url":"https://api.github.com/users/GJL/received_events","type":"User","site_admin":false},"assignees":[{"login":"GJL","id":1681921,"node_id":"MDQ6VXNlcjE2ODE5MjE=","avatar_url":"https://avatars2.githubusercontent.com/u/1681921?v=4","gravatar_id":"","url":"https://api.github.com/users/GJL","html_url":"https://github.com/GJL","followers_url":"https://api.github.com/users/GJL/followers","following_url":"https://api.github.com/users/GJL/following{/other_user}","gists_url":"https://api.github.com/users/GJL/gists{/gist_id}","starred_url":"https://api.github.com/users/GJL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GJL/subscriptions","organizations_url":"https://api.github.com/users/GJL/orgs","repos_url":"https://api.github.com/users/GJL/repos","events_url":"https://api.github.com/users/GJL/events{/privacy}","received_events_url":"https://api.github.com/users/GJL/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1272994322,"node_id":"MDU6TGFiZWwxMjcyOTk0MzIy","url":"https://api.github.com/repos/apache/flink/labels/component=Runtime/Coordination","name":"component=Runtime/Coordination","color":"175fb7","default":false},{"id":1244454690,"node_id":"MDU6TGFiZWwxMjQ0NDU0Njkw","url":"https://api.github.com/repos/apache/flink/labels/review=description?","name":"review=description?","color":"bcf5db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/9920/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/9920/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/9920/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/42942c280924287ae63138049059931804ae0523","head":{"label":"zhuzhurk:FLINK_14389_restore_state","ref":"FLINK_14389_restore_state","sha":"42942c280924287ae63138049059931804ae0523","user":{"login":"zhuzhurk","id":5869249,"node_id":"MDQ6VXNlcjU4NjkyNDk=","avatar_url":"https://avatars2.githubusercontent.com/u/5869249?v=4","gravatar_id":"","url":"https://api.github.com/users/zhuzhurk","html_url":"https://github.com/zhuzhurk","followers_url":"https://api.github.com/users/zhuzhurk/followers","following_url":"https://api.github.com/users/zhuzhurk/following{/other_user}","gists_url":"https://api.github.com/users/zhuzhurk/gists{/gist_id}","starred_url":"https://api.github.com/users/zhuzhurk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhuzhurk/subscriptions","organizations_url":"https://api.github.com/users/zhuzhurk/orgs","repos_url":"https://api.github.com/users/zhuzhurk/repos","events_url":"https://api.github.com/users/zhuzhurk/events{/privacy}","received_events_url":"https://api.github.com/users/zhuzhurk/received_events","type":"User","site_admin":false},"repo":{"id":160664766,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA2NjQ3NjY=","name":"flink","full_name":"zhuzhurk/flink","private":false,"owner":{"login":"zhuzhurk","id":5869249,"node_id":"MDQ6VXNlcjU4NjkyNDk=","avatar_url":"https://avatars2.githubusercontent.com/u/5869249?v=4","gravatar_id":"","url":"https://api.github.com/users/zhuzhurk","html_url":"https://github.com/zhuzhurk","followers_url":"https://api.github.com/users/zhuzhurk/followers","following_url":"https://api.github.com/users/zhuzhurk/following{/other_user}","gists_url":"https://api.github.com/users/zhuzhurk/gists{/gist_id}","starred_url":"https://api.github.com/users/zhuzhurk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhuzhurk/subscriptions","organizations_url":"https://api.github.com/users/zhuzhurk/orgs","repos_url":"https://api.github.com/users/zhuzhurk/repos","events_url":"https://api.github.com/users/zhuzhurk/events{/privacy}","received_events_url":"https://api.github.com/users/zhuzhurk/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zhuzhurk/flink","description":"Apache Flink","fork":true,"url":"https://api.github.com/repos/zhuzhurk/flink","forks_url":"https://api.github.com/repos/zhuzhurk/flink/forks","keys_url":"https://api.github.com/repos/zhuzhurk/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhuzhurk/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhuzhurk/flink/teams","hooks_url":"https://api.github.com/repos/zhuzhurk/flink/hooks","issue_events_url":"https://api.github.com/repos/zhuzhurk/flink/issues/events{/number}","events_url":"https://api.github.com/repos/zhuzhurk/flink/events","assignees_url":"https://api.github.com/repos/zhuzhurk/flink/assignees{/user}","branches_url":"https://api.github.com/repos/zhuzhurk/flink/branches{/branch}","tags_url":"https://api.github.com/repos/zhuzhurk/flink/tags","blobs_url":"https://api.github.com/repos/zhuzhurk/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhuzhurk/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhuzhurk/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhuzhurk/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhuzhurk/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/zhuzhurk/flink/languages","stargazers_url":"https://api.github.com/repos/zhuzhurk/flink/stargazers","contributors_url":"https://api.github.com/repos/zhuzhurk/flink/contributors","subscribers_url":"https://api.github.com/repos/zhuzhurk/flink/subscribers","subscription_url":"https://api.github.com/repos/zhuzhurk/flink/subscription","commits_url":"https://api.github.com/repos/zhuzhurk/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhuzhurk/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhuzhurk/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhuzhurk/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhuzhurk/flink/contents/{+path}","compare_url":"https://api.github.com/repos/zhuzhurk/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhuzhurk/flink/merges","archive_url":"https://api.github.com/repos/zhuzhurk/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhuzhurk/flink/downloads","issues_url":"https://api.github.com/repos/zhuzhurk/flink/issues{/number}","pulls_url":"https://api.github.com/repos/zhuzhurk/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/zhuzhurk/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/zhuzhurk/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhuzhurk/flink/labels{/name}","releases_url":"https://api.github.com/repos/zhuzhurk/flink/releases{/id}","deployments_url":"https://api.github.com/repos/zhuzhurk/flink/deployments","created_at":"2018-12-06T11:24:20Z","updated_at":"2019-10-28T12:58:23Z","pushed_at":"2019-10-29T15:16:30Z","git_url":"git://github.com/zhuzhurk/flink.git","ssh_url":"git@github.com:zhuzhurk/flink.git","clone_url":"https://github.com/zhuzhurk/flink.git","svn_url":"https://github.com/zhuzhurk/flink","homepage":"","size":209259,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"f79dda8ff1791e28743d2ea8723b980c2968acf3","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":20587599,"node_id":"MDEwOlJlcG9zaXRvcnkyMDU4NzU5OQ==","name":"flink","full_name":"apache/flink","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/flink","description":"Apache Flink","fork":false,"url":"https://api.github.com/repos/apache/flink","forks_url":"https://api.github.com/repos/apache/flink/forks","keys_url":"https://api.github.com/repos/apache/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/flink/teams","hooks_url":"https://api.github.com/repos/apache/flink/hooks","issue_events_url":"https://api.github.com/repos/apache/flink/issues/events{/number}","events_url":"https://api.github.com/repos/apache/flink/events","assignees_url":"https://api.github.com/repos/apache/flink/assignees{/user}","branches_url":"https://api.github.com/repos/apache/flink/branches{/branch}","tags_url":"https://api.github.com/repos/apache/flink/tags","blobs_url":"https://api.github.com/repos/apache/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/flink/languages","stargazers_url":"https://api.github.com/repos/apache/flink/stargazers","contributors_url":"https://api.github.com/repos/apache/flink/contributors","subscribers_url":"https://api.github.com/repos/apache/flink/subscribers","subscription_url":"https://api.github.com/repos/apache/flink/subscription","commits_url":"https://api.github.com/repos/apache/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/flink/contents/{+path}","compare_url":"https://api.github.com/repos/apache/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/flink/merges","archive_url":"https://api.github.com/repos/apache/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/flink/downloads","issues_url":"https://api.github.com/repos/apache/flink/issues{/number}","pulls_url":"https://api.github.com/repos/apache/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/flink/labels{/name}","releases_url":"https://api.github.com/repos/apache/flink/releases{/id}","deployments_url":"https://api.github.com/repos/apache/flink/deployments","created_at":"2014-06-07T07:00:10Z","updated_at":"2019-10-29T14:34:41Z","pushed_at":"2019-10-29T15:16:35Z","git_url":"git://github.com/apache/flink.git","ssh_url":"git@github.com:apache/flink.git","clone_url":"https://github.com/apache/flink.git","svn_url":"https://github.com/apache/flink","homepage":"","size":265001,"stargazers_count":10806,"watchers_count":10806,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5798,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":481,"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":5798,"open_issues":481,"watchers":10806,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/9920"},"html":{"href":"https://github.com/apache/flink/pull/9920"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/9920"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/9920/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/9920/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/9920/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/42942c280924287ae63138049059931804ae0523"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"zhuzhurk"}}