{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/comments/43075967","id":43075967,"diff_hunk":"@@ -74,39 +72,38 @@ public final void after() throws Exception {\n \n   @Before\n   public final void before() throws Exception {\n-    TachyonConf tachyonConf = WorkerContext.getConf();\n-    tachyonConf.set(Constants.USER_FILE_BUFFER_BYTES, String.valueOf(BUFFER_BYTES));\n-    // Only the Netty data server supports remote writes.\n-    tachyonConf.set(Constants.WORKER_DATA_SERVER, IntegrationTestConstants.NETTY_DATA_SERVER);\n     sLocalTachyonCluster.start();\n     mTfs = sLocalTachyonCluster.getClient();\n-    mMasterTachyonConf = sLocalTachyonCluster.getMasterTachyonConf();\n+  }\n+\n+  @BeforeClass\n+  public static void beforeClass() throws IOException {\n+    sLocalTachyonCluster =\n+        new LocalTachyonCluster(WORKER_CAPACITY_BYTES, QUOTA_UNIT_BYTES, BLOCK_SIZE_BYTES);\n+    sTestConf = sLocalTachyonCluster.getTestConf();\n+    sTestConf.set(Constants.USER_FILE_BUFFER_BYTES, String.valueOf(BUFFER_BYTES));\n+    // Only the Netty data server supports remote writes.\n+    sTestConf.set(Constants.WORKER_DATA_SERVER, IntegrationTestConstants.NETTY_DATA_SERVER);\n     sWriteBoth =\n-        new OutStreamOptions.Builder(mMasterTachyonConf)\n+        new OutStreamOptions.Builder(sTestConf)","path":"integration-tests/src/test/java/tachyon/client/FileOutStreamIntegrationTest.java","position":42,"original_position":42,"commit_id":"719f4a8ccadc8760764c19f6b2c0e115f58135d3","original_commit_id":"719f4a8ccadc8760764c19f6b2c0e115f58135d3","user":{"login":"calvinjia","id":2223813,"avatar_url":"https://avatars.githubusercontent.com/u/2223813?v=3","gravatar_id":"","url":"https://api.github.com/users/calvinjia","html_url":"https://github.com/calvinjia","followers_url":"https://api.github.com/users/calvinjia/followers","following_url":"https://api.github.com/users/calvinjia/following{/other_user}","gists_url":"https://api.github.com/users/calvinjia/gists{/gist_id}","starred_url":"https://api.github.com/users/calvinjia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvinjia/subscriptions","organizations_url":"https://api.github.com/users/calvinjia/orgs","repos_url":"https://api.github.com/users/calvinjia/repos","events_url":"https://api.github.com/users/calvinjia/events{/privacy}","received_events_url":"https://api.github.com/users/calvinjia/received_events","type":"User","site_admin":false},"body":"Hmm I think passing in conf to the builder is a mistake if we are assuming the conf is the same as `ClientContext.getConf`, but this is definitely not in the scope of this PR.","created_at":"2015-10-27T01:32:45Z","updated_at":"2015-10-27T01:32:45Z","html_url":"https://github.com/amplab/tachyon/pull/1713#discussion_r43075967","pull_request_url":"https://api.github.com/repos/amplab/tachyon/pulls/1713","_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments/43075967"},"html":{"href":"https://github.com/amplab/tachyon/pull/1713#discussion_r43075967"},"pull_request":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1713"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/1713","id":46862172,"html_url":"https://github.com/amplab/tachyon/pull/1713","diff_url":"https://github.com/amplab/tachyon/pull/1713.diff","patch_url":"https://github.com/amplab/tachyon/pull/1713.patch","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/1713","number":1713,"state":"open","locked":false,"title":"[TACHYON-1092] Cleanup LocalTachyonCluster","user":{"login":"apc999","id":1413748,"avatar_url":"https://avatars.githubusercontent.com/u/1413748?v=3","gravatar_id":"","url":"https://api.github.com/users/apc999","html_url":"https://github.com/apc999","followers_url":"https://api.github.com/users/apc999/followers","following_url":"https://api.github.com/users/apc999/following{/other_user}","gists_url":"https://api.github.com/users/apc999/gists{/gist_id}","starred_url":"https://api.github.com/users/apc999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apc999/subscriptions","organizations_url":"https://api.github.com/users/apc999/orgs","repos_url":"https://api.github.com/users/apc999/repos","events_url":"https://api.github.com/users/apc999/events{/privacy}","received_events_url":"https://api.github.com/users/apc999/received_events","type":"User","site_admin":false},"body":"This PR aims to clean up code in `LocalTachyonCluster`, especially to provide a way for integration tests to modify the conf setup:\r\n\r\nAfter this PR, integration tests use the following way to setup special test conf:\r\n\r\n```java\r\nlocalTachyonCluster =\r\n    new LocalTachyonCluster(WORKER_CAPACITY_BYTES, QUOTA_UNIT_BYTES, BLOCK_SIZE_BYTES);\r\nTachyonConf testConf = localTachyonCluster.getTestConf();\r\ntestConf.set(Constants.USER_FILE_BUFFER_BYTES, String.valueOf(BUFFER_BYTES));\r\ntestConf.set(Constants.WORKER_DATA_SERVER, MY_NETTY_DATA_SERVER);\r\n// ... do more setting\r\nlocalTachyonCluster.start()\r\n```\r\nWhen `localTachyonCluster` launching the worker and master, it uses the testConf as the basic to build configuration for both `WorkerContext`, `MasterContext`\r\n","created_at":"2015-10-06T04:44:19Z","updated_at":"2015-10-27T01:32:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"792794d9ef7e35effd36d516f4298531e1d0324f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/tachyon/pulls/1713/commits","review_comments_url":"https://api.github.com/repos/amplab/tachyon/pulls/1713/comments","review_comment_url":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/1713/comments","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/719f4a8ccadc8760764c19f6b2c0e115f58135d3","head":{"label":"apc999:conf","ref":"conf","sha":"719f4a8ccadc8760764c19f6b2c0e115f58135d3","user":{"login":"apc999","id":1413748,"avatar_url":"https://avatars.githubusercontent.com/u/1413748?v=3","gravatar_id":"","url":"https://api.github.com/users/apc999","html_url":"https://github.com/apc999","followers_url":"https://api.github.com/users/apc999/followers","following_url":"https://api.github.com/users/apc999/following{/other_user}","gists_url":"https://api.github.com/users/apc999/gists{/gist_id}","starred_url":"https://api.github.com/users/apc999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apc999/subscriptions","organizations_url":"https://api.github.com/users/apc999/orgs","repos_url":"https://api.github.com/users/apc999/repos","events_url":"https://api.github.com/users/apc999/events{/privacy}","received_events_url":"https://api.github.com/users/apc999/received_events","type":"User","site_admin":false},"repo":{"id":32042306,"name":"tachyon","full_name":"apc999/tachyon","owner":{"login":"apc999","id":1413748,"avatar_url":"https://avatars.githubusercontent.com/u/1413748?v=3","gravatar_id":"","url":"https://api.github.com/users/apc999","html_url":"https://github.com/apc999","followers_url":"https://api.github.com/users/apc999/followers","following_url":"https://api.github.com/users/apc999/following{/other_user}","gists_url":"https://api.github.com/users/apc999/gists{/gist_id}","starred_url":"https://api.github.com/users/apc999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apc999/subscriptions","organizations_url":"https://api.github.com/users/apc999/orgs","repos_url":"https://api.github.com/users/apc999/repos","events_url":"https://api.github.com/users/apc999/events{/privacy}","received_events_url":"https://api.github.com/users/apc999/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/apc999/tachyon","description":" A Reliable Memory Centric Distributed Storage System","fork":true,"url":"https://api.github.com/repos/apc999/tachyon","forks_url":"https://api.github.com/repos/apc999/tachyon/forks","keys_url":"https://api.github.com/repos/apc999/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apc999/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apc999/tachyon/teams","hooks_url":"https://api.github.com/repos/apc999/tachyon/hooks","issue_events_url":"https://api.github.com/repos/apc999/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/apc999/tachyon/events","assignees_url":"https://api.github.com/repos/apc999/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/apc999/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/apc999/tachyon/tags","blobs_url":"https://api.github.com/repos/apc999/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apc999/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apc999/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/apc999/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apc999/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/apc999/tachyon/languages","stargazers_url":"https://api.github.com/repos/apc999/tachyon/stargazers","contributors_url":"https://api.github.com/repos/apc999/tachyon/contributors","subscribers_url":"https://api.github.com/repos/apc999/tachyon/subscribers","subscription_url":"https://api.github.com/repos/apc999/tachyon/subscription","commits_url":"https://api.github.com/repos/apc999/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/apc999/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/apc999/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/apc999/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/apc999/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/apc999/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apc999/tachyon/merges","archive_url":"https://api.github.com/repos/apc999/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apc999/tachyon/downloads","issues_url":"https://api.github.com/repos/apc999/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/apc999/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/apc999/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/apc999/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apc999/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/apc999/tachyon/releases{/id}","created_at":"2015-03-11T21:31:13Z","updated_at":"2015-05-12T21:15:01Z","pushed_at":"2015-10-27T00:59:40Z","git_url":"git://github.com/apc999/tachyon.git","ssh_url":"git@github.com:apc999/tachyon.git","clone_url":"https://github.com/apc999/tachyon.git","svn_url":"https://github.com/apc999/tachyon","homepage":"http://tachyon-project.org","size":27990,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"amplab:master","ref":"master","sha":"85e3e44ff5caf401d9aad101a0d9f7fac8df79ef","user":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"repo":{"id":7276954,"name":"tachyon","full_name":"amplab/tachyon","owner":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplab/tachyon","description":"Memory Centric Reliable Distributed Storage","fork":false,"url":"https://api.github.com/repos/amplab/tachyon","forks_url":"https://api.github.com/repos/amplab/tachyon/forks","keys_url":"https://api.github.com/repos/amplab/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplab/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplab/tachyon/teams","hooks_url":"https://api.github.com/repos/amplab/tachyon/hooks","issue_events_url":"https://api.github.com/repos/amplab/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/amplab/tachyon/events","assignees_url":"https://api.github.com/repos/amplab/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/amplab/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/amplab/tachyon/tags","blobs_url":"https://api.github.com/repos/amplab/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplab/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplab/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplab/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/amplab/tachyon/languages","stargazers_url":"https://api.github.com/repos/amplab/tachyon/stargazers","contributors_url":"https://api.github.com/repos/amplab/tachyon/contributors","subscribers_url":"https://api.github.com/repos/amplab/tachyon/subscribers","subscription_url":"https://api.github.com/repos/amplab/tachyon/subscription","commits_url":"https://api.github.com/repos/amplab/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplab/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplab/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplab/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplab/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/amplab/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplab/tachyon/merges","archive_url":"https://api.github.com/repos/amplab/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplab/tachyon/downloads","issues_url":"https://api.github.com/repos/amplab/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/amplab/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/amplab/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/amplab/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplab/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/amplab/tachyon/releases{/id}","created_at":"2012-12-21T17:43:46Z","updated_at":"2015-10-26T11:24:35Z","pushed_at":"2015-10-27T01:19:55Z","git_url":"git://github.com/amplab/tachyon.git","ssh_url":"git@github.com:amplab/tachyon.git","clone_url":"https://github.com/amplab/tachyon.git","svn_url":"https://github.com/amplab/tachyon","homepage":"http://tachyon-project.org","size":59299,"stargazers_count":1666,"watchers_count":1666,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":662,"mirror_url":null,"open_issues_count":32,"forks":662,"open_issues":32,"watchers":1666,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1713"},"html":{"href":"https://github.com/amplab/tachyon/pull/1713"},"issue":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1713"},"comments":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1713/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1713/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1713/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/tachyon/statuses/719f4a8ccadc8760764c19f6b2c0e115f58135d3"}}}}