{"action":"created","comment":{"url":"https://api.github.com/repos/twitter/summingbird/pulls/comments/78268313","id":78268313,"diff_hunk":"@@ -0,0 +1,148 @@\n+/*\n+ Copyright 2016 Twitter, Inc.\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+\n+package com.twitter.summingbird.online.executor\n+\n+import com.twitter.conversions.time._\n+import com.twitter.summingbird.online.option.{ MaxEmitPerExecute, MaxFutureWaitTime, MaxWaitingFutures }\n+import com.twitter.util._\n+import org.scalacheck._\n+import org.scalacheck.Gen._\n+import org.scalacheck.Arbitrary._\n+import org.scalacheck.Prop._\n+import org.scalatest.WordSpec\n+import org.scalatest.concurrent.Eventually\n+import org.scalatest.time.{ Seconds, Span }\n+import scala.util.{ Failure, Success }\n+\n+case class NonNegativeShort(get: Short) {\n+  require(get >= 0)\n+}\n+\n+class FutureQueueLaws extends Properties(\"FutureQueue\") with Eventually {\n+  def genTry[T](implicit arb: Arbitrary[T]): Gen[Try[T]] = Gen.oneOf(arb.arbitrary.map(Return(_)), Arbitrary.arbitrary[java.lang.Exception].map(Throw(_)))\n+  implicit def arbTry[T: Arbitrary] = Arbitrary(genTry[T])\n+\n+  implicit val arbNonNegativeShort: Arbitrary[NonNegativeShort] = Arbitrary(\n+    Arbitrary.arbitrary[Short].filter { _ >= 0 }.map { NonNegativeShort }\n+  )\n+  def twitterToScala[T](t: Try[T]) = t match {","path":"summingbird-online/src/test/scala/com/twitter/summingbird/online/executor/FutureQueueLaws.scala","position":42,"original_position":42,"commit_id":"47eeac64100fb7ecf3f7547125e246d9a20afa33","original_commit_id":"47eeac64100fb7ecf3f7547125e246d9a20afa33","user":{"login":"jnievelt","id":4684038,"avatar_url":"https://avatars.githubusercontent.com/u/4684038?v=3","gravatar_id":"","url":"https://api.github.com/users/jnievelt","html_url":"https://github.com/jnievelt","followers_url":"https://api.github.com/users/jnievelt/followers","following_url":"https://api.github.com/users/jnievelt/following{/other_user}","gists_url":"https://api.github.com/users/jnievelt/gists{/gist_id}","starred_url":"https://api.github.com/users/jnievelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnievelt/subscriptions","organizations_url":"https://api.github.com/users/jnievelt/orgs","repos_url":"https://api.github.com/users/jnievelt/repos","events_url":"https://api.github.com/users/jnievelt/events{/privacy}","received_events_url":"https://api.github.com/users/jnievelt/received_events","type":"User","site_admin":false},"body":"Looks like we already pick up bijection-util so I can just use what we have in `UtilBijections`.","created_at":"2016-09-10T01:30:22Z","updated_at":"2016-09-10T01:30:22Z","html_url":"https://github.com/twitter/summingbird/pull/685#discussion_r78268313","pull_request_url":"https://api.github.com/repos/twitter/summingbird/pulls/685","_links":{"self":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/comments/78268313"},"html":{"href":"https://github.com/twitter/summingbird/pull/685#discussion_r78268313"},"pull_request":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/685"}}},"pull_request":{"url":"https://api.github.com/repos/twitter/summingbird/pulls/685","id":83747922,"html_url":"https://github.com/twitter/summingbird/pull/685","diff_url":"https://github.com/twitter/summingbird/pull/685.diff","patch_url":"https://github.com/twitter/summingbird/pull/685.patch","issue_url":"https://api.github.com/repos/twitter/summingbird/issues/685","number":685,"state":"open","locked":false,"title":"Extracting Future queuing logic from AsyncBase","user":{"login":"jnievelt","id":4684038,"avatar_url":"https://avatars.githubusercontent.com/u/4684038?v=3","gravatar_id":"","url":"https://api.github.com/users/jnievelt","html_url":"https://github.com/jnievelt","followers_url":"https://api.github.com/users/jnievelt/followers","following_url":"https://api.github.com/users/jnievelt/following{/other_user}","gists_url":"https://api.github.com/users/jnievelt/gists{/gist_id}","starred_url":"https://api.github.com/users/jnievelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnievelt/subscriptions","organizations_url":"https://api.github.com/users/jnievelt/orgs","repos_url":"https://api.github.com/users/jnievelt/repos","events_url":"https://api.github.com/users/jnievelt/events{/privacy}","received_events_url":"https://api.github.com/users/jnievelt/received_events","type":"User","site_admin":false},"body":"Adding `FutureQueue`, a structure that essentially takes in `(S, Future[T])` and gives back `(S, Try[T])`.\r\n\r\nI didn't mean to totally gut `AsyncBase`, but it's mostly become a shim integrating its own interface (`apply`, `tick`), the `OperationContainer` interface (`execute`, `executeTick`), and its `FutureQueue`.\r\n\r\nMaking this private for now; ultimately we may want to move it to algebird.\r\n\r\nAdding a few more tests while I'm at it.  Cleaning up Node.scala style since it does that automatically.\r\n\r\nThe next step would be to integrate this with `AggregatingOutputCollector`.","created_at":"2016-09-02T05:39:29Z","updated_at":"2016-09-10T01:30:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"239749cf7f76b93ae45a3be5ab5c168827586c3a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/twitter/summingbird/pulls/685/commits","review_comments_url":"https://api.github.com/repos/twitter/summingbird/pulls/685/comments","review_comment_url":"https://api.github.com/repos/twitter/summingbird/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twitter/summingbird/issues/685/comments","statuses_url":"https://api.github.com/repos/twitter/summingbird/statuses/47eeac64100fb7ecf3f7547125e246d9a20afa33","head":{"label":"twitter:jnievelt/future-queue","ref":"jnievelt/future-queue","sha":"47eeac64100fb7ecf3f7547125e246d9a20afa33","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":5957708,"name":"summingbird","full_name":"twitter/summingbird","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/summingbird","description":"Streaming MapReduce with Scalding and Storm","fork":false,"url":"https://api.github.com/repos/twitter/summingbird","forks_url":"https://api.github.com/repos/twitter/summingbird/forks","keys_url":"https://api.github.com/repos/twitter/summingbird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/summingbird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/summingbird/teams","hooks_url":"https://api.github.com/repos/twitter/summingbird/hooks","issue_events_url":"https://api.github.com/repos/twitter/summingbird/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/summingbird/events","assignees_url":"https://api.github.com/repos/twitter/summingbird/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/summingbird/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/summingbird/tags","blobs_url":"https://api.github.com/repos/twitter/summingbird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/summingbird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/summingbird/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/summingbird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/summingbird/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/summingbird/languages","stargazers_url":"https://api.github.com/repos/twitter/summingbird/stargazers","contributors_url":"https://api.github.com/repos/twitter/summingbird/contributors","subscribers_url":"https://api.github.com/repos/twitter/summingbird/subscribers","subscription_url":"https://api.github.com/repos/twitter/summingbird/subscription","commits_url":"https://api.github.com/repos/twitter/summingbird/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/summingbird/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/summingbird/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/summingbird/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/summingbird/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/summingbird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/summingbird/merges","archive_url":"https://api.github.com/repos/twitter/summingbird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/summingbird/downloads","issues_url":"https://api.github.com/repos/twitter/summingbird/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/summingbird/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/summingbird/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/summingbird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/summingbird/labels{/name}","releases_url":"https://api.github.com/repos/twitter/summingbird/releases{/id}","deployments_url":"https://api.github.com/repos/twitter/summingbird/deployments","created_at":"2012-09-25T22:38:35Z","updated_at":"2016-09-06T11:14:44Z","pushed_at":"2016-09-08T00:58:19Z","git_url":"git://github.com/twitter/summingbird.git","ssh_url":"git@github.com:twitter/summingbird.git","clone_url":"https://github.com/twitter/summingbird.git","svn_url":"https://github.com/twitter/summingbird","homepage":"https://twitter.com/summingbird","size":8605,"stargazers_count":1776,"watchers_count":1776,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":229,"mirror_url":null,"open_issues_count":135,"forks":229,"open_issues":135,"watchers":1776,"default_branch":"develop"}},"base":{"label":"twitter:develop","ref":"develop","sha":"fc3851ee8e008f1f8059b70ebe6b7d448f10ee57","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":5957708,"name":"summingbird","full_name":"twitter/summingbird","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/summingbird","description":"Streaming MapReduce with Scalding and Storm","fork":false,"url":"https://api.github.com/repos/twitter/summingbird","forks_url":"https://api.github.com/repos/twitter/summingbird/forks","keys_url":"https://api.github.com/repos/twitter/summingbird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/summingbird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/summingbird/teams","hooks_url":"https://api.github.com/repos/twitter/summingbird/hooks","issue_events_url":"https://api.github.com/repos/twitter/summingbird/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/summingbird/events","assignees_url":"https://api.github.com/repos/twitter/summingbird/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/summingbird/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/summingbird/tags","blobs_url":"https://api.github.com/repos/twitter/summingbird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/summingbird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/summingbird/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/summingbird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/summingbird/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/summingbird/languages","stargazers_url":"https://api.github.com/repos/twitter/summingbird/stargazers","contributors_url":"https://api.github.com/repos/twitter/summingbird/contributors","subscribers_url":"https://api.github.com/repos/twitter/summingbird/subscribers","subscription_url":"https://api.github.com/repos/twitter/summingbird/subscription","commits_url":"https://api.github.com/repos/twitter/summingbird/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/summingbird/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/summingbird/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/summingbird/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/summingbird/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/summingbird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/summingbird/merges","archive_url":"https://api.github.com/repos/twitter/summingbird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/summingbird/downloads","issues_url":"https://api.github.com/repos/twitter/summingbird/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/summingbird/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/summingbird/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/summingbird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/summingbird/labels{/name}","releases_url":"https://api.github.com/repos/twitter/summingbird/releases{/id}","deployments_url":"https://api.github.com/repos/twitter/summingbird/deployments","created_at":"2012-09-25T22:38:35Z","updated_at":"2016-09-06T11:14:44Z","pushed_at":"2016-09-08T00:58:19Z","git_url":"git://github.com/twitter/summingbird.git","ssh_url":"git@github.com:twitter/summingbird.git","clone_url":"https://github.com/twitter/summingbird.git","svn_url":"https://github.com/twitter/summingbird","homepage":"https://twitter.com/summingbird","size":8605,"stargazers_count":1776,"watchers_count":1776,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":229,"mirror_url":null,"open_issues_count":135,"forks":229,"open_issues":135,"watchers":1776,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/685"},"html":{"href":"https://github.com/twitter/summingbird/pull/685"},"issue":{"href":"https://api.github.com/repos/twitter/summingbird/issues/685"},"comments":{"href":"https://api.github.com/repos/twitter/summingbird/issues/685/comments"},"review_comments":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/685/comments"},"review_comment":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/685/commits"},"statuses":{"href":"https://api.github.com/repos/twitter/summingbird/statuses/47eeac64100fb7ecf3f7547125e246d9a20afa33"}}}}
{"actor":{"display_login":"jnievelt"}}