{"action":"created","comment":{"url":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments/92670999","pull_request_review_id":13191045,"id":92670999,"diff_hunk":"@@ -0,0 +1,85 @@\n+/*\n+ * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0\n+ * (the \"License\"). You may not use this work except in compliance with the License, which is\n+ * available at www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n+ * either express or implied, as more fully set forth in the License.\n+ *\n+ * See the NOTICE file distributed with this work for information regarding copyright ownership.\n+ */\n+\n+package alluxio.client.file.policy;\n+\n+import alluxio.CommonTestUtils;\n+import alluxio.Constants;\n+import alluxio.client.block.BlockWorkerInfo;\n+import alluxio.util.network.NetworkAddressUtils;\n+import alluxio.wire.WorkerNetAddress;\n+\n+import org.junit.Assert;\n+import org.junit.Test;\n+\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+/**\n+ * Tests {@link LocalFirstWithoutEvictionPolicy}.\n+ */\n+public class LocalFirstWithoutEvictionPolicyTest {\n+  private static final int PORT = 1;\n+\n+  /**\n+   * Tests that the local host is returned first.\n+   */\n+  @Test\n+  public void getLocalFirst() {\n+    String localhostName = NetworkAddressUtils.getLocalHostName();\n+    LocalFirstWithoutEvictionPolicy policy = new LocalFirstWithoutEvictionPolicy();\n+    List<BlockWorkerInfo> workerInfoList = new ArrayList<>();\n+    workerInfoList.add(new BlockWorkerInfo(new WorkerNetAddress().setHost(\"worker1\")\n+        .setRpcPort(PORT).setDataPort(PORT).setWebPort(PORT), Constants.GB, 0));","path":"core/client/src/test/java/alluxio/client/file/policy/LocalFirstWithoutEvictionPolicyTest.java","position":41,"original_position":41,"commit_id":"536e53074246ba82d64025ad659d9435377e21bd","original_commit_id":"536e53074246ba82d64025ad659d9435377e21bd","user":{"login":"aaudiber","id":3455177,"avatar_url":"https://avatars.githubusercontent.com/u/3455177?v=3","gravatar_id":"","url":"https://api.github.com/users/aaudiber","html_url":"https://github.com/aaudiber","followers_url":"https://api.github.com/users/aaudiber/followers","following_url":"https://api.github.com/users/aaudiber/following{/other_user}","gists_url":"https://api.github.com/users/aaudiber/gists{/gist_id}","starred_url":"https://api.github.com/users/aaudiber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaudiber/subscriptions","organizations_url":"https://api.github.com/users/aaudiber/orgs","repos_url":"https://api.github.com/users/aaudiber/repos","events_url":"https://api.github.com/users/aaudiber/events{/privacy}","received_events_url":"https://api.github.com/users/aaudiber/received_events","type":"User","site_admin":false},"body":"We don't need to set these ports, they will be zero by default which is fine for this test","created_at":"2016-12-15T18:34:48Z","updated_at":"2016-12-15T18:48:35Z","html_url":"https://github.com/Alluxio/alluxio/pull/4445#discussion_r92670999","pull_request_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4445","_links":{"self":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments/92670999"},"html":{"href":"https://github.com/Alluxio/alluxio/pull/4445#discussion_r92670999"},"pull_request":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4445"}}},"pull_request":{"url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4445","id":98105578,"html_url":"https://github.com/Alluxio/alluxio/pull/4445","diff_url":"https://github.com/Alluxio/alluxio/pull/4445.diff","patch_url":"https://github.com/Alluxio/alluxio/pull/4445.patch","issue_url":"https://api.github.com/repos/Alluxio/alluxio/issues/4445","number":4445,"state":"open","locked":false,"title":"[ALLUXIO-2226] Add a LocalFirstPolicy that without evict action","user":{"login":"gjhkael","id":10809317,"avatar_url":"https://avatars.githubusercontent.com/u/10809317?v=3","gravatar_id":"","url":"https://api.github.com/users/gjhkael","html_url":"https://github.com/gjhkael","followers_url":"https://api.github.com/users/gjhkael/followers","following_url":"https://api.github.com/users/gjhkael/following{/other_user}","gists_url":"https://api.github.com/users/gjhkael/gists{/gist_id}","starred_url":"https://api.github.com/users/gjhkael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjhkael/subscriptions","organizations_url":"https://api.github.com/users/gjhkael/orgs","repos_url":"https://api.github.com/users/gjhkael/repos","events_url":"https://api.github.com/users/gjhkael/events{/privacy}","received_events_url":"https://api.github.com/users/gjhkael/received_events","type":"User","site_admin":false},"body":"https://alluxio.atlassian.net/browse/ALLUXIO-2226","created_at":"2016-12-15T08:25:23Z","updated_at":"2016-12-15T18:50:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"811310383ae043b82b2de46b5863a66b75df26b1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4445/commits","review_comments_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4445/comments","review_comment_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Alluxio/alluxio/issues/4445/comments","statuses_url":"https://api.github.com/repos/Alluxio/alluxio/statuses/536e53074246ba82d64025ad659d9435377e21bd","head":{"label":"gjhkael:newLocalpolicy","ref":"newLocalpolicy","sha":"536e53074246ba82d64025ad659d9435377e21bd","user":{"login":"gjhkael","id":10809317,"avatar_url":"https://avatars.githubusercontent.com/u/10809317?v=3","gravatar_id":"","url":"https://api.github.com/users/gjhkael","html_url":"https://github.com/gjhkael","followers_url":"https://api.github.com/users/gjhkael/followers","following_url":"https://api.github.com/users/gjhkael/following{/other_user}","gists_url":"https://api.github.com/users/gjhkael/gists{/gist_id}","starred_url":"https://api.github.com/users/gjhkael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjhkael/subscriptions","organizations_url":"https://api.github.com/users/gjhkael/orgs","repos_url":"https://api.github.com/users/gjhkael/repos","events_url":"https://api.github.com/users/gjhkael/events{/privacy}","received_events_url":"https://api.github.com/users/gjhkael/received_events","type":"User","site_admin":false},"repo":{"id":73160896,"name":"alluxio","full_name":"gjhkael/alluxio","owner":{"login":"gjhkael","id":10809317,"avatar_url":"https://avatars.githubusercontent.com/u/10809317?v=3","gravatar_id":"","url":"https://api.github.com/users/gjhkael","html_url":"https://github.com/gjhkael","followers_url":"https://api.github.com/users/gjhkael/followers","following_url":"https://api.github.com/users/gjhkael/following{/other_user}","gists_url":"https://api.github.com/users/gjhkael/gists{/gist_id}","starred_url":"https://api.github.com/users/gjhkael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjhkael/subscriptions","organizations_url":"https://api.github.com/users/gjhkael/orgs","repos_url":"https://api.github.com/users/gjhkael/repos","events_url":"https://api.github.com/users/gjhkael/events{/privacy}","received_events_url":"https://api.github.com/users/gjhkael/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gjhkael/alluxio","description":"Alluxio, formerly Tachyon, Memory Speed Virtual Distributed Storage System","fork":true,"url":"https://api.github.com/repos/gjhkael/alluxio","forks_url":"https://api.github.com/repos/gjhkael/alluxio/forks","keys_url":"https://api.github.com/repos/gjhkael/alluxio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gjhkael/alluxio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gjhkael/alluxio/teams","hooks_url":"https://api.github.com/repos/gjhkael/alluxio/hooks","issue_events_url":"https://api.github.com/repos/gjhkael/alluxio/issues/events{/number}","events_url":"https://api.github.com/repos/gjhkael/alluxio/events","assignees_url":"https://api.github.com/repos/gjhkael/alluxio/assignees{/user}","branches_url":"https://api.github.com/repos/gjhkael/alluxio/branches{/branch}","tags_url":"https://api.github.com/repos/gjhkael/alluxio/tags","blobs_url":"https://api.github.com/repos/gjhkael/alluxio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gjhkael/alluxio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gjhkael/alluxio/git/refs{/sha}","trees_url":"https://api.github.com/repos/gjhkael/alluxio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gjhkael/alluxio/statuses/{sha}","languages_url":"https://api.github.com/repos/gjhkael/alluxio/languages","stargazers_url":"https://api.github.com/repos/gjhkael/alluxio/stargazers","contributors_url":"https://api.github.com/repos/gjhkael/alluxio/contributors","subscribers_url":"https://api.github.com/repos/gjhkael/alluxio/subscribers","subscription_url":"https://api.github.com/repos/gjhkael/alluxio/subscription","commits_url":"https://api.github.com/repos/gjhkael/alluxio/commits{/sha}","git_commits_url":"https://api.github.com/repos/gjhkael/alluxio/git/commits{/sha}","comments_url":"https://api.github.com/repos/gjhkael/alluxio/comments{/number}","issue_comment_url":"https://api.github.com/repos/gjhkael/alluxio/issues/comments{/number}","contents_url":"https://api.github.com/repos/gjhkael/alluxio/contents/{+path}","compare_url":"https://api.github.com/repos/gjhkael/alluxio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gjhkael/alluxio/merges","archive_url":"https://api.github.com/repos/gjhkael/alluxio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gjhkael/alluxio/downloads","issues_url":"https://api.github.com/repos/gjhkael/alluxio/issues{/number}","pulls_url":"https://api.github.com/repos/gjhkael/alluxio/pulls{/number}","milestones_url":"https://api.github.com/repos/gjhkael/alluxio/milestones{/number}","notifications_url":"https://api.github.com/repos/gjhkael/alluxio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gjhkael/alluxio/labels{/name}","releases_url":"https://api.github.com/repos/gjhkael/alluxio/releases{/id}","deployments_url":"https://api.github.com/repos/gjhkael/alluxio/deployments","created_at":"2016-11-08T07:33:26Z","updated_at":"2016-11-08T07:33:31Z","pushed_at":"2016-12-15T08:23:49Z","git_url":"git://github.com/gjhkael/alluxio.git","ssh_url":"git@github.com:gjhkael/alluxio.git","clone_url":"https://github.com/gjhkael/alluxio.git","svn_url":"https://github.com/gjhkael/alluxio","homepage":"http://www.alluxio.org/","size":63810,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Alluxio:master","ref":"master","sha":"a5d3f322331d615b8ad60690e5eff52f4d9f2b03","user":{"login":"Alluxio","id":16203694,"avatar_url":"https://avatars.githubusercontent.com/u/16203694?v=3","gravatar_id":"","url":"https://api.github.com/users/Alluxio","html_url":"https://github.com/Alluxio","followers_url":"https://api.github.com/users/Alluxio/followers","following_url":"https://api.github.com/users/Alluxio/following{/other_user}","gists_url":"https://api.github.com/users/Alluxio/gists{/gist_id}","starred_url":"https://api.github.com/users/Alluxio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alluxio/subscriptions","organizations_url":"https://api.github.com/users/Alluxio/orgs","repos_url":"https://api.github.com/users/Alluxio/repos","events_url":"https://api.github.com/users/Alluxio/events{/privacy}","received_events_url":"https://api.github.com/users/Alluxio/received_events","type":"Organization","site_admin":false},"repo":{"id":7276954,"name":"alluxio","full_name":"Alluxio/alluxio","owner":{"login":"Alluxio","id":16203694,"avatar_url":"https://avatars.githubusercontent.com/u/16203694?v=3","gravatar_id":"","url":"https://api.github.com/users/Alluxio","html_url":"https://github.com/Alluxio","followers_url":"https://api.github.com/users/Alluxio/followers","following_url":"https://api.github.com/users/Alluxio/following{/other_user}","gists_url":"https://api.github.com/users/Alluxio/gists{/gist_id}","starred_url":"https://api.github.com/users/Alluxio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alluxio/subscriptions","organizations_url":"https://api.github.com/users/Alluxio/orgs","repos_url":"https://api.github.com/users/Alluxio/repos","events_url":"https://api.github.com/users/Alluxio/events{/privacy}","received_events_url":"https://api.github.com/users/Alluxio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alluxio/alluxio","description":"Alluxio, formerly Tachyon, A Virtual Distributed Storage at Memory Speed","fork":false,"url":"https://api.github.com/repos/Alluxio/alluxio","forks_url":"https://api.github.com/repos/Alluxio/alluxio/forks","keys_url":"https://api.github.com/repos/Alluxio/alluxio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alluxio/alluxio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alluxio/alluxio/teams","hooks_url":"https://api.github.com/repos/Alluxio/alluxio/hooks","issue_events_url":"https://api.github.com/repos/Alluxio/alluxio/issues/events{/number}","events_url":"https://api.github.com/repos/Alluxio/alluxio/events","assignees_url":"https://api.github.com/repos/Alluxio/alluxio/assignees{/user}","branches_url":"https://api.github.com/repos/Alluxio/alluxio/branches{/branch}","tags_url":"https://api.github.com/repos/Alluxio/alluxio/tags","blobs_url":"https://api.github.com/repos/Alluxio/alluxio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alluxio/alluxio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alluxio/alluxio/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alluxio/alluxio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alluxio/alluxio/statuses/{sha}","languages_url":"https://api.github.com/repos/Alluxio/alluxio/languages","stargazers_url":"https://api.github.com/repos/Alluxio/alluxio/stargazers","contributors_url":"https://api.github.com/repos/Alluxio/alluxio/contributors","subscribers_url":"https://api.github.com/repos/Alluxio/alluxio/subscribers","subscription_url":"https://api.github.com/repos/Alluxio/alluxio/subscription","commits_url":"https://api.github.com/repos/Alluxio/alluxio/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alluxio/alluxio/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alluxio/alluxio/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alluxio/alluxio/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alluxio/alluxio/contents/{+path}","compare_url":"https://api.github.com/repos/Alluxio/alluxio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alluxio/alluxio/merges","archive_url":"https://api.github.com/repos/Alluxio/alluxio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alluxio/alluxio/downloads","issues_url":"https://api.github.com/repos/Alluxio/alluxio/issues{/number}","pulls_url":"https://api.github.com/repos/Alluxio/alluxio/pulls{/number}","milestones_url":"https://api.github.com/repos/Alluxio/alluxio/milestones{/number}","notifications_url":"https://api.github.com/repos/Alluxio/alluxio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alluxio/alluxio/labels{/name}","releases_url":"https://api.github.com/repos/Alluxio/alluxio/releases{/id}","deployments_url":"https://api.github.com/repos/Alluxio/alluxio/deployments","created_at":"2012-12-21T17:43:46Z","updated_at":"2016-12-14T08:51:13Z","pushed_at":"2016-12-15T18:44:38Z","git_url":"git://github.com/Alluxio/alluxio.git","ssh_url":"git@github.com:Alluxio/alluxio.git","clone_url":"https://github.com/Alluxio/alluxio.git","svn_url":"https://github.com/Alluxio/alluxio","homepage":"http://www.alluxio.org/","size":63899,"stargazers_count":2761,"watchers_count":2761,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1253,"mirror_url":null,"open_issues_count":28,"forks":1253,"open_issues":28,"watchers":2761,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4445"},"html":{"href":"https://github.com/Alluxio/alluxio/pull/4445"},"issue":{"href":"https://api.github.com/repos/Alluxio/alluxio/issues/4445"},"comments":{"href":"https://api.github.com/repos/Alluxio/alluxio/issues/4445/comments"},"review_comments":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4445/comments"},"review_comment":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4445/commits"},"statuses":{"href":"https://api.github.com/repos/Alluxio/alluxio/statuses/536e53074246ba82d64025ad659d9435377e21bd"}}}}
{"actor":{"display_login":"aaudiber"}}