{"action":"created","comment":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/comments/23204884","id":23204884,"diff_hunk":"@@ -0,0 +1,218 @@\n+/*\n+ * Copyright © 2015 Cask Data, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n+ * use this file except in compliance with the License. You may obtain a copy of\n+ * 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, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+\n+package co.cask.cdap.data.stream;\n+\n+import co.cask.cdap.common.conf.CConfiguration;\n+import co.cask.cdap.common.conf.Constants;\n+import co.cask.cdap.common.guice.ConfigModule;\n+import co.cask.cdap.common.guice.DiscoveryRuntimeModule;\n+import co.cask.cdap.common.guice.LocationRuntimeModule;\n+import co.cask.cdap.common.metrics.MetricsCollectionService;\n+import co.cask.cdap.common.metrics.NoOpMetricsCollectionService;\n+import co.cask.cdap.data.runtime.DataFabricModules;\n+import co.cask.cdap.data.runtime.DataSetServiceModules;\n+import co.cask.cdap.data.runtime.DataSetsModules;\n+import co.cask.cdap.data.runtime.LocationStreamFileWriterFactory;\n+import co.cask.cdap.data.stream.service.StreamHttpService;\n+import co.cask.cdap.data.stream.service.StreamServiceRuntimeModule;\n+import co.cask.cdap.data.stream.service.heartbeat.HeartbeatPublisher;\n+import co.cask.cdap.data.stream.service.heartbeat.StreamWriterHeartbeat;\n+import co.cask.cdap.data2.datafabric.dataset.service.DatasetService;\n+import co.cask.cdap.data2.datafabric.dataset.service.executor.DatasetOpExecutor;\n+import co.cask.cdap.data2.transaction.stream.StreamAdmin;\n+import co.cask.cdap.data2.transaction.stream.StreamConsumerFactory;\n+import co.cask.cdap.data2.transaction.stream.StreamConsumerStateStoreFactory;\n+import co.cask.cdap.data2.transaction.stream.leveldb.LevelDBStreamConsumerStateStoreFactory;\n+import co.cask.cdap.data2.transaction.stream.leveldb.LevelDBStreamFileAdmin;\n+import co.cask.cdap.data2.transaction.stream.leveldb.LevelDBStreamFileConsumerFactory;\n+import co.cask.cdap.explore.guice.ExploreClientModule;\n+import co.cask.cdap.gateway.auth.AuthModule;\n+import co.cask.tephra.TransactionManager;\n+import com.google.common.util.concurrent.AbstractIdleService;\n+import com.google.common.util.concurrent.Futures;\n+import com.google.common.util.concurrent.ListenableFuture;\n+import com.google.inject.AbstractModule;\n+import com.google.inject.Guice;\n+import com.google.inject.Injector;\n+import com.google.inject.Scopes;\n+import com.google.inject.Singleton;\n+import com.google.inject.util.Modules;\n+import org.apache.hadoop.conf.Configuration;\n+import org.jboss.netty.handler.codec.http.HttpMethod;\n+import org.jboss.netty.handler.codec.http.HttpResponseStatus;\n+import org.junit.AfterClass;\n+import org.junit.Assert;\n+import org.junit.BeforeClass;\n+import org.junit.Test;\n+import org.junit.rules.TemporaryFolder;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import java.io.IOException;\n+import java.net.HttpURLConnection;\n+import java.net.URL;\n+import java.util.concurrent.TimeUnit;\n+\n+/**\n+ *","path":"cdap-data-fabric-tests/src/test/java/co/cask/cdap/data/stream/StreamFileSizeManagerTest.java","position":71,"original_position":71,"commit_id":"53955779c962b203eb2d6e41fcdb2c3c14499698","original_commit_id":"f8f7933a0d7f8692128016665cb03761fd38884d","user":{"login":"jguery","id":3600810,"avatar_url":"https://avatars.githubusercontent.com/u/3600810?v=3","gravatar_id":"","url":"https://api.github.com/users/jguery","html_url":"https://github.com/jguery","followers_url":"https://api.github.com/users/jguery/followers","following_url":"https://api.github.com/users/jguery/following{/other_user}","gists_url":"https://api.github.com/users/jguery/gists{/gist_id}","starred_url":"https://api.github.com/users/jguery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jguery/subscriptions","organizations_url":"https://api.github.com/users/jguery/orgs","repos_url":"https://api.github.com/users/jguery/repos","events_url":"https://api.github.com/users/jguery/events{/privacy}","received_events_url":"https://api.github.com/users/jguery/received_events","type":"User","site_admin":false},"body":"It's a test?","created_at":"2015-01-20T06:34:45Z","updated_at":"2015-01-20T06:34:45Z","html_url":"https://github.com/caskdata/cdap/pull/1034#discussion_r23204884","pull_request_url":"https://api.github.com/repos/caskdata/cdap/pulls/1034","_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/comments/23204884"},"html":{"href":"https://github.com/caskdata/cdap/pull/1034#discussion_r23204884"},"pull_request":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/1034"}}},"pull_request":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/1034","id":27654105,"html_url":"https://github.com/caskdata/cdap/pull/1034","diff_url":"https://github.com/caskdata/cdap/pull/1034.diff","patch_url":"https://github.com/caskdata/cdap/pull/1034.patch","issue_url":"https://api.github.com/repos/caskdata/cdap/issues/1034","number":1034,"state":"open","locked":false,"title":"Stream Writer Size Manager for In-memory Streams","user":{"login":"jguery","id":3600810,"avatar_url":"https://avatars.githubusercontent.com/u/3600810?v=3","gravatar_id":"","url":"https://api.github.com/users/jguery","html_url":"https://github.com/jguery","followers_url":"https://api.github.com/users/jguery/followers","following_url":"https://api.github.com/users/jguery/following{/other_user}","gists_url":"https://api.github.com/users/jguery/gists{/gist_id}","starred_url":"https://api.github.com/users/jguery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jguery/subscriptions","organizations_url":"https://api.github.com/users/jguery/orgs","repos_url":"https://api.github.com/users/jguery/repos","events_url":"https://api.github.com/users/jguery/events{/privacy}","received_events_url":"https://api.github.com/users/jguery/received_events","type":"User","site_admin":false},"body":"This PR contains the changes from https://github.com/caskdata/cdap/pull/1028. \r\nImplementation of the ``StreamWriterSizeManager`` for streams that reside in memory.\r\nBuild: https://builds.cask.co/browse/CDAP-DUT561","created_at":"2015-01-20T05:00:40Z","updated_at":"2015-01-20T06:34:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5071ddc5f8bbdfd935a166e9b38c1365be86c4f2","assignee":{"login":"poornachandra","id":3181212,"avatar_url":"https://avatars.githubusercontent.com/u/3181212?v=3","gravatar_id":"","url":"https://api.github.com/users/poornachandra","html_url":"https://github.com/poornachandra","followers_url":"https://api.github.com/users/poornachandra/followers","following_url":"https://api.github.com/users/poornachandra/following{/other_user}","gists_url":"https://api.github.com/users/poornachandra/gists{/gist_id}","starred_url":"https://api.github.com/users/poornachandra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poornachandra/subscriptions","organizations_url":"https://api.github.com/users/poornachandra/orgs","repos_url":"https://api.github.com/users/poornachandra/repos","events_url":"https://api.github.com/users/poornachandra/events{/privacy}","received_events_url":"https://api.github.com/users/poornachandra/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/caskdata/cdap/pulls/1034/commits","review_comments_url":"https://api.github.com/repos/caskdata/cdap/pulls/1034/comments","review_comment_url":"https://api.github.com/repos/caskdata/cdap/pulls/comments/{number}","comments_url":"https://api.github.com/repos/caskdata/cdap/issues/1034/comments","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/53955779c962b203eb2d6e41fcdb2c3c14499698","head":{"label":"caskdata:feature/abstract-stream-writer-size-manager","ref":"feature/abstract-stream-writer-size-manager","sha":"53955779c962b203eb2d6e41fcdb2c3c14499698","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22542759,"name":"cdap","full_name":"caskdata/cdap","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap","description":"Cask Data Application Platform (CDAP)","fork":false,"url":"https://api.github.com/repos/caskdata/cdap","forks_url":"https://api.github.com/repos/caskdata/cdap/forks","keys_url":"https://api.github.com/repos/caskdata/cdap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap/events","assignees_url":"https://api.github.com/repos/caskdata/cdap/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap/issues/comments/{number}","contents_url":"https://api.github.com/repos/caskdata/cdap/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap/merges","archive_url":"https://api.github.com/repos/caskdata/cdap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap/releases{/id}","created_at":"2014-08-02T09:00:10Z","updated_at":"2015-01-20T05:36:53Z","pushed_at":"2015-01-20T06:34:33Z","git_url":"git://github.com/caskdata/cdap.git","ssh_url":"git@github.com:caskdata/cdap.git","clone_url":"https://github.com/caskdata/cdap.git","svn_url":"https://github.com/caskdata/cdap","homepage":"http://cdap.io","size":701222,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":15,"forks":7,"open_issues":15,"watchers":23,"default_branch":"develop"}},"base":{"label":"caskdata:develop","ref":"develop","sha":"98abd6410ab63dbd289f58f9b17265a04e6465fd","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22542759,"name":"cdap","full_name":"caskdata/cdap","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap","description":"Cask Data Application Platform (CDAP)","fork":false,"url":"https://api.github.com/repos/caskdata/cdap","forks_url":"https://api.github.com/repos/caskdata/cdap/forks","keys_url":"https://api.github.com/repos/caskdata/cdap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap/events","assignees_url":"https://api.github.com/repos/caskdata/cdap/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap/issues/comments/{number}","contents_url":"https://api.github.com/repos/caskdata/cdap/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap/merges","archive_url":"https://api.github.com/repos/caskdata/cdap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap/releases{/id}","created_at":"2014-08-02T09:00:10Z","updated_at":"2015-01-20T05:36:53Z","pushed_at":"2015-01-20T06:34:33Z","git_url":"git://github.com/caskdata/cdap.git","ssh_url":"git@github.com:caskdata/cdap.git","clone_url":"https://github.com/caskdata/cdap.git","svn_url":"https://github.com/caskdata/cdap","homepage":"http://cdap.io","size":701222,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":15,"forks":7,"open_issues":15,"watchers":23,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/1034"},"html":{"href":"https://github.com/caskdata/cdap/pull/1034"},"issue":{"href":"https://api.github.com/repos/caskdata/cdap/issues/1034"},"comments":{"href":"https://api.github.com/repos/caskdata/cdap/issues/1034/comments"},"review_comments":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/1034/comments"},"review_comment":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/1034/commits"},"statuses":{"href":"https://api.github.com/repos/caskdata/cdap/statuses/53955779c962b203eb2d6e41fcdb2c3c14499698"}}}}