{"action":"created","comment":{"url":"https://api.github.com/repos/CommBank/maestro/pulls/comments/28667730","id":28667730,"diff_hunk":"@@ -0,0 +1,116 @@\n+package au.com.cba.omnia.maestro.core.hdfs\n+\n+import org.apache.hadoop.conf.Configuration\n+import org.specs2.matcher.FileMatchers\n+\n+import au.com.cba.omnia.thermometer.core.{ThermometerSpec, Thermometer}, Thermometer._\n+import au.com.cba.omnia.omnitool.Ok\n+\n+class HdfsUtilsSpec extends ThermometerSpec with FileMatchers { def is = s2\"\"\"\n+\n+HdfsUtils properties\n+====================\n+\n+  expandPaths:\n+    matches globbed dirs               $expandPaths_matchesGlobbedDirs\n+    skips files                        $expandPaths_skipsFiles\n+    skips processed dirs               $expandPaths_skipsProcessed\n+\n+  expandTransferredPaths:\n+    skips uningested dirs              $expandTransferredPaths_skipsUningested\n+\n+  listNonEmptyFiles:\n+    lists non-empty files              $listNonEmptyFiles_listsNonEmptyFiles\n+    skips subdirectories               $listNonEmptyFiles_skipsSubdirectories\n+\n+  createFlagFile:\n+    creates _PROCESSED                 $createFlagFile_createsPROCESSED\n+\"\"\"\n+\n+  def expandPaths_matchesGlobbedDirs = {\n+    withEnvironment(path(getClass.getResource(\"/hdfs-guard\").toString)) {\n+      val conf = new Configuration\n+      HdfsUtils.expandPaths(s\"$dir/user/a*\").run(conf) must beLike {\n+        case Ok(strings) => strings must containTheSameElementsAs(List(\n+          s\"file:$dir/user/a\",\n+          s\"file:$dir/user/a1\"\n+          // excludes various other directories that don't match the glob\n+        ))\n+      }\n+    }\n+  }\n+","path":"maestro-core/src/test/scala/au/com/cba/omnia/maestro/core/hdfs/HdfsUtilsSpec.scala","position":42,"original_position":42,"commit_id":"7f20a3ec10e144e09b92d40c902958705afda895","original_commit_id":"42e783d6cedb30097e378293345d671a5f789e66","user":{"login":"toddmowen","id":370691,"avatar_url":"https://avatars.githubusercontent.com/u/370691?v=3","gravatar_id":"","url":"https://api.github.com/users/toddmowen","html_url":"https://github.com/toddmowen","followers_url":"https://api.github.com/users/toddmowen/followers","following_url":"https://api.github.com/users/toddmowen/following{/other_user}","gists_url":"https://api.github.com/users/toddmowen/gists{/gist_id}","starred_url":"https://api.github.com/users/toddmowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddmowen/subscriptions","organizations_url":"https://api.github.com/users/toddmowen/orgs","repos_url":"https://api.github.com/users/toddmowen/repos","events_url":"https://api.github.com/users/toddmowen/events{/privacy}","received_events_url":"https://api.github.com/users/toddmowen/received_events","type":"User","site_admin":false},"body":"I currently have the tests working with a copy of `HdfsMatchers` trait which I pulled out of permafrost and simplified. I think I'll probably patch permafrost to make this available as a public export (instead of internal to permafrost's test suite).","created_at":"2015-04-20T07:16:55Z","updated_at":"2015-04-20T07:16:55Z","html_url":"https://github.com/CommBank/maestro/pull/370#discussion_r28667730","pull_request_url":"https://api.github.com/repos/CommBank/maestro/pulls/370","_links":{"self":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/comments/28667730"},"html":{"href":"https://github.com/CommBank/maestro/pull/370#discussion_r28667730"},"pull_request":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/370"}}},"pull_request":{"url":"https://api.github.com/repos/CommBank/maestro/pulls/370","id":33517389,"html_url":"https://github.com/CommBank/maestro/pull/370","diff_url":"https://github.com/CommBank/maestro/pull/370.diff","patch_url":"https://github.com/CommBank/maestro/pull/370.patch","issue_url":"https://api.github.com/repos/CommBank/maestro/issues/370","number":370,"state":"open","locked":false,"title":"Adds HdfsUtils and deprecates Guard","user":{"login":"toddmowen","id":370691,"avatar_url":"https://avatars.githubusercontent.com/u/370691?v=3","gravatar_id":"","url":"https://api.github.com/users/toddmowen","html_url":"https://github.com/toddmowen","followers_url":"https://api.github.com/users/toddmowen/followers","following_url":"https://api.github.com/users/toddmowen/following{/other_user}","gists_url":"https://api.github.com/users/toddmowen/gists{/gist_id}","starred_url":"https://api.github.com/users/toddmowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddmowen/subscriptions","organizations_url":"https://api.github.com/users/toddmowen/orgs","repos_url":"https://api.github.com/users/toddmowen/repos","events_url":"https://api.github.com/users/toddmowen/events{/privacy}","received_events_url":"https://api.github.com/users/toddmowen/received_events","type":"User","site_admin":false},"body":"This fixes #285, as the new methods return Hdfs actions.","created_at":"2015-04-17T06:22:59Z","updated_at":"2015-04-20T07:16:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83033f83e727fd273ac189b50ec98b44e404eac3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CommBank/maestro/pulls/370/commits","review_comments_url":"https://api.github.com/repos/CommBank/maestro/pulls/370/comments","review_comment_url":"https://api.github.com/repos/CommBank/maestro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CommBank/maestro/issues/370/comments","statuses_url":"https://api.github.com/repos/CommBank/maestro/statuses/7f20a3ec10e144e09b92d40c902958705afda895","head":{"label":"CommBank:hdfsutils","ref":"hdfsutils","sha":"7f20a3ec10e144e09b92d40c902958705afda895","user":{"login":"CommBank","id":4240076,"avatar_url":"https://avatars.githubusercontent.com/u/4240076?v=3","gravatar_id":"","url":"https://api.github.com/users/CommBank","html_url":"https://github.com/CommBank","followers_url":"https://api.github.com/users/CommBank/followers","following_url":"https://api.github.com/users/CommBank/following{/other_user}","gists_url":"https://api.github.com/users/CommBank/gists{/gist_id}","starred_url":"https://api.github.com/users/CommBank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CommBank/subscriptions","organizations_url":"https://api.github.com/users/CommBank/orgs","repos_url":"https://api.github.com/users/CommBank/repos","events_url":"https://api.github.com/users/CommBank/events{/privacy}","received_events_url":"https://api.github.com/users/CommBank/received_events","type":"Organization","site_admin":false},"repo":{"id":17347463,"name":"maestro","full_name":"CommBank/maestro","owner":{"login":"CommBank","id":4240076,"avatar_url":"https://avatars.githubusercontent.com/u/4240076?v=3","gravatar_id":"","url":"https://api.github.com/users/CommBank","html_url":"https://github.com/CommBank","followers_url":"https://api.github.com/users/CommBank/followers","following_url":"https://api.github.com/users/CommBank/following{/other_user}","gists_url":"https://api.github.com/users/CommBank/gists{/gist_id}","starred_url":"https://api.github.com/users/CommBank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CommBank/subscriptions","organizations_url":"https://api.github.com/users/CommBank/orgs","repos_url":"https://api.github.com/users/CommBank/repos","events_url":"https://api.github.com/users/CommBank/events{/privacy}","received_events_url":"https://api.github.com/users/CommBank/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CommBank/maestro","description":"Data Pipelines that are well typed and enforce good convention","fork":false,"url":"https://api.github.com/repos/CommBank/maestro","forks_url":"https://api.github.com/repos/CommBank/maestro/forks","keys_url":"https://api.github.com/repos/CommBank/maestro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CommBank/maestro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CommBank/maestro/teams","hooks_url":"https://api.github.com/repos/CommBank/maestro/hooks","issue_events_url":"https://api.github.com/repos/CommBank/maestro/issues/events{/number}","events_url":"https://api.github.com/repos/CommBank/maestro/events","assignees_url":"https://api.github.com/repos/CommBank/maestro/assignees{/user}","branches_url":"https://api.github.com/repos/CommBank/maestro/branches{/branch}","tags_url":"https://api.github.com/repos/CommBank/maestro/tags","blobs_url":"https://api.github.com/repos/CommBank/maestro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CommBank/maestro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CommBank/maestro/git/refs{/sha}","trees_url":"https://api.github.com/repos/CommBank/maestro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CommBank/maestro/statuses/{sha}","languages_url":"https://api.github.com/repos/CommBank/maestro/languages","stargazers_url":"https://api.github.com/repos/CommBank/maestro/stargazers","contributors_url":"https://api.github.com/repos/CommBank/maestro/contributors","subscribers_url":"https://api.github.com/repos/CommBank/maestro/subscribers","subscription_url":"https://api.github.com/repos/CommBank/maestro/subscription","commits_url":"https://api.github.com/repos/CommBank/maestro/commits{/sha}","git_commits_url":"https://api.github.com/repos/CommBank/maestro/git/commits{/sha}","comments_url":"https://api.github.com/repos/CommBank/maestro/comments{/number}","issue_comment_url":"https://api.github.com/repos/CommBank/maestro/issues/comments{/number}","contents_url":"https://api.github.com/repos/CommBank/maestro/contents/{+path}","compare_url":"https://api.github.com/repos/CommBank/maestro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CommBank/maestro/merges","archive_url":"https://api.github.com/repos/CommBank/maestro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CommBank/maestro/downloads","issues_url":"https://api.github.com/repos/CommBank/maestro/issues{/number}","pulls_url":"https://api.github.com/repos/CommBank/maestro/pulls{/number}","milestones_url":"https://api.github.com/repos/CommBank/maestro/milestones{/number}","notifications_url":"https://api.github.com/repos/CommBank/maestro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CommBank/maestro/labels{/name}","releases_url":"https://api.github.com/repos/CommBank/maestro/releases{/id}","created_at":"2014-03-02T21:34:53Z","updated_at":"2015-04-20T01:17:16Z","pushed_at":"2015-04-20T05:04:01Z","git_url":"git://github.com/CommBank/maestro.git","ssh_url":"git@github.com:CommBank/maestro.git","clone_url":"https://github.com/CommBank/maestro.git","svn_url":"https://github.com/CommBank/maestro","homepage":"https://commbank.github.io/maestro","size":45026,"stargazers_count":26,"watchers_count":26,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":16,"mirror_url":null,"open_issues_count":52,"forks":16,"open_issues":52,"watchers":26,"default_branch":"master"}},"base":{"label":"CommBank:master","ref":"master","sha":"0fdf42738f90c89897cc8cf621ae7f8e5e36a228","user":{"login":"CommBank","id":4240076,"avatar_url":"https://avatars.githubusercontent.com/u/4240076?v=3","gravatar_id":"","url":"https://api.github.com/users/CommBank","html_url":"https://github.com/CommBank","followers_url":"https://api.github.com/users/CommBank/followers","following_url":"https://api.github.com/users/CommBank/following{/other_user}","gists_url":"https://api.github.com/users/CommBank/gists{/gist_id}","starred_url":"https://api.github.com/users/CommBank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CommBank/subscriptions","organizations_url":"https://api.github.com/users/CommBank/orgs","repos_url":"https://api.github.com/users/CommBank/repos","events_url":"https://api.github.com/users/CommBank/events{/privacy}","received_events_url":"https://api.github.com/users/CommBank/received_events","type":"Organization","site_admin":false},"repo":{"id":17347463,"name":"maestro","full_name":"CommBank/maestro","owner":{"login":"CommBank","id":4240076,"avatar_url":"https://avatars.githubusercontent.com/u/4240076?v=3","gravatar_id":"","url":"https://api.github.com/users/CommBank","html_url":"https://github.com/CommBank","followers_url":"https://api.github.com/users/CommBank/followers","following_url":"https://api.github.com/users/CommBank/following{/other_user}","gists_url":"https://api.github.com/users/CommBank/gists{/gist_id}","starred_url":"https://api.github.com/users/CommBank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CommBank/subscriptions","organizations_url":"https://api.github.com/users/CommBank/orgs","repos_url":"https://api.github.com/users/CommBank/repos","events_url":"https://api.github.com/users/CommBank/events{/privacy}","received_events_url":"https://api.github.com/users/CommBank/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CommBank/maestro","description":"Data Pipelines that are well typed and enforce good convention","fork":false,"url":"https://api.github.com/repos/CommBank/maestro","forks_url":"https://api.github.com/repos/CommBank/maestro/forks","keys_url":"https://api.github.com/repos/CommBank/maestro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CommBank/maestro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CommBank/maestro/teams","hooks_url":"https://api.github.com/repos/CommBank/maestro/hooks","issue_events_url":"https://api.github.com/repos/CommBank/maestro/issues/events{/number}","events_url":"https://api.github.com/repos/CommBank/maestro/events","assignees_url":"https://api.github.com/repos/CommBank/maestro/assignees{/user}","branches_url":"https://api.github.com/repos/CommBank/maestro/branches{/branch}","tags_url":"https://api.github.com/repos/CommBank/maestro/tags","blobs_url":"https://api.github.com/repos/CommBank/maestro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CommBank/maestro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CommBank/maestro/git/refs{/sha}","trees_url":"https://api.github.com/repos/CommBank/maestro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CommBank/maestro/statuses/{sha}","languages_url":"https://api.github.com/repos/CommBank/maestro/languages","stargazers_url":"https://api.github.com/repos/CommBank/maestro/stargazers","contributors_url":"https://api.github.com/repos/CommBank/maestro/contributors","subscribers_url":"https://api.github.com/repos/CommBank/maestro/subscribers","subscription_url":"https://api.github.com/repos/CommBank/maestro/subscription","commits_url":"https://api.github.com/repos/CommBank/maestro/commits{/sha}","git_commits_url":"https://api.github.com/repos/CommBank/maestro/git/commits{/sha}","comments_url":"https://api.github.com/repos/CommBank/maestro/comments{/number}","issue_comment_url":"https://api.github.com/repos/CommBank/maestro/issues/comments{/number}","contents_url":"https://api.github.com/repos/CommBank/maestro/contents/{+path}","compare_url":"https://api.github.com/repos/CommBank/maestro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CommBank/maestro/merges","archive_url":"https://api.github.com/repos/CommBank/maestro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CommBank/maestro/downloads","issues_url":"https://api.github.com/repos/CommBank/maestro/issues{/number}","pulls_url":"https://api.github.com/repos/CommBank/maestro/pulls{/number}","milestones_url":"https://api.github.com/repos/CommBank/maestro/milestones{/number}","notifications_url":"https://api.github.com/repos/CommBank/maestro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CommBank/maestro/labels{/name}","releases_url":"https://api.github.com/repos/CommBank/maestro/releases{/id}","created_at":"2014-03-02T21:34:53Z","updated_at":"2015-04-20T01:17:16Z","pushed_at":"2015-04-20T05:04:01Z","git_url":"git://github.com/CommBank/maestro.git","ssh_url":"git@github.com:CommBank/maestro.git","clone_url":"https://github.com/CommBank/maestro.git","svn_url":"https://github.com/CommBank/maestro","homepage":"https://commbank.github.io/maestro","size":45026,"stargazers_count":26,"watchers_count":26,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":16,"mirror_url":null,"open_issues_count":52,"forks":16,"open_issues":52,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/370"},"html":{"href":"https://github.com/CommBank/maestro/pull/370"},"issue":{"href":"https://api.github.com/repos/CommBank/maestro/issues/370"},"comments":{"href":"https://api.github.com/repos/CommBank/maestro/issues/370/comments"},"review_comments":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/370/comments"},"review_comment":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/370/commits"},"statuses":{"href":"https://api.github.com/repos/CommBank/maestro/statuses/7f20a3ec10e144e09b92d40c902958705afda895"}}}}