{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/comments/37153595","id":37153595,"diff_hunk":"@@ -152,31 +155,57 @@ protected StorageDirView cascadingEvict(long bytesToBeAvailable, BlockStoreLocat\n       return null;\n     }\n \n-    // 4. cascading eviction: try to free space in next tier to move candidate blocks there, evict\n-    // blocks only when it can not be moved to next tiers\n+    // 4. cascading eviction: try to allocate space in the next tier to move candidate blocks\n+    // there. If allocation fails, the next tier will continue to evict its blocks to free space.\n+    // Blocks are only evicted from the last tier or it can not be moved to the next tier.\n     candidateDirView = dirCandidates.candidateDir();\n     List<Long> candidateBlocks = dirCandidates.candidateBlocks();\n-    List<StorageTierView> tierViewsBelow =\n-        mManagerView.getTierViewsBelow(candidateDirView.getParentTierView().getTierViewAlias());\n-    // find a dir in below tiers to transfer blocks there, from top tier to bottom tier\n-    StorageDirView candidateNextDir = null;\n-    for (StorageTierView tierView : tierViewsBelow) {\n-      candidateNextDir =\n-          cascadingEvict(dirCandidates.candidateSize() - candidateDirView.getAvailableBytes(),","path":"servers/src/main/java/tachyon/worker/block/evictor/LRUEvictor.java","position":61,"original_position":61,"commit_id":"b09828e985ce8f9f45d811341db0547916545f48","original_commit_id":"b09828e985ce8f9f45d811341db0547916545f48","user":{"login":"carsonwang","id":9278199,"avatar_url":"https://avatars.githubusercontent.com/u/9278199?v=3","gravatar_id":"","url":"https://api.github.com/users/carsonwang","html_url":"https://github.com/carsonwang","followers_url":"https://api.github.com/users/carsonwang/followers","following_url":"https://api.github.com/users/carsonwang/following{/other_user}","gists_url":"https://api.github.com/users/carsonwang/gists{/gist_id}","starred_url":"https://api.github.com/users/carsonwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carsonwang/subscriptions","organizations_url":"https://api.github.com/users/carsonwang/orgs","repos_url":"https://api.github.com/users/carsonwang/repos","events_url":"https://api.github.com/users/carsonwang/events{/privacy}","received_events_url":"https://api.github.com/users/carsonwang/received_events","type":"User","site_admin":false},"body":"The blocks to evict are not changed. I still get the blocks from `dirCandidates.candidateBlocks()`. The difference is that I move the blocks to next tier one by one so the blocks are likely moved to different dirs instead of a single dir.  ","created_at":"2015-08-17T01:09:07Z","updated_at":"2015-08-17T01:09:07Z","html_url":"https://github.com/amplab/tachyon/pull/1291#discussion_r37153595","pull_request_url":"https://api.github.com/repos/amplab/tachyon/pulls/1291","_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments/37153595"},"html":{"href":"https://github.com/amplab/tachyon/pull/1291#discussion_r37153595"},"pull_request":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1291"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/1291","id":42327900,"html_url":"https://github.com/amplab/tachyon/pull/1291","diff_url":"https://github.com/amplab/tachyon/pull/1291.diff","patch_url":"https://github.com/amplab/tachyon/pull/1291.patch","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/1291","number":1291,"state":"open","locked":false,"title":"[TACHYON-773]Using an allocation strategy during eviction","user":{"login":"carsonwang","id":9278199,"avatar_url":"https://avatars.githubusercontent.com/u/9278199?v=3","gravatar_id":"","url":"https://api.github.com/users/carsonwang","html_url":"https://github.com/carsonwang","followers_url":"https://api.github.com/users/carsonwang/followers","following_url":"https://api.github.com/users/carsonwang/following{/other_user}","gists_url":"https://api.github.com/users/carsonwang/gists{/gist_id}","starred_url":"https://api.github.com/users/carsonwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carsonwang/subscriptions","organizations_url":"https://api.github.com/users/carsonwang/orgs","repos_url":"https://api.github.com/users/carsonwang/repos","events_url":"https://api.github.com/users/carsonwang/events{/privacy}","received_events_url":"https://api.github.com/users/carsonwang/received_events","type":"User","site_admin":false},"body":"The purpose of this PR is to use an allocation strategy during eviction because currently the evictor only evict blocks to a single directory(thus a single disk). \r\nI plan to split the work so this PR only changes the LRU evictor. It also slightly changes the Allocator interface that returns a StorageDirView instead of a TempBlockMeta. If this looks OK, I will refactor other evictors.","created_at":"2015-08-13T08:56:00Z","updated_at":"2015-08-17T01:09:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"689c1623cc563f24e5b69c613001a1fa79de83b9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/tachyon/pulls/1291/commits","review_comments_url":"https://api.github.com/repos/amplab/tachyon/pulls/1291/comments","review_comment_url":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/1291/comments","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/b09828e985ce8f9f45d811341db0547916545f48","head":{"label":"carsonwang:TACHYON-773","ref":"TACHYON-773","sha":"b09828e985ce8f9f45d811341db0547916545f48","user":{"login":"carsonwang","id":9278199,"avatar_url":"https://avatars.githubusercontent.com/u/9278199?v=3","gravatar_id":"","url":"https://api.github.com/users/carsonwang","html_url":"https://github.com/carsonwang","followers_url":"https://api.github.com/users/carsonwang/followers","following_url":"https://api.github.com/users/carsonwang/following{/other_user}","gists_url":"https://api.github.com/users/carsonwang/gists{/gist_id}","starred_url":"https://api.github.com/users/carsonwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carsonwang/subscriptions","organizations_url":"https://api.github.com/users/carsonwang/orgs","repos_url":"https://api.github.com/users/carsonwang/repos","events_url":"https://api.github.com/users/carsonwang/events{/privacy}","received_events_url":"https://api.github.com/users/carsonwang/received_events","type":"User","site_admin":false},"repo":{"id":29516862,"name":"tachyon","full_name":"carsonwang/tachyon","owner":{"login":"carsonwang","id":9278199,"avatar_url":"https://avatars.githubusercontent.com/u/9278199?v=3","gravatar_id":"","url":"https://api.github.com/users/carsonwang","html_url":"https://github.com/carsonwang","followers_url":"https://api.github.com/users/carsonwang/followers","following_url":"https://api.github.com/users/carsonwang/following{/other_user}","gists_url":"https://api.github.com/users/carsonwang/gists{/gist_id}","starred_url":"https://api.github.com/users/carsonwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carsonwang/subscriptions","organizations_url":"https://api.github.com/users/carsonwang/orgs","repos_url":"https://api.github.com/users/carsonwang/repos","events_url":"https://api.github.com/users/carsonwang/events{/privacy}","received_events_url":"https://api.github.com/users/carsonwang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carsonwang/tachyon","description":" A Reliable Memory Centric Distributed Storage System","fork":true,"url":"https://api.github.com/repos/carsonwang/tachyon","forks_url":"https://api.github.com/repos/carsonwang/tachyon/forks","keys_url":"https://api.github.com/repos/carsonwang/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carsonwang/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carsonwang/tachyon/teams","hooks_url":"https://api.github.com/repos/carsonwang/tachyon/hooks","issue_events_url":"https://api.github.com/repos/carsonwang/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/carsonwang/tachyon/events","assignees_url":"https://api.github.com/repos/carsonwang/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/carsonwang/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/carsonwang/tachyon/tags","blobs_url":"https://api.github.com/repos/carsonwang/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carsonwang/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carsonwang/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/carsonwang/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carsonwang/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/carsonwang/tachyon/languages","stargazers_url":"https://api.github.com/repos/carsonwang/tachyon/stargazers","contributors_url":"https://api.github.com/repos/carsonwang/tachyon/contributors","subscribers_url":"https://api.github.com/repos/carsonwang/tachyon/subscribers","subscription_url":"https://api.github.com/repos/carsonwang/tachyon/subscription","commits_url":"https://api.github.com/repos/carsonwang/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/carsonwang/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/carsonwang/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/carsonwang/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/carsonwang/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/carsonwang/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carsonwang/tachyon/merges","archive_url":"https://api.github.com/repos/carsonwang/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carsonwang/tachyon/downloads","issues_url":"https://api.github.com/repos/carsonwang/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/carsonwang/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/carsonwang/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/carsonwang/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carsonwang/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/carsonwang/tachyon/releases{/id}","created_at":"2015-01-20T07:11:16Z","updated_at":"2015-02-06T01:56:29Z","pushed_at":"2015-08-14T08:30:50Z","git_url":"git://github.com/carsonwang/tachyon.git","ssh_url":"git@github.com:carsonwang/tachyon.git","clone_url":"https://github.com/carsonwang/tachyon.git","svn_url":"https://github.com/carsonwang/tachyon","homepage":"http://tachyon-project.org","size":16761,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"amplab:master","ref":"master","sha":"8594ae7aceed5b0e012cb53d6294f2b58d42eeee","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":" A Reliable Memory Centric Distributed Storage System","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-08-14T19:04:01Z","pushed_at":"2015-08-17T00:56:48Z","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":39624,"stargazers_count":1502,"watchers_count":1502,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":579,"mirror_url":null,"open_issues_count":25,"forks":579,"open_issues":25,"watchers":1502,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1291"},"html":{"href":"https://github.com/amplab/tachyon/pull/1291"},"issue":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1291"},"comments":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1291/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1291/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1291/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/tachyon/statuses/b09828e985ce8f9f45d811341db0547916545f48"}}}}