{"action":"created","comment":{"url":"https://api.github.com/repos/apache/nutch/pulls/comments/178583685","pull_request_review_id":108662490,"id":178583685,"diff_hunk":"@@ -463,19 +463,7 @@ public void inject(Path crawlDb, Path urlDir, boolean overwrite,\n       }\n     } catch (IOException | InterruptedException | ClassNotFoundException e) {\n       LOG.error(\"Injector job failed\", e);\n-      cleanupAfterFailure(tempCrawlDb, lock, fs);\n-      throw e;\n-    }\n-  }\n-\n-  public void cleanupAfterFailure(Path tempCrawlDb, Path lock, FileSystem fs)\n-      throws IOException {\n-    try {\n-      if (fs.exists(tempCrawlDb)) {\n-        fs.delete(tempCrawlDb, true);\n-      }\n-      LockUtil.removeLockFile(fs, lock);\n-    } catch (IOException e) {\n+      CrawlDb.cleanupAfterFailure(tempCrawlDb, lock, fs);","path":"src/java/org/apache/nutch/crawl/Injector.java","position":26,"original_position":26,"commit_id":"25b799727ea29612a478b821815e0846ea690942","original_commit_id":"25b799727ea29612a478b821815e0846ea690942","user":{"login":"sebastian-nagel","id":1630582,"avatar_url":"https://avatars3.githubusercontent.com/u/1630582?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastian-nagel","html_url":"https://github.com/sebastian-nagel","followers_url":"https://api.github.com/users/sebastian-nagel/followers","following_url":"https://api.github.com/users/sebastian-nagel/following{/other_user}","gists_url":"https://api.github.com/users/sebastian-nagel/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastian-nagel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastian-nagel/subscriptions","organizations_url":"https://api.github.com/users/sebastian-nagel/orgs","repos_url":"https://api.github.com/users/sebastian-nagel/repos","events_url":"https://api.github.com/users/sebastian-nagel/events{/privacy}","received_events_url":"https://api.github.com/users/sebastian-nagel/received_events","type":"User","site_admin":false},"body":"same as above","created_at":"2018-04-02T16:34:53Z","updated_at":"2018-04-02T16:41:38Z","html_url":"https://github.com/apache/nutch/pull/307#discussion_r178583685","pull_request_url":"https://api.github.com/repos/apache/nutch/pulls/307","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/nutch/pulls/comments/178583685"},"html":{"href":"https://github.com/apache/nutch/pull/307#discussion_r178583685"},"pull_request":{"href":"https://api.github.com/repos/apache/nutch/pulls/307"}}},"pull_request":{"url":"https://api.github.com/repos/apache/nutch/pulls/307","id":177864574,"html_url":"https://github.com/apache/nutch/pull/307","diff_url":"https://github.com/apache/nutch/pull/307.diff","patch_url":"https://github.com/apache/nutch/pull/307.patch","issue_url":"https://api.github.com/repos/apache/nutch/issues/307","number":307,"state":"open","locked":false,"title":"NUTCH-2518 Cleaning up the file system after a job failure.","user":{"login":"Omkar20895","id":11131863,"avatar_url":"https://avatars0.githubusercontent.com/u/11131863?v=4","gravatar_id":"","url":"https://api.github.com/users/Omkar20895","html_url":"https://github.com/Omkar20895","followers_url":"https://api.github.com/users/Omkar20895/followers","following_url":"https://api.github.com/users/Omkar20895/following{/other_user}","gists_url":"https://api.github.com/users/Omkar20895/gists{/gist_id}","starred_url":"https://api.github.com/users/Omkar20895/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Omkar20895/subscriptions","organizations_url":"https://api.github.com/users/Omkar20895/orgs","repos_url":"https://api.github.com/users/Omkar20895/repos","events_url":"https://api.github.com/users/Omkar20895/events{/privacy}","received_events_url":"https://api.github.com/users/Omkar20895/received_events","type":"User","site_admin":false},"body":"- Added a new method cleanupAfterFailure which was already existing in Injector.\r\n- I have added this only in one of the 25 instances of job.waitForCompletion(true), please go ahead and review it and I will incorporate the review comments in the upcoming commits/changes.\r\n\r\nConfusion: \r\n- When a job failure happens do we need to do System.exit(non-zero status) or throw a runtime exception with a custom message specific to each class? I went ahead with the later one. Please suggest otherwise with reason. \r\n\r\nThanks.  ","created_at":"2018-03-27T21:02:51Z","updated_at":"2018-04-02T16:41:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3099af76a60038acc5d55123252243231ac234de","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/nutch/pulls/307/commits","review_comments_url":"https://api.github.com/repos/apache/nutch/pulls/307/comments","review_comment_url":"https://api.github.com/repos/apache/nutch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/nutch/issues/307/comments","statuses_url":"https://api.github.com/repos/apache/nutch/statuses/25b799727ea29612a478b821815e0846ea690942","head":{"label":"Omkar20895:NUTCH-2518","ref":"NUTCH-2518","sha":"25b799727ea29612a478b821815e0846ea690942","user":{"login":"Omkar20895","id":11131863,"avatar_url":"https://avatars0.githubusercontent.com/u/11131863?v=4","gravatar_id":"","url":"https://api.github.com/users/Omkar20895","html_url":"https://github.com/Omkar20895","followers_url":"https://api.github.com/users/Omkar20895/followers","following_url":"https://api.github.com/users/Omkar20895/following{/other_user}","gists_url":"https://api.github.com/users/Omkar20895/gists{/gist_id}","starred_url":"https://api.github.com/users/Omkar20895/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Omkar20895/subscriptions","organizations_url":"https://api.github.com/users/Omkar20895/orgs","repos_url":"https://api.github.com/users/Omkar20895/repos","events_url":"https://api.github.com/users/Omkar20895/events{/privacy}","received_events_url":"https://api.github.com/users/Omkar20895/received_events","type":"User","site_admin":false},"repo":{"id":126995947,"name":"nutch","full_name":"Omkar20895/nutch","owner":{"login":"Omkar20895","id":11131863,"avatar_url":"https://avatars0.githubusercontent.com/u/11131863?v=4","gravatar_id":"","url":"https://api.github.com/users/Omkar20895","html_url":"https://github.com/Omkar20895","followers_url":"https://api.github.com/users/Omkar20895/followers","following_url":"https://api.github.com/users/Omkar20895/following{/other_user}","gists_url":"https://api.github.com/users/Omkar20895/gists{/gist_id}","starred_url":"https://api.github.com/users/Omkar20895/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Omkar20895/subscriptions","organizations_url":"https://api.github.com/users/Omkar20895/orgs","repos_url":"https://api.github.com/users/Omkar20895/repos","events_url":"https://api.github.com/users/Omkar20895/events{/privacy}","received_events_url":"https://api.github.com/users/Omkar20895/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Omkar20895/nutch","description":"Apache Nutch","fork":true,"url":"https://api.github.com/repos/Omkar20895/nutch","forks_url":"https://api.github.com/repos/Omkar20895/nutch/forks","keys_url":"https://api.github.com/repos/Omkar20895/nutch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Omkar20895/nutch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Omkar20895/nutch/teams","hooks_url":"https://api.github.com/repos/Omkar20895/nutch/hooks","issue_events_url":"https://api.github.com/repos/Omkar20895/nutch/issues/events{/number}","events_url":"https://api.github.com/repos/Omkar20895/nutch/events","assignees_url":"https://api.github.com/repos/Omkar20895/nutch/assignees{/user}","branches_url":"https://api.github.com/repos/Omkar20895/nutch/branches{/branch}","tags_url":"https://api.github.com/repos/Omkar20895/nutch/tags","blobs_url":"https://api.github.com/repos/Omkar20895/nutch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Omkar20895/nutch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Omkar20895/nutch/git/refs{/sha}","trees_url":"https://api.github.com/repos/Omkar20895/nutch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Omkar20895/nutch/statuses/{sha}","languages_url":"https://api.github.com/repos/Omkar20895/nutch/languages","stargazers_url":"https://api.github.com/repos/Omkar20895/nutch/stargazers","contributors_url":"https://api.github.com/repos/Omkar20895/nutch/contributors","subscribers_url":"https://api.github.com/repos/Omkar20895/nutch/subscribers","subscription_url":"https://api.github.com/repos/Omkar20895/nutch/subscription","commits_url":"https://api.github.com/repos/Omkar20895/nutch/commits{/sha}","git_commits_url":"https://api.github.com/repos/Omkar20895/nutch/git/commits{/sha}","comments_url":"https://api.github.com/repos/Omkar20895/nutch/comments{/number}","issue_comment_url":"https://api.github.com/repos/Omkar20895/nutch/issues/comments{/number}","contents_url":"https://api.github.com/repos/Omkar20895/nutch/contents/{+path}","compare_url":"https://api.github.com/repos/Omkar20895/nutch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Omkar20895/nutch/merges","archive_url":"https://api.github.com/repos/Omkar20895/nutch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Omkar20895/nutch/downloads","issues_url":"https://api.github.com/repos/Omkar20895/nutch/issues{/number}","pulls_url":"https://api.github.com/repos/Omkar20895/nutch/pulls{/number}","milestones_url":"https://api.github.com/repos/Omkar20895/nutch/milestones{/number}","notifications_url":"https://api.github.com/repos/Omkar20895/nutch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Omkar20895/nutch/labels{/name}","releases_url":"https://api.github.com/repos/Omkar20895/nutch/releases{/id}","deployments_url":"https://api.github.com/repos/Omkar20895/nutch/deployments","created_at":"2018-03-27T14:05:41Z","updated_at":"2018-03-27T18:44:37Z","pushed_at":"2018-04-02T11:09:35Z","git_url":"git://github.com/Omkar20895/nutch.git","ssh_url":"git@github.com:Omkar20895/nutch.git","clone_url":"https://github.com/Omkar20895/nutch.git","svn_url":"https://github.com/Omkar20895/nutch","homepage":"https://nutch.apache.org/","size":133585,"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,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"2934d4384901d4eda0aeecfa281bfbb2d9b9b0c1","user":{"login":"apache","id":47359,"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":206370,"name":"nutch","full_name":"apache/nutch","owner":{"login":"apache","id":47359,"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},"private":false,"html_url":"https://github.com/apache/nutch","description":"Apache Nutch","fork":false,"url":"https://api.github.com/repos/apache/nutch","forks_url":"https://api.github.com/repos/apache/nutch/forks","keys_url":"https://api.github.com/repos/apache/nutch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/nutch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/nutch/teams","hooks_url":"https://api.github.com/repos/apache/nutch/hooks","issue_events_url":"https://api.github.com/repos/apache/nutch/issues/events{/number}","events_url":"https://api.github.com/repos/apache/nutch/events","assignees_url":"https://api.github.com/repos/apache/nutch/assignees{/user}","branches_url":"https://api.github.com/repos/apache/nutch/branches{/branch}","tags_url":"https://api.github.com/repos/apache/nutch/tags","blobs_url":"https://api.github.com/repos/apache/nutch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/nutch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/nutch/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/nutch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/nutch/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/nutch/languages","stargazers_url":"https://api.github.com/repos/apache/nutch/stargazers","contributors_url":"https://api.github.com/repos/apache/nutch/contributors","subscribers_url":"https://api.github.com/repos/apache/nutch/subscribers","subscription_url":"https://api.github.com/repos/apache/nutch/subscription","commits_url":"https://api.github.com/repos/apache/nutch/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/nutch/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/nutch/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/nutch/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/nutch/contents/{+path}","compare_url":"https://api.github.com/repos/apache/nutch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/nutch/merges","archive_url":"https://api.github.com/repos/apache/nutch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/nutch/downloads","issues_url":"https://api.github.com/repos/apache/nutch/issues{/number}","pulls_url":"https://api.github.com/repos/apache/nutch/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/nutch/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/nutch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/nutch/labels{/name}","releases_url":"https://api.github.com/repos/apache/nutch/releases{/id}","deployments_url":"https://api.github.com/repos/apache/nutch/deployments","created_at":"2009-05-21T01:17:48Z","updated_at":"2018-04-02T16:09:51Z","pushed_at":"2018-04-02T16:09:46Z","git_url":"git://github.com/apache/nutch.git","ssh_url":"git@github.com:apache/nutch.git","clone_url":"https://github.com/apache/nutch.git","svn_url":"https://github.com/apache/nutch","homepage":"https://nutch.apache.org/","size":134086,"stargazers_count":1605,"watchers_count":1605,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1037,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1037,"open_issues":23,"watchers":1605,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/nutch/pulls/307"},"html":{"href":"https://github.com/apache/nutch/pull/307"},"issue":{"href":"https://api.github.com/repos/apache/nutch/issues/307"},"comments":{"href":"https://api.github.com/repos/apache/nutch/issues/307/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/nutch/pulls/307/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/nutch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/nutch/pulls/307/commits"},"statuses":{"href":"https://api.github.com/repos/apache/nutch/statuses/25b799727ea29612a478b821815e0846ea690942"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sebastian-nagel"}}