{"action":"created","comment":{"url":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/comments/62117015","id":62117015,"diff_hunk":"@@ -1,3 +1,33 @@\n package macrobase.analysis.pipeline.operator;\n \n-public interface MBOperator<S, T> extends MBConsumer<S>, MBProducer<T> { }\n+import macrobase.analysis.pipeline.stream.MBStream;\n+\n+import java.util.List;\n+\n+public abstract class MBOperator<S, T> implements MBConsumer<S>, MBProducer<T> {\n+    public <Y> MBOperator<S, Y> then(MBOperator<T, Y> o2, int batchSize) {\n+        MBOperator<S, T> self = this;\n+        return new MBOperator<S, Y>() {\n+            @Override\n+            public MBStream<Y> getStream() throws Exception {\n+                return o2.getStream();\n+            }\n+\n+            @Override\n+            public void initialize() throws Exception { }","path":"src/main/java/macrobase/analysis/pipeline/operator/MBOperator.java","position":18,"original_position":18,"commit_id":"29d97d896fd08e9c5b738aa2a599d723607cca4d","original_commit_id":"29d97d896fd08e9c5b738aa2a599d723607cca4d","user":{"login":"edgan8","id":2577963,"avatar_url":"https://avatars.githubusercontent.com/u/2577963?v=3","gravatar_id":"","url":"https://api.github.com/users/edgan8","html_url":"https://github.com/edgan8","followers_url":"https://api.github.com/users/edgan8/followers","following_url":"https://api.github.com/users/edgan8/following{/other_user}","gists_url":"https://api.github.com/users/edgan8/gists{/gist_id}","starred_url":"https://api.github.com/users/edgan8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edgan8/subscriptions","organizations_url":"https://api.github.com/users/edgan8/orgs","repos_url":"https://api.github.com/users/edgan8/repos","events_url":"https://api.github.com/users/edgan8/events{/privacy}","received_events_url":"https://api.github.com/users/edgan8/received_events","type":"User","site_admin":false},"body":"If we want to actually use initialize in the future we probably want this chained operator to be like\r\n\r\n```\r\npublic void initialize() throws Exception{\r\n  self.initialize();\r\n  o2.initialize();\r\n}\r\n```\r\n\r\nand similarly with shutdown","created_at":"2016-05-04T21:20:42Z","updated_at":"2016-05-04T21:20:42Z","html_url":"https://github.com/stanford-futuredata/macrobase/pull/124#discussion_r62117015","pull_request_url":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/124","_links":{"self":{"href":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/comments/62117015"},"html":{"href":"https://github.com/stanford-futuredata/macrobase/pull/124#discussion_r62117015"},"pull_request":{"href":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/124"}}},"pull_request":{"url":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/124","id":68654561,"html_url":"https://github.com/stanford-futuredata/macrobase/pull/124","diff_url":"https://github.com/stanford-futuredata/macrobase/pull/124.diff","patch_url":"https://github.com/stanford-futuredata/macrobase/pull/124.patch","issue_url":"https://api.github.com/repos/stanford-futuredata/macrobase/issues/124","number":124,"state":"open","locked":false,"title":"Refactor of fluent operator to use Operator instead of OperatorChain.","user":{"login":"pbailis","id":970191,"avatar_url":"https://avatars.githubusercontent.com/u/970191?v=3","gravatar_id":"","url":"https://api.github.com/users/pbailis","html_url":"https://github.com/pbailis","followers_url":"https://api.github.com/users/pbailis/followers","following_url":"https://api.github.com/users/pbailis/following{/other_user}","gists_url":"https://api.github.com/users/pbailis/gists{/gist_id}","starred_url":"https://api.github.com/users/pbailis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbailis/subscriptions","organizations_url":"https://api.github.com/users/pbailis/orgs","repos_url":"https://api.github.com/users/pbailis/repos","events_url":"https://api.github.com/users/pbailis/events{/privacy}","received_events_url":"https://api.github.com/users/pbailis/received_events","type":"User","site_admin":false},"body":"With @edgan8 and @sahaana!","created_at":"2016-05-03T03:49:37Z","updated_at":"2016-05-04T21:20:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c20903234c91a3a18efcab381181648d9064c6b1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/124/commits","review_comments_url":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/124/comments","review_comment_url":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stanford-futuredata/macrobase/issues/124/comments","statuses_url":"https://api.github.com/repos/stanford-futuredata/macrobase/statuses/29d97d896fd08e9c5b738aa2a599d723607cca4d","head":{"label":"stanford-futuredata:fluent-operator","ref":"fluent-operator","sha":"29d97d896fd08e9c5b738aa2a599d723607cca4d","user":{"login":"stanford-futuredata","id":16332752,"avatar_url":"https://avatars.githubusercontent.com/u/16332752?v=3","gravatar_id":"","url":"https://api.github.com/users/stanford-futuredata","html_url":"https://github.com/stanford-futuredata","followers_url":"https://api.github.com/users/stanford-futuredata/followers","following_url":"https://api.github.com/users/stanford-futuredata/following{/other_user}","gists_url":"https://api.github.com/users/stanford-futuredata/gists{/gist_id}","starred_url":"https://api.github.com/users/stanford-futuredata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanford-futuredata/subscriptions","organizations_url":"https://api.github.com/users/stanford-futuredata/orgs","repos_url":"https://api.github.com/users/stanford-futuredata/repos","events_url":"https://api.github.com/users/stanford-futuredata/events{/privacy}","received_events_url":"https://api.github.com/users/stanford-futuredata/received_events","type":"Organization","site_admin":false},"repo":{"id":48199522,"name":"macrobase","full_name":"stanford-futuredata/macrobase","owner":{"login":"stanford-futuredata","id":16332752,"avatar_url":"https://avatars.githubusercontent.com/u/16332752?v=3","gravatar_id":"","url":"https://api.github.com/users/stanford-futuredata","html_url":"https://github.com/stanford-futuredata","followers_url":"https://api.github.com/users/stanford-futuredata/followers","following_url":"https://api.github.com/users/stanford-futuredata/following{/other_user}","gists_url":"https://api.github.com/users/stanford-futuredata/gists{/gist_id}","starred_url":"https://api.github.com/users/stanford-futuredata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanford-futuredata/subscriptions","organizations_url":"https://api.github.com/users/stanford-futuredata/orgs","repos_url":"https://api.github.com/users/stanford-futuredata/repos","events_url":"https://api.github.com/users/stanford-futuredata/events{/privacy}","received_events_url":"https://api.github.com/users/stanford-futuredata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stanford-futuredata/macrobase","description":"http://macrobase.io/","fork":false,"url":"https://api.github.com/repos/stanford-futuredata/macrobase","forks_url":"https://api.github.com/repos/stanford-futuredata/macrobase/forks","keys_url":"https://api.github.com/repos/stanford-futuredata/macrobase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stanford-futuredata/macrobase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stanford-futuredata/macrobase/teams","hooks_url":"https://api.github.com/repos/stanford-futuredata/macrobase/hooks","issue_events_url":"https://api.github.com/repos/stanford-futuredata/macrobase/issues/events{/number}","events_url":"https://api.github.com/repos/stanford-futuredata/macrobase/events","assignees_url":"https://api.github.com/repos/stanford-futuredata/macrobase/assignees{/user}","branches_url":"https://api.github.com/repos/stanford-futuredata/macrobase/branches{/branch}","tags_url":"https://api.github.com/repos/stanford-futuredata/macrobase/tags","blobs_url":"https://api.github.com/repos/stanford-futuredata/macrobase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stanford-futuredata/macrobase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stanford-futuredata/macrobase/git/refs{/sha}","trees_url":"https://api.github.com/repos/stanford-futuredata/macrobase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stanford-futuredata/macrobase/statuses/{sha}","languages_url":"https://api.github.com/repos/stanford-futuredata/macrobase/languages","stargazers_url":"https://api.github.com/repos/stanford-futuredata/macrobase/stargazers","contributors_url":"https://api.github.com/repos/stanford-futuredata/macrobase/contributors","subscribers_url":"https://api.github.com/repos/stanford-futuredata/macrobase/subscribers","subscription_url":"https://api.github.com/repos/stanford-futuredata/macrobase/subscription","commits_url":"https://api.github.com/repos/stanford-futuredata/macrobase/commits{/sha}","git_commits_url":"https://api.github.com/repos/stanford-futuredata/macrobase/git/commits{/sha}","comments_url":"https://api.github.com/repos/stanford-futuredata/macrobase/comments{/number}","issue_comment_url":"https://api.github.com/repos/stanford-futuredata/macrobase/issues/comments{/number}","contents_url":"https://api.github.com/repos/stanford-futuredata/macrobase/contents/{+path}","compare_url":"https://api.github.com/repos/stanford-futuredata/macrobase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stanford-futuredata/macrobase/merges","archive_url":"https://api.github.com/repos/stanford-futuredata/macrobase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stanford-futuredata/macrobase/downloads","issues_url":"https://api.github.com/repos/stanford-futuredata/macrobase/issues{/number}","pulls_url":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls{/number}","milestones_url":"https://api.github.com/repos/stanford-futuredata/macrobase/milestones{/number}","notifications_url":"https://api.github.com/repos/stanford-futuredata/macrobase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stanford-futuredata/macrobase/labels{/name}","releases_url":"https://api.github.com/repos/stanford-futuredata/macrobase/releases{/id}","deployments_url":"https://api.github.com/repos/stanford-futuredata/macrobase/deployments","created_at":"2015-12-17T21:36:20Z","updated_at":"2016-05-02T09:44:51Z","pushed_at":"2016-05-04T21:06:07Z","git_url":"git://github.com/stanford-futuredata/macrobase.git","ssh_url":"git@github.com:stanford-futuredata/macrobase.git","clone_url":"https://github.com/stanford-futuredata/macrobase.git","svn_url":"https://github.com/stanford-futuredata/macrobase","homepage":null,"size":10061,"stargazers_count":74,"watchers_count":74,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":7,"forks":13,"open_issues":7,"watchers":74,"default_branch":"master"}},"base":{"label":"stanford-futuredata:master","ref":"master","sha":"94f8658ebcd6175bd7d4b9e4902bbdaccf9804d4","user":{"login":"stanford-futuredata","id":16332752,"avatar_url":"https://avatars.githubusercontent.com/u/16332752?v=3","gravatar_id":"","url":"https://api.github.com/users/stanford-futuredata","html_url":"https://github.com/stanford-futuredata","followers_url":"https://api.github.com/users/stanford-futuredata/followers","following_url":"https://api.github.com/users/stanford-futuredata/following{/other_user}","gists_url":"https://api.github.com/users/stanford-futuredata/gists{/gist_id}","starred_url":"https://api.github.com/users/stanford-futuredata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanford-futuredata/subscriptions","organizations_url":"https://api.github.com/users/stanford-futuredata/orgs","repos_url":"https://api.github.com/users/stanford-futuredata/repos","events_url":"https://api.github.com/users/stanford-futuredata/events{/privacy}","received_events_url":"https://api.github.com/users/stanford-futuredata/received_events","type":"Organization","site_admin":false},"repo":{"id":48199522,"name":"macrobase","full_name":"stanford-futuredata/macrobase","owner":{"login":"stanford-futuredata","id":16332752,"avatar_url":"https://avatars.githubusercontent.com/u/16332752?v=3","gravatar_id":"","url":"https://api.github.com/users/stanford-futuredata","html_url":"https://github.com/stanford-futuredata","followers_url":"https://api.github.com/users/stanford-futuredata/followers","following_url":"https://api.github.com/users/stanford-futuredata/following{/other_user}","gists_url":"https://api.github.com/users/stanford-futuredata/gists{/gist_id}","starred_url":"https://api.github.com/users/stanford-futuredata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanford-futuredata/subscriptions","organizations_url":"https://api.github.com/users/stanford-futuredata/orgs","repos_url":"https://api.github.com/users/stanford-futuredata/repos","events_url":"https://api.github.com/users/stanford-futuredata/events{/privacy}","received_events_url":"https://api.github.com/users/stanford-futuredata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stanford-futuredata/macrobase","description":"http://macrobase.io/","fork":false,"url":"https://api.github.com/repos/stanford-futuredata/macrobase","forks_url":"https://api.github.com/repos/stanford-futuredata/macrobase/forks","keys_url":"https://api.github.com/repos/stanford-futuredata/macrobase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stanford-futuredata/macrobase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stanford-futuredata/macrobase/teams","hooks_url":"https://api.github.com/repos/stanford-futuredata/macrobase/hooks","issue_events_url":"https://api.github.com/repos/stanford-futuredata/macrobase/issues/events{/number}","events_url":"https://api.github.com/repos/stanford-futuredata/macrobase/events","assignees_url":"https://api.github.com/repos/stanford-futuredata/macrobase/assignees{/user}","branches_url":"https://api.github.com/repos/stanford-futuredata/macrobase/branches{/branch}","tags_url":"https://api.github.com/repos/stanford-futuredata/macrobase/tags","blobs_url":"https://api.github.com/repos/stanford-futuredata/macrobase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stanford-futuredata/macrobase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stanford-futuredata/macrobase/git/refs{/sha}","trees_url":"https://api.github.com/repos/stanford-futuredata/macrobase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stanford-futuredata/macrobase/statuses/{sha}","languages_url":"https://api.github.com/repos/stanford-futuredata/macrobase/languages","stargazers_url":"https://api.github.com/repos/stanford-futuredata/macrobase/stargazers","contributors_url":"https://api.github.com/repos/stanford-futuredata/macrobase/contributors","subscribers_url":"https://api.github.com/repos/stanford-futuredata/macrobase/subscribers","subscription_url":"https://api.github.com/repos/stanford-futuredata/macrobase/subscription","commits_url":"https://api.github.com/repos/stanford-futuredata/macrobase/commits{/sha}","git_commits_url":"https://api.github.com/repos/stanford-futuredata/macrobase/git/commits{/sha}","comments_url":"https://api.github.com/repos/stanford-futuredata/macrobase/comments{/number}","issue_comment_url":"https://api.github.com/repos/stanford-futuredata/macrobase/issues/comments{/number}","contents_url":"https://api.github.com/repos/stanford-futuredata/macrobase/contents/{+path}","compare_url":"https://api.github.com/repos/stanford-futuredata/macrobase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stanford-futuredata/macrobase/merges","archive_url":"https://api.github.com/repos/stanford-futuredata/macrobase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stanford-futuredata/macrobase/downloads","issues_url":"https://api.github.com/repos/stanford-futuredata/macrobase/issues{/number}","pulls_url":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls{/number}","milestones_url":"https://api.github.com/repos/stanford-futuredata/macrobase/milestones{/number}","notifications_url":"https://api.github.com/repos/stanford-futuredata/macrobase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stanford-futuredata/macrobase/labels{/name}","releases_url":"https://api.github.com/repos/stanford-futuredata/macrobase/releases{/id}","deployments_url":"https://api.github.com/repos/stanford-futuredata/macrobase/deployments","created_at":"2015-12-17T21:36:20Z","updated_at":"2016-05-02T09:44:51Z","pushed_at":"2016-05-04T21:06:07Z","git_url":"git://github.com/stanford-futuredata/macrobase.git","ssh_url":"git@github.com:stanford-futuredata/macrobase.git","clone_url":"https://github.com/stanford-futuredata/macrobase.git","svn_url":"https://github.com/stanford-futuredata/macrobase","homepage":null,"size":10061,"stargazers_count":74,"watchers_count":74,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":7,"forks":13,"open_issues":7,"watchers":74,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/124"},"html":{"href":"https://github.com/stanford-futuredata/macrobase/pull/124"},"issue":{"href":"https://api.github.com/repos/stanford-futuredata/macrobase/issues/124"},"comments":{"href":"https://api.github.com/repos/stanford-futuredata/macrobase/issues/124/comments"},"review_comments":{"href":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/124/comments"},"review_comment":{"href":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stanford-futuredata/macrobase/pulls/124/commits"},"statuses":{"href":"https://api.github.com/repos/stanford-futuredata/macrobase/statuses/29d97d896fd08e9c5b738aa2a599d723607cca4d"}}}}