{"action":"created","comment":{"url":"https://api.github.com/repos/linkedin/gobblin/pulls/comments/71931043","id":71931043,"diff_hunk":"@@ -0,0 +1,167 @@\n+package gobblin.util.filesystem;\n+\n+import com.google.common.base.Optional;\n+import java.io.FileNotFoundException;\n+import java.io.IOException;\n+\n+import org.apache.hadoop.conf.Configuration;\n+import org.apache.hadoop.fs.FileStatus;\n+import org.apache.hadoop.fs.FileSystem;\n+import org.apache.hadoop.fs.Path;\n+\n+\n+public class FileStatusEntry extends FileStatus {\n+\n+  static final FileStatusEntry[] EMPTY_ENTRIES = new FileStatusEntry[0];\n+\n+  private final FileStatusEntry parent;\n+  private FileStatusEntry[] children;\n+\n+  private boolean exists;\n+\n+  public Optional<FileStatus> _fileStatus;\n+\n+  public FileStatusEntry(final Path path)\n+      throws IOException {\n+    this(null, path);\n+  }\n+\n+  public FileStatusEntry(final FileStatusEntry parent, final Path path)\n+      throws IOException {\n+    if (path == null) {\n+      throw new IllegalArgumentException(\"Path is missing\");\n+    }\n+    this.parent = parent;\n+    this._fileStatus = Optional.fromNullable(path.getFileSystem(new Configuration()).getFileStatus(path));\n+  }\n+\n+  public boolean refresh(final Path path)\n+      throws IOException {\n+    try (FileSystem fs = path.getFileSystem(new Configuration())) {\n+      if (_fileStatus.isPresent()) {\n+        Optional<FileStatus> oldStatus = this._fileStatus;\n+        try {\n+          Optional<FileStatus> newStatus = Optional.of(fs.getFileStatus(path));\n+          this.exists = newStatus.isPresent();\n+          return (oldStatus.isPresent() != this._fileStatus.isPresent()\n+              || oldStatus.get().getModificationTime() != newStatus.get().getModificationTime()\n+              || oldStatus.get().isDirectory() != newStatus.get().isDirectory() || oldStatus.get().getLen() != newStatus\n+              .get()\n+              .getLen());\n+        }catch (FileNotFoundException e) {\n+          _fileStatus.absent();","path":"gobblin-utility/src/main/java/gobblin/util/filesystem/FileStatusEntry.java","position":52,"original_position":52,"commit_id":"ec53503dbddf1695d5d8306d5b6cc719f1d70e53","original_commit_id":"ec53503dbddf1695d5d8306d5b6cc719f1d70e53","user":{"login":"ibuenros","id":1364112,"avatar_url":"https://avatars.githubusercontent.com/u/1364112?v=3","gravatar_id":"","url":"https://api.github.com/users/ibuenros","html_url":"https://github.com/ibuenros","followers_url":"https://api.github.com/users/ibuenros/followers","following_url":"https://api.github.com/users/ibuenros/following{/other_user}","gists_url":"https://api.github.com/users/ibuenros/gists{/gist_id}","starred_url":"https://api.github.com/users/ibuenros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibuenros/subscriptions","organizations_url":"https://api.github.com/users/ibuenros/orgs","repos_url":"https://api.github.com/users/ibuenros/repos","events_url":"https://api.github.com/users/ibuenros/events{/privacy}","received_events_url":"https://api.github.com/users/ibuenros/received_events","type":"User","site_admin":false},"body":"```java\r\nthis.fileStatus = Optional.absent();\r\nthis.exists = false;\r\n```","created_at":"2016-07-22T19:15:32Z","updated_at":"2016-07-22T19:15:32Z","html_url":"https://github.com/linkedin/gobblin/pull/1066#discussion_r71931043","pull_request_url":"https://api.github.com/repos/linkedin/gobblin/pulls/1066","_links":{"self":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/comments/71931043"},"html":{"href":"https://github.com/linkedin/gobblin/pull/1066#discussion_r71931043"},"pull_request":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/1066"}}},"pull_request":{"url":"https://api.github.com/repos/linkedin/gobblin/pulls/1066","id":74994470,"html_url":"https://github.com/linkedin/gobblin/pull/1066","diff_url":"https://github.com/linkedin/gobblin/pull/1066.diff","patch_url":"https://github.com/linkedin/gobblin/pull/1066.patch","issue_url":"https://api.github.com/repos/linkedin/gobblin/issues/1066","number":1066,"state":"open","locked":false,"title":"Config file monitor for general file system","user":{"login":"autumnust","id":5044213,"avatar_url":"https://avatars.githubusercontent.com/u/5044213?v=3","gravatar_id":"","url":"https://api.github.com/users/autumnust","html_url":"https://github.com/autumnust","followers_url":"https://api.github.com/users/autumnust/followers","following_url":"https://api.github.com/users/autumnust/following{/other_user}","gists_url":"https://api.github.com/users/autumnust/gists{/gist_id}","starred_url":"https://api.github.com/users/autumnust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autumnust/subscriptions","organizations_url":"https://api.github.com/users/autumnust/orgs","repos_url":"https://api.github.com/users/autumnust/repos","events_url":"https://api.github.com/users/autumnust/events{/privacy}","received_events_url":"https://api.github.com/users/autumnust/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-23T17:28:19Z","updated_at":"2016-07-22T19:15:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ceeb5b5d4f1d11ee3d06fe133f889f8ad549933","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/linkedin/gobblin/pulls/1066/commits","review_comments_url":"https://api.github.com/repos/linkedin/gobblin/pulls/1066/comments","review_comment_url":"https://api.github.com/repos/linkedin/gobblin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkedin/gobblin/issues/1066/comments","statuses_url":"https://api.github.com/repos/linkedin/gobblin/statuses/ec53503dbddf1695d5d8306d5b6cc719f1d70e53","head":{"label":"autumnust:monitor-dev","ref":"monitor-dev","sha":"ec53503dbddf1695d5d8306d5b6cc719f1d70e53","user":{"login":"autumnust","id":5044213,"avatar_url":"https://avatars.githubusercontent.com/u/5044213?v=3","gravatar_id":"","url":"https://api.github.com/users/autumnust","html_url":"https://github.com/autumnust","followers_url":"https://api.github.com/users/autumnust/followers","following_url":"https://api.github.com/users/autumnust/following{/other_user}","gists_url":"https://api.github.com/users/autumnust/gists{/gist_id}","starred_url":"https://api.github.com/users/autumnust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autumnust/subscriptions","organizations_url":"https://api.github.com/users/autumnust/orgs","repos_url":"https://api.github.com/users/autumnust/repos","events_url":"https://api.github.com/users/autumnust/events{/privacy}","received_events_url":"https://api.github.com/users/autumnust/received_events","type":"User","site_admin":false},"repo":{"id":60211282,"name":"gobblin","full_name":"autumnust/gobblin","owner":{"login":"autumnust","id":5044213,"avatar_url":"https://avatars.githubusercontent.com/u/5044213?v=3","gravatar_id":"","url":"https://api.github.com/users/autumnust","html_url":"https://github.com/autumnust","followers_url":"https://api.github.com/users/autumnust/followers","following_url":"https://api.github.com/users/autumnust/following{/other_user}","gists_url":"https://api.github.com/users/autumnust/gists{/gist_id}","starred_url":"https://api.github.com/users/autumnust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autumnust/subscriptions","organizations_url":"https://api.github.com/users/autumnust/orgs","repos_url":"https://api.github.com/users/autumnust/repos","events_url":"https://api.github.com/users/autumnust/events{/privacy}","received_events_url":"https://api.github.com/users/autumnust/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/autumnust/gobblin","description":"Universal data ingestion framework for Hadoop.","fork":true,"url":"https://api.github.com/repos/autumnust/gobblin","forks_url":"https://api.github.com/repos/autumnust/gobblin/forks","keys_url":"https://api.github.com/repos/autumnust/gobblin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autumnust/gobblin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autumnust/gobblin/teams","hooks_url":"https://api.github.com/repos/autumnust/gobblin/hooks","issue_events_url":"https://api.github.com/repos/autumnust/gobblin/issues/events{/number}","events_url":"https://api.github.com/repos/autumnust/gobblin/events","assignees_url":"https://api.github.com/repos/autumnust/gobblin/assignees{/user}","branches_url":"https://api.github.com/repos/autumnust/gobblin/branches{/branch}","tags_url":"https://api.github.com/repos/autumnust/gobblin/tags","blobs_url":"https://api.github.com/repos/autumnust/gobblin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autumnust/gobblin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autumnust/gobblin/git/refs{/sha}","trees_url":"https://api.github.com/repos/autumnust/gobblin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autumnust/gobblin/statuses/{sha}","languages_url":"https://api.github.com/repos/autumnust/gobblin/languages","stargazers_url":"https://api.github.com/repos/autumnust/gobblin/stargazers","contributors_url":"https://api.github.com/repos/autumnust/gobblin/contributors","subscribers_url":"https://api.github.com/repos/autumnust/gobblin/subscribers","subscription_url":"https://api.github.com/repos/autumnust/gobblin/subscription","commits_url":"https://api.github.com/repos/autumnust/gobblin/commits{/sha}","git_commits_url":"https://api.github.com/repos/autumnust/gobblin/git/commits{/sha}","comments_url":"https://api.github.com/repos/autumnust/gobblin/comments{/number}","issue_comment_url":"https://api.github.com/repos/autumnust/gobblin/issues/comments{/number}","contents_url":"https://api.github.com/repos/autumnust/gobblin/contents/{+path}","compare_url":"https://api.github.com/repos/autumnust/gobblin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autumnust/gobblin/merges","archive_url":"https://api.github.com/repos/autumnust/gobblin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autumnust/gobblin/downloads","issues_url":"https://api.github.com/repos/autumnust/gobblin/issues{/number}","pulls_url":"https://api.github.com/repos/autumnust/gobblin/pulls{/number}","milestones_url":"https://api.github.com/repos/autumnust/gobblin/milestones{/number}","notifications_url":"https://api.github.com/repos/autumnust/gobblin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autumnust/gobblin/labels{/name}","releases_url":"https://api.github.com/repos/autumnust/gobblin/releases{/id}","deployments_url":"https://api.github.com/repos/autumnust/gobblin/deployments","created_at":"2016-06-01T21:14:50Z","updated_at":"2016-06-01T21:14:55Z","pushed_at":"2016-07-22T19:05:29Z","git_url":"git://github.com/autumnust/gobblin.git","ssh_url":"git@github.com:autumnust/gobblin.git","clone_url":"https://github.com/autumnust/gobblin.git","svn_url":"https://github.com/autumnust/gobblin","homepage":"https://github.com/linkedin/gobblin/wiki","size":93526,"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":"e5a5985df3c53e1c0a1104caea5d4afff743c8b5","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-07-22T15:54:32Z","pushed_at":"2016-07-22T19:05:29Z","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":175717,"stargazers_count":644,"watchers_count":644,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":260,"mirror_url":null,"open_issues_count":102,"forks":260,"open_issues":102,"watchers":644,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/1066"},"html":{"href":"https://github.com/linkedin/gobblin/pull/1066"},"issue":{"href":"https://api.github.com/repos/linkedin/gobblin/issues/1066"},"comments":{"href":"https://api.github.com/repos/linkedin/gobblin/issues/1066/comments"},"review_comments":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/1066/comments"},"review_comment":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/1066/commits"},"statuses":{"href":"https://api.github.com/repos/linkedin/gobblin/statuses/ec53503dbddf1695d5d8306d5b6cc719f1d70e53"}}}}
{"actor":{"display_login":"ibuenros"}}