GitHub PullRequestReviewCommentEvent at 2014-07-16 23:12:09
Repository: maestro
Actor: SamRoberts
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/CommBank/maestro/pulls/comments/15033770","id":15033770,"diff_hunk":"@@ -0,0 +1,53 @@\n+//   Copyright 2014 Commonwealth Bank of Australia\n+//\n+//   Licensed under the Apache License, Version 2.0 (the \"License\");\n+//   you may not use this file except in compliance with the License.\n+//   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+package au.com.cba.omnia.maestro.core\n+package tributary\n+\n+import com.cba.omnia.edge.hdfs.{Hdfs, Result}\n+\n+/**\n+  * Operations on Hdfs and Result that belong on edge.\n+  *\n+  * TODO move these operations to the appropriate place in edge.\n+  */\n+object EdgeOp {\n+\n+  /**\n+    * Returns a an exception Result if a predicate is false,\n+    * otherwise returns a `Unit` Result success\n+    */\n+  def failIf(b: Boolean)(msg: String): Result[Unit] =\n+    if (b) Result.fail(msg) else Result.ok(())\n+\n+  def failHdfsIf(b: Boolean)(msg: String): Hdfs[Unit] =\n+    Hdfs.result(failIf(b)(msg))\n+\n+  /**\n+    * Runs the second action if the first one failes.\n+    *\n+    * If the first action fails, only the results of the second\n+    * acion are returned.\n+    */\n+  def or[A](hdfs1:Hdfs[A], hdfs2:Hdfs[A]) =\n+    Hdfs(conf => hdfs1.run(conf).fold(a => Result.ok(a), _ => hdfs2.run(conf)))\n+\n+  /**\n+    * Maps over the result of a Hdfs action, allowing you to\n+    * work with the errors as well as the success value.\n+    */\n+  def mapResult[A,B](f: Result[A] => Result[B])(hdfs:Hdfs[A]) =","path":"maestro-core/src/main/scala/au/com/cba/omnia/maestro/core/tributary/EdgeOp.scala","position":50,"original_position":50,"commit_id":"2cc5af1a7360ad807ab55344d8e1ca96d62c127b","original_commit_id":"2cc5af1a7360ad807ab55344d8e1ca96d62c127b","user":{"login":"SamRoberts","id":1086978,"avatar_url":"https://avatars.githubusercontent.com/u/1086978?","gravatar_id":"7d8de5e8f29d5e7465e7ff21aea05ed8","url":"https://api.github.com/users/SamRoberts","html_url":"https://github.com/SamRoberts","followers_url":"https://api.github.com/users/SamRoberts/followers","following_url":"https://api.github.com/users/SamRoberts/following{/other_user}","gists_url":"https://api.github.com/users/SamRoberts/gists{/gist_id}","starred_url":"https://api.github.com/users/SamRoberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamRoberts/subscriptions","organizations_url":"https://api.github.com/users/SamRoberts/orgs","repos_url":"https://api.github.com/users/SamRoberts/repos","events_url":"https://api.github.com/users/SamRoberts/events{/privacy}","received_events_url":"https://api.github.com/users/SamRoberts/received_events","type":"User","site_admin":false},"body":"will fix","created_at":"2014-07-16T23:12:09Z","updated_at":"2014-07-16T23:12:09Z","html_url":"https://github.com/CommBank/maestro/pull/119#discussion_r15033770","pull_request_url":"https://api.github.com/repos/CommBank/maestro/pulls/119","_links":{"self":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/comments/15033770"},"html":{"href":"https://github.com/CommBank/maestro/pull/119#discussion_r15033770"},"pull_request":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/119"}}},"pull_request":{"url":"https://api.github.com/repos/CommBank/maestro/pulls/119","id":18334246,"html_url":"https://github.com/CommBank/maestro/pull/119","diff_url":"https://github.com/CommBank/maestro/pull/119.diff","patch_url":"https://github.com/CommBank/maestro/pull/119.patch","issue_url":"https://api.github.com/repos/CommBank/maestro/issues/119","number":119,"state":"open","title":"Add tributary logic to maestro","user":{"login":"SamRoberts","id":1086978,"avatar_url":"https://avatars.githubusercontent.com/u/1086978?","gravatar_id":"7d8de5e8f29d5e7465e7ff21aea05ed8","url":"https://api.github.com/users/SamRoberts","html_url":"https://github.com/SamRoberts","followers_url":"https://api.github.com/users/SamRoberts/followers","following_url":"https://api.github.com/users/SamRoberts/following{/other_user}","gists_url":"https://api.github.com/users/SamRoberts/gists{/gist_id}","starred_url":"https://api.github.com/users/SamRoberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamRoberts/subscriptions","organizations_url":"https://api.github.com/users/SamRoberts/orgs","repos_url":"https://api.github.com/users/SamRoberts/repos","events_url":"https://api.github.com/users/SamRoberts/events{/privacy}","received_events_url":"https://api.github.com/users/SamRoberts/received_events","type":"User","site_admin":false},"body":"1) extended tributary logic by avoiding copying duplicate files\r\n2) refactored tributary logic so it is an Hdfs action\r\n3) fixed tributary logic so that archive directory structure mimics HDFS source structure\r\n4) changed tributary tests so they each run in an isolated directory\r\n5) date parsing does not allow overflowed days and months\r\n6) many other misc changes to tributary logic\r\n\r\nSorry about the size of the pull request :(","created_at":"2014-07-14T07:05:09Z","updated_at":"2014-07-16T23:12:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f4496b0013acc6201579292bb13abea808cd2ed","assignee":{"login":"SamRoberts","id":1086978,"avatar_url":"https://avatars.githubusercontent.com/u/1086978?","gravatar_id":"7d8de5e8f29d5e7465e7ff21aea05ed8","url":"https://api.github.com/users/SamRoberts","html_url":"https://github.com/SamRoberts","followers_url":"https://api.github.com/users/SamRoberts/followers","following_url":"https://api.github.com/users/SamRoberts/following{/other_user}","gists_url":"https://api.github.com/users/SamRoberts/gists{/gist_id}","starred_url":"https://api.github.com/users/SamRoberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamRoberts/subscriptions","organizations_url":"https://api.github.com/users/SamRoberts/orgs","repos_url":"https://api.github.com/users/SamRoberts/repos","events_url":"https://api.github.com/users/SamRoberts/events{/privacy}","received_events_url":"https://api.github.com/users/SamRoberts/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CommBank/maestro/pulls/119/commits","review_comments_url":"https://api.github.com/repos/CommBank/maestro/pulls/119/comments","review_comment_url":"https://api.github.com/repos/CommBank/maestro/pulls/comments/{number}","comments_url":"https://api.github.com/repos/CommBank/maestro/issues/119/comments","statuses_url":"https://api.github.com/repos/CommBank/maestro/statuses/2cc5af1a7360ad807ab55344d8e1ca96d62c127b","head":{"label":"CommBank:sam_tributary","ref":"sam_tributary","sha":"2cc5af1a7360ad807ab55344d8e1ca96d62c127b","user":{"login":"CommBank","id":4240076,"avatar_url":"https://avatars.githubusercontent.com/u/4240076?","gravatar_id":"89f708e8d47ed24762e84ba83347a044","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?","gravatar_id":"89f708e8d47ed24762e84ba83347a044","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":"2014-07-14T04:09:46Z","pushed_at":"2014-07-15T02:48:17Z","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":3936,"stargazers_count":7,"watchers_count":7,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":52,"forks":3,"open_issues":52,"watchers":7,"default_branch":"master"}},"base":{"label":"CommBank:master","ref":"master","sha":"58e45a08226bf07148d040650ad939455afe11de","user":{"login":"CommBank","id":4240076,"avatar_url":"https://avatars.githubusercontent.com/u/4240076?","gravatar_id":"89f708e8d47ed24762e84ba83347a044","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?","gravatar_id":"89f708e8d47ed24762e84ba83347a044","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":"2014-07-14T04:09:46Z","pushed_at":"2014-07-15T02:48:17Z","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":3936,"stargazers_count":7,"watchers_count":7,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":52,"forks":3,"open_issues":52,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/119"},"html":{"href":"https://github.com/CommBank/maestro/pull/119"},"issue":{"href":"https://api.github.com/repos/CommBank/maestro/issues/119"},"comments":{"href":"https://api.github.com/repos/CommBank/maestro/issues/119/comments"},"review_comments":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/119/comments"},"review_comment":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/119/commits"},"statuses":{"href":"https://api.github.com/repos/CommBank/maestro/statuses/2cc5af1a7360ad807ab55344d8e1ca96d62c127b"}}}}