{"action":"created","comment":{"url":"https://api.github.com/repos/linkedin/gobblin/pulls/comments/92471354","pull_request_review_id":12969474,"id":92471354,"diff_hunk":"@@ -0,0 +1,120 @@\n+/*\n+ * Copyright (C) 2014-2016 LinkedIn Corp. All rights reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n+ * this file except in compliance with the License. You may obtain a copy of the\n+ * License at  http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software distributed\n+ * under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n+ * CONDITIONS OF ANY KIND, either express or implied.\n+ */\n+package gobblin.compliance;\n+\n+import java.io.IOException;\n+import java.sql.SQLException;\n+import java.util.List;\n+\n+import org.apache.hadoop.fs.FileSystem;\n+import org.apache.hadoop.fs.Path;\n+\n+import lombok.AllArgsConstructor;\n+import lombok.extern.slf4j.Slf4j;\n+\n+import gobblin.writer.DataWriter;\n+\n+/**\n+ * This class is responsible for executing all purge queries and altering the partition location if the original\n+ * partition is not modified during the current execution.\n+ *\n+ * @author adsharma\n+ */\n+@Slf4j\n+@AllArgsConstructor\n+public class HivePurgerWriter implements DataWriter<HivePurgerPartitionRecord> {\n+  private FileSystem fs;\n+  private HivePurgerQueryExecutor hivePurgerQueryExecutor;\n+\n+  /**\n+   * This method is responsible for actual purging.\n+   * @param record data record to write\n+   * @throws IOException\n+   */\n+  @Override\n+  public void write(HivePurgerPartitionRecord record)\n+      throws IOException {\n+    try {\n+      List<String> purgeQueries = record.getPurgeQueries();\n+      if (record.shouldCommit()) {","path":"gobblin-compliance/src/main/java/gobblin/compliance/HivePurgerWriter.java","position":48,"original_position":48,"commit_id":"b3cf20eddfd3899a6d83975f7a24fe27a78054b5","original_commit_id":"b3cf20eddfd3899a6d83975f7a24fe27a78054b5","user":{"login":"pcadabam","id":1166372,"avatar_url":"https://avatars.githubusercontent.com/u/1166372?v=3","gravatar_id":"","url":"https://api.github.com/users/pcadabam","html_url":"https://github.com/pcadabam","followers_url":"https://api.github.com/users/pcadabam/followers","following_url":"https://api.github.com/users/pcadabam/following{/other_user}","gists_url":"https://api.github.com/users/pcadabam/gists{/gist_id}","starred_url":"https://api.github.com/users/pcadabam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcadabam/subscriptions","organizations_url":"https://api.github.com/users/pcadabam/orgs","repos_url":"https://api.github.com/users/pcadabam/repos","events_url":"https://api.github.com/users/pcadabam/events{/privacy}","received_events_url":"https://api.github.com/users/pcadabam/received_events","type":"User","site_admin":false},"body":"Should be moved to `commit()` ?","created_at":"2016-12-14T19:36:52Z","updated_at":"2016-12-14T19:37:56Z","html_url":"https://github.com/linkedin/gobblin/pull/1462#discussion_r92471354","pull_request_url":"https://api.github.com/repos/linkedin/gobblin/pulls/1462","_links":{"self":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/comments/92471354"},"html":{"href":"https://github.com/linkedin/gobblin/pull/1462#discussion_r92471354"},"pull_request":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/1462"}}},"pull_request":{"url":"https://api.github.com/repos/linkedin/gobblin/pulls/1462","id":97950162,"html_url":"https://github.com/linkedin/gobblin/pull/1462","diff_url":"https://github.com/linkedin/gobblin/pull/1462.diff","patch_url":"https://github.com/linkedin/gobblin/pull/1462.patch","issue_url":"https://api.github.com/repos/linkedin/gobblin/issues/1462","number":1462,"state":"open","locked":false,"title":"Adding gobblin-compliance module","user":{"login":"aditya1105","id":20373170,"avatar_url":"https://avatars.githubusercontent.com/u/20373170?v=3","gravatar_id":"","url":"https://api.github.com/users/aditya1105","html_url":"https://github.com/aditya1105","followers_url":"https://api.github.com/users/aditya1105/followers","following_url":"https://api.github.com/users/aditya1105/following{/other_user}","gists_url":"https://api.github.com/users/aditya1105/gists{/gist_id}","starred_url":"https://api.github.com/users/aditya1105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aditya1105/subscriptions","organizations_url":"https://api.github.com/users/aditya1105/orgs","repos_url":"https://api.github.com/users/aditya1105/repos","events_url":"https://api.github.com/users/aditya1105/events{/privacy}","received_events_url":"https://api.github.com/users/aditya1105/received_events","type":"User","site_admin":false},"body":"gobblin consumers can use gobblin-compliance module to meet their compliance requisites. Current support is to achieve the compliance requirements for Hive Datasets, irrespective of the data format underneath.","created_at":"2016-12-14T13:17:53Z","updated_at":"2016-12-14T19:37:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ac181923fe79699c740577f76e422e3fd0ea3ab","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/linkedin/gobblin/pulls/1462/commits","review_comments_url":"https://api.github.com/repos/linkedin/gobblin/pulls/1462/comments","review_comment_url":"https://api.github.com/repos/linkedin/gobblin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkedin/gobblin/issues/1462/comments","statuses_url":"https://api.github.com/repos/linkedin/gobblin/statuses/b3cf20eddfd3899a6d83975f7a24fe27a78054b5","head":{"label":"aditya1105:gobblin-compliance","ref":"gobblin-compliance","sha":"b3cf20eddfd3899a6d83975f7a24fe27a78054b5","user":{"login":"aditya1105","id":20373170,"avatar_url":"https://avatars.githubusercontent.com/u/20373170?v=3","gravatar_id":"","url":"https://api.github.com/users/aditya1105","html_url":"https://github.com/aditya1105","followers_url":"https://api.github.com/users/aditya1105/followers","following_url":"https://api.github.com/users/aditya1105/following{/other_user}","gists_url":"https://api.github.com/users/aditya1105/gists{/gist_id}","starred_url":"https://api.github.com/users/aditya1105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aditya1105/subscriptions","organizations_url":"https://api.github.com/users/aditya1105/orgs","repos_url":"https://api.github.com/users/aditya1105/repos","events_url":"https://api.github.com/users/aditya1105/events{/privacy}","received_events_url":"https://api.github.com/users/aditya1105/received_events","type":"User","site_admin":false},"repo":{"id":71459393,"name":"gobblin","full_name":"aditya1105/gobblin","owner":{"login":"aditya1105","id":20373170,"avatar_url":"https://avatars.githubusercontent.com/u/20373170?v=3","gravatar_id":"","url":"https://api.github.com/users/aditya1105","html_url":"https://github.com/aditya1105","followers_url":"https://api.github.com/users/aditya1105/followers","following_url":"https://api.github.com/users/aditya1105/following{/other_user}","gists_url":"https://api.github.com/users/aditya1105/gists{/gist_id}","starred_url":"https://api.github.com/users/aditya1105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aditya1105/subscriptions","organizations_url":"https://api.github.com/users/aditya1105/orgs","repos_url":"https://api.github.com/users/aditya1105/repos","events_url":"https://api.github.com/users/aditya1105/events{/privacy}","received_events_url":"https://api.github.com/users/aditya1105/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aditya1105/gobblin","description":"Universal data ingestion framework for Hadoop.","fork":true,"url":"https://api.github.com/repos/aditya1105/gobblin","forks_url":"https://api.github.com/repos/aditya1105/gobblin/forks","keys_url":"https://api.github.com/repos/aditya1105/gobblin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aditya1105/gobblin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aditya1105/gobblin/teams","hooks_url":"https://api.github.com/repos/aditya1105/gobblin/hooks","issue_events_url":"https://api.github.com/repos/aditya1105/gobblin/issues/events{/number}","events_url":"https://api.github.com/repos/aditya1105/gobblin/events","assignees_url":"https://api.github.com/repos/aditya1105/gobblin/assignees{/user}","branches_url":"https://api.github.com/repos/aditya1105/gobblin/branches{/branch}","tags_url":"https://api.github.com/repos/aditya1105/gobblin/tags","blobs_url":"https://api.github.com/repos/aditya1105/gobblin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aditya1105/gobblin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aditya1105/gobblin/git/refs{/sha}","trees_url":"https://api.github.com/repos/aditya1105/gobblin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aditya1105/gobblin/statuses/{sha}","languages_url":"https://api.github.com/repos/aditya1105/gobblin/languages","stargazers_url":"https://api.github.com/repos/aditya1105/gobblin/stargazers","contributors_url":"https://api.github.com/repos/aditya1105/gobblin/contributors","subscribers_url":"https://api.github.com/repos/aditya1105/gobblin/subscribers","subscription_url":"https://api.github.com/repos/aditya1105/gobblin/subscription","commits_url":"https://api.github.com/repos/aditya1105/gobblin/commits{/sha}","git_commits_url":"https://api.github.com/repos/aditya1105/gobblin/git/commits{/sha}","comments_url":"https://api.github.com/repos/aditya1105/gobblin/comments{/number}","issue_comment_url":"https://api.github.com/repos/aditya1105/gobblin/issues/comments{/number}","contents_url":"https://api.github.com/repos/aditya1105/gobblin/contents/{+path}","compare_url":"https://api.github.com/repos/aditya1105/gobblin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aditya1105/gobblin/merges","archive_url":"https://api.github.com/repos/aditya1105/gobblin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aditya1105/gobblin/downloads","issues_url":"https://api.github.com/repos/aditya1105/gobblin/issues{/number}","pulls_url":"https://api.github.com/repos/aditya1105/gobblin/pulls{/number}","milestones_url":"https://api.github.com/repos/aditya1105/gobblin/milestones{/number}","notifications_url":"https://api.github.com/repos/aditya1105/gobblin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aditya1105/gobblin/labels{/name}","releases_url":"https://api.github.com/repos/aditya1105/gobblin/releases{/id}","deployments_url":"https://api.github.com/repos/aditya1105/gobblin/deployments","created_at":"2016-10-20T12:10:56Z","updated_at":"2016-10-20T12:11:01Z","pushed_at":"2016-12-14T16:45:34Z","git_url":"git://github.com/aditya1105/gobblin.git","ssh_url":"git@github.com:aditya1105/gobblin.git","clone_url":"https://github.com/aditya1105/gobblin.git","svn_url":"https://github.com/aditya1105/gobblin","homepage":"https://github.com/linkedin/gobblin/wiki","size":102746,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"linkedin:master","ref":"master","sha":"0bbf6db27e1dd3f0a1eb93b35d95bb429f52639d","user":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":27392543,"name":"gobblin","full_name":"linkedin/gobblin","owner":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/gobblin","description":"Universal data ingestion framework for Hadoop.","fork":false,"url":"https://api.github.com/repos/linkedin/gobblin","forks_url":"https://api.github.com/repos/linkedin/gobblin/forks","keys_url":"https://api.github.com/repos/linkedin/gobblin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/gobblin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/gobblin/teams","hooks_url":"https://api.github.com/repos/linkedin/gobblin/hooks","issue_events_url":"https://api.github.com/repos/linkedin/gobblin/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/gobblin/events","assignees_url":"https://api.github.com/repos/linkedin/gobblin/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/gobblin/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/gobblin/tags","blobs_url":"https://api.github.com/repos/linkedin/gobblin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/gobblin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/gobblin/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/gobblin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/gobblin/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/gobblin/languages","stargazers_url":"https://api.github.com/repos/linkedin/gobblin/stargazers","contributors_url":"https://api.github.com/repos/linkedin/gobblin/contributors","subscribers_url":"https://api.github.com/repos/linkedin/gobblin/subscribers","subscription_url":"https://api.github.com/repos/linkedin/gobblin/subscription","commits_url":"https://api.github.com/repos/linkedin/gobblin/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/gobblin/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/gobblin/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/gobblin/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/gobblin/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/gobblin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/gobblin/merges","archive_url":"https://api.github.com/repos/linkedin/gobblin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/gobblin/downloads","issues_url":"https://api.github.com/repos/linkedin/gobblin/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/gobblin/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/gobblin/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/gobblin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/gobblin/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/gobblin/releases{/id}","deployments_url":"https://api.github.com/repos/linkedin/gobblin/deployments","created_at":"2014-12-01T18:10:50Z","updated_at":"2016-12-13T01:42:08Z","pushed_at":"2016-12-14T16:45:35Z","git_url":"git://github.com/linkedin/gobblin.git","ssh_url":"git@github.com:linkedin/gobblin.git","clone_url":"https://github.com/linkedin/gobblin.git","svn_url":"https://github.com/linkedin/gobblin","homepage":"https://github.com/linkedin/gobblin/wiki","size":102725,"stargazers_count":787,"watchers_count":787,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":331,"mirror_url":null,"open_issues_count":139,"forks":331,"open_issues":139,"watchers":787,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/1462"},"html":{"href":"https://github.com/linkedin/gobblin/pull/1462"},"issue":{"href":"https://api.github.com/repos/linkedin/gobblin/issues/1462"},"comments":{"href":"https://api.github.com/repos/linkedin/gobblin/issues/1462/comments"},"review_comments":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/1462/comments"},"review_comment":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/1462/commits"},"statuses":{"href":"https://api.github.com/repos/linkedin/gobblin/statuses/b3cf20eddfd3899a6d83975f7a24fe27a78054b5"}}}}
{"actor":{"display_login":"pcadabam"}}