{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments/73574550","id":73574550,"diff_hunk":"@@ -0,0 +1,62 @@\n+package cromwell.engine.workflow.lifecycle.execution.callcaching\n+\n+import java.nio.file.Path\n+\n+import akka.actor.Actor.Receive\n+import akka.actor.{Actor, ActorLogging, ActorRef, Props}\n+import cromwell.core.JobKey\n+import cromwell.engine.workflow.lifecycle.execution.callcaching.EngineJobHashingActor.HashResultMessage\n+import cromwell.engine.workflow.lifecycle.execution.callcaching.FileHasherActor._\n+\n+/**\n+  * How to bootstrap this TBD. Presumably a singleton.\n+  *\n+  * Contains a set of sub-actors, one per filesystem.\n+  *\n+  * Receives a set of files to hash, returns the hashes as a trickle.\n+  */\n+class FileHasherActor(filesystemSpecificActors: List[ActorRef]) extends Actor with ActorLogging {\n+\n+  override def receive: Receive = {\n+    // Choose an appropriate hasher for each file and send it on\n+    case JobFileHashRequests(jobKey, files) =>\n+      files groupBy getAnAppropriateFilesystemSpecificActor foreach {\n+        case (actor, group) => actor.tell(JobFileHashRequests(jobKey, group), sender)\n+      }\n+    case cancellation: HashesNoLongerRequired =>\n+      filesystemSpecificActors foreach { _ ! cancellation }\n+  }\n+\n+  // TODO: Implement me better (using the filesystemSpecificActors in the class constructor)\n+  // Should be QUICK (used in a receive block) otherwise re-engineer\n+  private val reallyStupidFileHasher = context.actorOf(ReallyStupidFileHasher.props)\n+  private def getAnAppropriateFilesystemSpecificActor(fileToHash: SingleFileHashRequest): ActorRef = reallyStupidFileHasher\n+}\n+\n+object FileHasherActor {\n+  sealed trait FileHasherCommand\n+  case class SingleFileHashRequest(hashKey: HashKey, file: Path)\n+  case class JobFileHashRequests(jobKey: JobKey, files: Iterable[SingleFileHashRequest]) extends FileHasherCommand\n+  case class HashesNoLongerRequired(jobKey: JobKey)\n+\n+  case class FileHasherResponse(hashResult: HashResult) extends HashResultMessage { override def hashes = List(hashResult) }\n+}\n+\n+\n+\n+@deprecated(\"This is really stupid\", \"always\")\n+class ReallyStupidFileHasher extends Actor with ActorLogging {\n+  override def receive: Receive = {\n+    case JobFileHashRequests(jobKey, fileHashRequests) => {\n+      fileHashRequests foreach { hashRequest =>\n+        sender ! HashResult(jobKey, hashRequest.hashKey, HashValue(hashRequest.file.toAbsolutePath.toString))\n+      }\n+    }\n+  }\n+}\n+\n+@deprecated(\"This is really stupid\", \"always\")\n+object ReallyStupidFileHasher {\n+  @deprecated(\"This is really stupid\", \"always\")\n+  def props: Props = Props(new ReallyStupidFileHasher)\n+}","path":"engine/src/main/scala/cromwell/engine/workflow/lifecycle/execution/callcaching/FileHasherActor.scala","position":62,"original_position":62,"commit_id":"c8355e80a6fc40be08c152bc997d9dde1424ec93","original_commit_id":"c8355e80a6fc40be08c152bc997d9dde1424ec93","user":{"login":"mcovarr","id":10790523,"avatar_url":"https://avatars.githubusercontent.com/u/10790523?v=3","gravatar_id":"","url":"https://api.github.com/users/mcovarr","html_url":"https://github.com/mcovarr","followers_url":"https://api.github.com/users/mcovarr/followers","following_url":"https://api.github.com/users/mcovarr/following{/other_user}","gists_url":"https://api.github.com/users/mcovarr/gists{/gist_id}","starred_url":"https://api.github.com/users/mcovarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcovarr/subscriptions","organizations_url":"https://api.github.com/users/mcovarr/orgs","repos_url":"https://api.github.com/users/mcovarr/repos","events_url":"https://api.github.com/users/mcovarr/events{/privacy}","received_events_url":"https://api.github.com/users/mcovarr/received_events","type":"User","site_admin":false},"body":"\\n","created_at":"2016-08-04T18:14:49Z","updated_at":"2016-08-04T18:14:49Z","html_url":"https://github.com/broadinstitute/cromwell/pull/1246#discussion_r73574550","pull_request_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/1246","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments/73574550"},"html":{"href":"https://github.com/broadinstitute/cromwell/pull/1246#discussion_r73574550"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/1246"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/1246","id":79982077,"html_url":"https://github.com/broadinstitute/cromwell/pull/1246","diff_url":"https://github.com/broadinstitute/cromwell/pull/1246.diff","patch_url":"https://github.com/broadinstitute/cromwell/pull/1246.patch","issue_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/1246","number":1246,"state":"open","locked":false,"title":"Call Caching Strawman 2: Revenge of the straw","user":{"login":"cjllanwarne","id":13006282,"avatar_url":"https://avatars.githubusercontent.com/u/13006282?v=3","gravatar_id":"","url":"https://api.github.com/users/cjllanwarne","html_url":"https://github.com/cjllanwarne","followers_url":"https://api.github.com/users/cjllanwarne/followers","following_url":"https://api.github.com/users/cjllanwarne/following{/other_user}","gists_url":"https://api.github.com/users/cjllanwarne/gists{/gist_id}","starred_url":"https://api.github.com/users/cjllanwarne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjllanwarne/subscriptions","organizations_url":"https://api.github.com/users/cjllanwarne/orgs","repos_url":"https://api.github.com/users/cjllanwarne/repos","events_url":"https://api.github.com/users/cjllanwarne/events{/privacy}","received_events_url":"https://api.github.com/users/cjllanwarne/received_events","type":"User","site_admin":false},"body":"This isn't wired in at all yet, but hopefully it makes **some** sense as is...","created_at":"2016-08-03T21:26:29Z","updated_at":"2016-08-04T18:14:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62297e5c5eb63d5bf36aec0eb918c68df15c518f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/1246/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/1246/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/1246/comments","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/c8355e80a6fc40be08c152bc997d9dde1424ec93","head":{"label":"broadinstitute:cjl_CCA_strawman_2","ref":"cjl_CCA_strawman_2","sha":"c8355e80a6fc40be08c152bc997d9dde1424ec93","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":34136406,"name":"cromwell","full_name":"broadinstitute/cromwell","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/cromwell","description":"Workflow Execution Engine using WDL","fork":false,"url":"https://api.github.com/repos/broadinstitute/cromwell","forks_url":"https://api.github.com/repos/broadinstitute/cromwell/forks","keys_url":"https://api.github.com/repos/broadinstitute/cromwell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/cromwell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/cromwell/teams","hooks_url":"https://api.github.com/repos/broadinstitute/cromwell/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/cromwell/events","assignees_url":"https://api.github.com/repos/broadinstitute/cromwell/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/cromwell/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/cromwell/tags","blobs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/cromwell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/cromwell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/cromwell/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/cromwell/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/cromwell/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/cromwell/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/cromwell/subscription","commits_url":"https://api.github.com/repos/broadinstitute/cromwell/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/cromwell/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/cromwell/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/cromwell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/cromwell/merges","archive_url":"https://api.github.com/repos/broadinstitute/cromwell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/cromwell/downloads","issues_url":"https://api.github.com/repos/broadinstitute/cromwell/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/cromwell/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/cromwell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/cromwell/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/cromwell/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/cromwell/deployments","created_at":"2015-04-17T19:39:36Z","updated_at":"2016-07-19T15:31:37Z","pushed_at":"2016-08-04T18:09:16Z","git_url":"git://github.com/broadinstitute/cromwell.git","ssh_url":"git@github.com:broadinstitute/cromwell.git","clone_url":"https://github.com/broadinstitute/cromwell.git","svn_url":"https://github.com/broadinstitute/cromwell","homepage":"","size":8231,"stargazers_count":77,"watchers_count":77,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":138,"forks":17,"open_issues":138,"watchers":77,"default_branch":"develop"}},"base":{"label":"broadinstitute:develop","ref":"develop","sha":"4876c1732c53751e856f46d110e0ff046c20bdda","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":34136406,"name":"cromwell","full_name":"broadinstitute/cromwell","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/cromwell","description":"Workflow Execution Engine using WDL","fork":false,"url":"https://api.github.com/repos/broadinstitute/cromwell","forks_url":"https://api.github.com/repos/broadinstitute/cromwell/forks","keys_url":"https://api.github.com/repos/broadinstitute/cromwell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/cromwell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/cromwell/teams","hooks_url":"https://api.github.com/repos/broadinstitute/cromwell/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/cromwell/events","assignees_url":"https://api.github.com/repos/broadinstitute/cromwell/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/cromwell/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/cromwell/tags","blobs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/cromwell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/cromwell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/cromwell/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/cromwell/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/cromwell/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/cromwell/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/cromwell/subscription","commits_url":"https://api.github.com/repos/broadinstitute/cromwell/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/cromwell/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/cromwell/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/cromwell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/cromwell/merges","archive_url":"https://api.github.com/repos/broadinstitute/cromwell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/cromwell/downloads","issues_url":"https://api.github.com/repos/broadinstitute/cromwell/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/cromwell/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/cromwell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/cromwell/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/cromwell/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/cromwell/deployments","created_at":"2015-04-17T19:39:36Z","updated_at":"2016-07-19T15:31:37Z","pushed_at":"2016-08-04T18:09:16Z","git_url":"git://github.com/broadinstitute/cromwell.git","ssh_url":"git@github.com:broadinstitute/cromwell.git","clone_url":"https://github.com/broadinstitute/cromwell.git","svn_url":"https://github.com/broadinstitute/cromwell","homepage":"","size":8231,"stargazers_count":77,"watchers_count":77,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":138,"forks":17,"open_issues":138,"watchers":77,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/1246"},"html":{"href":"https://github.com/broadinstitute/cromwell/pull/1246"},"issue":{"href":"https://api.github.com/repos/broadinstitute/cromwell/issues/1246"},"comments":{"href":"https://api.github.com/repos/broadinstitute/cromwell/issues/1246/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/1246/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/1246/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/cromwell/statuses/c8355e80a6fc40be08c152bc997d9dde1424ec93"}}}}
{"actor":{"display_login":"mcovarr"}}