{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/comments/37958173","id":37958173,"diff_hunk":"@@ -658,4 +647,238 @@ public void duTest() throws IOException {\n \n     Assert.assertEquals(expected, mOutput.toString());\n   }\n+  \n+  @Test\n+  public void catWildcardTest() throws IOException {\n+    TFsShellUtilsTest.resetTachyonFileHierarchy(mTfs, WriteType.MUST_CACHE);\n+    \n+    // the expect contents\n+    byte[] exp1 = BufferUtils.getIncreasingByteArray(10);\n+    byte[] exp2 = BufferUtils.getIncreasingByteArray(20);\n+    byte[] exp3 = BufferUtils.getIncreasingByteArray(30);\n+    byte[] expect = new byte[exp1.length + exp2.length + exp3.length];\n+    System.arraycopy(exp1, 0, expect, 0,                         exp1.length);\n+    System.arraycopy(exp2, 0, expect, exp1.length,               exp2.length);\n+    System.arraycopy(exp3, 0, expect, exp1.length + exp2.length, exp3.length);\n+    \n+    int ret = mFsShell.run(new String[] {\"cat\", \"/testWildCards/*/foo*\"});\n+    Assert.assertEquals(ret, 0);\n+    Assert.assertArrayEquals(mOutput.toByteArray(), expect);\n+  }\n+  \n+  @Test\n+  public void freeWildCardTest() throws IOException {\n+    TFsShellUtilsTest.resetTachyonFileHierarchy(mTfs, WriteType.MUST_CACHE);\n+    \n+    TachyonConf tachyonConf = mLocalTachyonCluster.getMasterTachyonConf();\n+    \n+    int ret = mFsShell.run(new String[] {\"free\", \"/testWild*/foo/*\"});\n+    CommonUtils.sleepMs(null, tachyonConf.getInt(Constants.WORKER_TO_MASTER_HEARTBEAT_INTERVAL_MS,","path":"shell/src/test/java/tachyon/shell/TFsShellTest.java","position":97,"original_position":97,"commit_id":"ffb67b9a8700c6609f97fb2128c7f8dcea1279ce","original_commit_id":"ffb67b9a8700c6609f97fb2128c7f8dcea1279ce","user":{"login":"uronce-cc","id":3663941,"avatar_url":"https://avatars.githubusercontent.com/u/3663941?v=3","gravatar_id":"","url":"https://api.github.com/users/uronce-cc","html_url":"https://github.com/uronce-cc","followers_url":"https://api.github.com/users/uronce-cc/followers","following_url":"https://api.github.com/users/uronce-cc/following{/other_user}","gists_url":"https://api.github.com/users/uronce-cc/gists{/gist_id}","starred_url":"https://api.github.com/users/uronce-cc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uronce-cc/subscriptions","organizations_url":"https://api.github.com/users/uronce-cc/orgs","repos_url":"https://api.github.com/users/uronce-cc/repos","events_url":"https://api.github.com/users/uronce-cc/events{/privacy}","received_events_url":"https://api.github.com/users/uronce-cc/received_events","type":"User","site_admin":false},"body":"The `free` command will block, why we need to sleep here?","created_at":"2015-08-26T08:38:38Z","updated_at":"2015-08-26T08:38:38Z","html_url":"https://github.com/amplab/tachyon/pull/1362#discussion_r37958173","pull_request_url":"https://api.github.com/repos/amplab/tachyon/pulls/1362","_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments/37958173"},"html":{"href":"https://github.com/amplab/tachyon/pull/1362#discussion_r37958173"},"pull_request":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1362"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/1362","id":43125791,"html_url":"https://github.com/amplab/tachyon/pull/1362","diff_url":"https://github.com/amplab/tachyon/pull/1362.diff","patch_url":"https://github.com/amplab/tachyon/pull/1362.patch","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/1362","number":1362,"state":"open","locked":false,"title":"[TACHYON-590] Implement the wildcard support for shell cmds with 1 argument","user":{"login":"tianyin","id":2421831,"avatar_url":"https://avatars.githubusercontent.com/u/2421831?v=3","gravatar_id":"","url":"https://api.github.com/users/tianyin","html_url":"https://github.com/tianyin","followers_url":"https://api.github.com/users/tianyin/followers","following_url":"https://api.github.com/users/tianyin/following{/other_user}","gists_url":"https://api.github.com/users/tianyin/gists{/gist_id}","starred_url":"https://api.github.com/users/tianyin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianyin/subscriptions","organizations_url":"https://api.github.com/users/tianyin/orgs","repos_url":"https://api.github.com/users/tianyin/repos","events_url":"https://api.github.com/users/tianyin/events{/privacy}","received_events_url":"https://api.github.com/users/tianyin/received_events","type":"User","site_admin":false},"body":"Per our discussion, we add wildcard support for shell cmds in multiple batches to ease the code review.\r\n\r\nThis PR contains the implementation of wildcard support for cmds with 1 argument, including the following cmds:\r\n{cat, ls, lsr, rm, rmr, tail, touch, fileinfo, location, report, pin, unpin, free, du}\r\n\r\nwhile the following cmds does not support wildcards by their semantic:\r\n{mkdir, touch, count}\r\n(where wildcard is treated as a regular character)\r\n\r\n\r\n","created_at":"2015-08-23T18:23:23Z","updated_at":"2015-08-26T08:38:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b8105d13512d74c4740a4a631bcddc54f9beb16","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/tachyon/pulls/1362/commits","review_comments_url":"https://api.github.com/repos/amplab/tachyon/pulls/1362/comments","review_comment_url":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/1362/comments","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/ffb67b9a8700c6609f97fb2128c7f8dcea1279ce","head":{"label":"tianyin:reimpl-shell-wildcard","ref":"reimpl-shell-wildcard","sha":"ffb67b9a8700c6609f97fb2128c7f8dcea1279ce","user":{"login":"tianyin","id":2421831,"avatar_url":"https://avatars.githubusercontent.com/u/2421831?v=3","gravatar_id":"","url":"https://api.github.com/users/tianyin","html_url":"https://github.com/tianyin","followers_url":"https://api.github.com/users/tianyin/followers","following_url":"https://api.github.com/users/tianyin/following{/other_user}","gists_url":"https://api.github.com/users/tianyin/gists{/gist_id}","starred_url":"https://api.github.com/users/tianyin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianyin/subscriptions","organizations_url":"https://api.github.com/users/tianyin/orgs","repos_url":"https://api.github.com/users/tianyin/repos","events_url":"https://api.github.com/users/tianyin/events{/privacy}","received_events_url":"https://api.github.com/users/tianyin/received_events","type":"User","site_admin":false},"repo":{"id":40450681,"name":"tachyon","full_name":"tianyin/tachyon","owner":{"login":"tianyin","id":2421831,"avatar_url":"https://avatars.githubusercontent.com/u/2421831?v=3","gravatar_id":"","url":"https://api.github.com/users/tianyin","html_url":"https://github.com/tianyin","followers_url":"https://api.github.com/users/tianyin/followers","following_url":"https://api.github.com/users/tianyin/following{/other_user}","gists_url":"https://api.github.com/users/tianyin/gists{/gist_id}","starred_url":"https://api.github.com/users/tianyin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianyin/subscriptions","organizations_url":"https://api.github.com/users/tianyin/orgs","repos_url":"https://api.github.com/users/tianyin/repos","events_url":"https://api.github.com/users/tianyin/events{/privacy}","received_events_url":"https://api.github.com/users/tianyin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tianyin/tachyon","description":" A Reliable Memory Centric Distributed Storage System","fork":true,"url":"https://api.github.com/repos/tianyin/tachyon","forks_url":"https://api.github.com/repos/tianyin/tachyon/forks","keys_url":"https://api.github.com/repos/tianyin/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tianyin/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tianyin/tachyon/teams","hooks_url":"https://api.github.com/repos/tianyin/tachyon/hooks","issue_events_url":"https://api.github.com/repos/tianyin/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/tianyin/tachyon/events","assignees_url":"https://api.github.com/repos/tianyin/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/tianyin/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/tianyin/tachyon/tags","blobs_url":"https://api.github.com/repos/tianyin/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tianyin/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tianyin/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/tianyin/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tianyin/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/tianyin/tachyon/languages","stargazers_url":"https://api.github.com/repos/tianyin/tachyon/stargazers","contributors_url":"https://api.github.com/repos/tianyin/tachyon/contributors","subscribers_url":"https://api.github.com/repos/tianyin/tachyon/subscribers","subscription_url":"https://api.github.com/repos/tianyin/tachyon/subscription","commits_url":"https://api.github.com/repos/tianyin/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/tianyin/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/tianyin/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/tianyin/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/tianyin/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/tianyin/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tianyin/tachyon/merges","archive_url":"https://api.github.com/repos/tianyin/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tianyin/tachyon/downloads","issues_url":"https://api.github.com/repos/tianyin/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/tianyin/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/tianyin/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/tianyin/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tianyin/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/tianyin/tachyon/releases{/id}","created_at":"2015-08-09T21:12:45Z","updated_at":"2015-08-09T21:12:46Z","pushed_at":"2015-08-23T18:13:10Z","git_url":"git://github.com/tianyin/tachyon.git","ssh_url":"git@github.com:tianyin/tachyon.git","clone_url":"https://github.com/tianyin/tachyon.git","svn_url":"https://github.com/tianyin/tachyon","homepage":"http://tachyon-project.org","size":16607,"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":"72d794dd484a787f92567ce3842858b1cf850025","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-26T05:39:22Z","pushed_at":"2015-08-26T08:15:28Z","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":42689,"stargazers_count":1524,"watchers_count":1524,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":589,"mirror_url":null,"open_issues_count":33,"forks":589,"open_issues":33,"watchers":1524,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1362"},"html":{"href":"https://github.com/amplab/tachyon/pull/1362"},"issue":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1362"},"comments":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1362/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1362/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1362/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/tachyon/statuses/ffb67b9a8700c6609f97fb2128c7f8dcea1279ce"}}}}