{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/comments/42178701","id":42178701,"diff_hunk":"@@ -0,0 +1,118 @@\n+---\n+layout: global\n+title: Mounting API and Transparent Naming\n+nickname: Mounts and Transparent Naming\n+group: Features\n+priority: 4\n+---\n+\n+* Table of Contents\n+{:toc}\n+\n+Tachyon enables effective data management across different storage systems through its use of\n+transparent naming and mounting API.\n+\n+## Transparent Naming\n+\n+Transparent naming maintains an identity between the Tachyon namespace and the underlying storage\n+system namespace.\n+\n+![transparent](./img/screenshot_transparent.png)\n+\n+When a user creates objects in the Tachyon namespace, they can choose whether these objects should\n+be persisted in the underlying storage system. For objects that are persisted, Tachyon preserve the\n+object paths, relative to the underlying storage system directory in which Tachyon objects are\n+stored. For instance, if a user creates a top-level directory `Users` with subdirectories `Alice`\n+and `Bob`, the directory structure and naming is preserved in the underlying storage system (e.g.\n+HDFS or S3). Similarly, when a user renames or deletes a persisted object in the Tachyon namespace,\n+it is renamed or deleted in the underlying storage system.\n+\n+Furthermore, Tachyon transparently discovers content present in the underlying storage system which\n+was not created through Tachyon. For instance, if the underlying storage system contains a directory\n+`Data` with files `Reports` and `Sales`, all of which were not created through Tachyon, their\n+metadata will be loaded into Tachyon the first time they are accessed (e.g. when the user asks to\n+list the contents of the top-level directory or when they request to open a file).\n+\n+## Mounting API\n+\n+Mounting API makes it possible to use Tachyon to access data across multiple data sources.\n+\n+![mounting](./img/screenshot_mounting.png)\n+\n+By default, Tachyon namespace is mounted onto the directory specified by the\n+`tachyon.underfs.address` property of Tachyon configuration; this directory identifies the\n+\"primary storage\" for Tachyon. In addition, users can use the mounting API to add new and remove\n+existing data sources:\n+\n+```java\n+bool mount(String tachyonPath, String ufsPath);\n+bool unmount(String tachyonPath);\n+```\n+\n+For example, the primary storage could be HDFS and contains user directories; the `Data` directory\n+might be stored in an S3 bucket, which is mounted to the Tachyon namespace through the\n+`mount(tachyon://host:port/Data, s3://bucket/directory)` invocation.\n+\n+## Example\n+\n+In this example, we will showcase the above features. The example assumes that Tachyon source code\n+exists in the `${TACHYON_HOME}` directory and that there is an instance of Tachyon running locally.\n+\n+First, let's create a temporary directory in the local file system that to use for the example:\n+\n+```bash\n+$ cd /tmp\n+$ mkdir tachyon-demo\n+```\n+\n+Next, let's mount the directory created above into Tachyon and verify the mounted directory is\n+created in Tachyon:\n+\n+```bash\n+$ ${TACHYON_HOME}/bin/tachyon tfs mount /demo /tmp/tachyon-demo\n+> Mounted /tmp/tachyon-demo at /demo\n+$ ${TACHYON_HOME}/bin/tachyon tfs ls /\n+... # should contain /demo\n+```\n+\n+Next, let's create two files under the mounted directory and verify it is created in the underlying\n+file system:\n+\n+```bash\n+$ ${TACHYON_HOME}/bin/tachyon tfs touch /demo/hello\n+> /demo/hello has been created\n+$ ${TACHYON_HOME}/bin/tachyon tfs touch /demo/hello2\n+> /demo/hello2 has been created\n+$ ls /tmp/tachyon-demo\n+> hello\thello2\n+```\n+\n+Next, let's rename one of the files and verify it is renamed in the underlying file system:\n+\n+```bash\n+$ ${TACHYON_HOME}/bin/tachyon tfs mv /demo/hello2 /demo/world\n+> Renamed /demo/hello2 to /demo/world\n+$ ls /tmp/tachyon-demo\n+> hello world\n+```\n+\n+Next, let's delete one of the files and verify it is deleted in the underlying file system:\n+\n+```bash\n+$ ${TACHYON_HOME}/bin/tachyon tfs rm /demo/world\n+> /demo/world has been removed\n+$ ls /tmp/tachyon-demo\n+> hello\n+```\n+\n+Finally, let's unmount the mounted directory and verify that it is removed from the Tachyon\n+namespace, but it contents are preserved in the underlying file system:","path":"docs/Mounting-and-Transparent-Naming.md","position":null,"original_position":109,"commit_id":"18af5eb4f1ede41d959af5c9558ff06a6bf9c8af","original_commit_id":"c65d24607cad88047bf15ae4e76cc3af4a42afe6","user":{"login":"jsimsa","id":1072079,"avatar_url":"https://avatars.githubusercontent.com/u/1072079?v=3","gravatar_id":"","url":"https://api.github.com/users/jsimsa","html_url":"https://github.com/jsimsa","followers_url":"https://api.github.com/users/jsimsa/followers","following_url":"https://api.github.com/users/jsimsa/following{/other_user}","gists_url":"https://api.github.com/users/jsimsa/gists{/gist_id}","starred_url":"https://api.github.com/users/jsimsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsimsa/subscriptions","organizations_url":"https://api.github.com/users/jsimsa/orgs","repos_url":"https://api.github.com/users/jsimsa/repos","events_url":"https://api.github.com/users/jsimsa/events{/privacy}","received_events_url":"https://api.github.com/users/jsimsa/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2015-10-15T20:51:49Z","updated_at":"2015-10-15T20:51:49Z","html_url":"https://github.com/amplab/tachyon/pull/1770#discussion_r42178701","pull_request_url":"https://api.github.com/repos/amplab/tachyon/pulls/1770","_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments/42178701"},"html":{"href":"https://github.com/amplab/tachyon/pull/1770#discussion_r42178701"},"pull_request":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1770"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/1770","id":47399841,"html_url":"https://github.com/amplab/tachyon/pull/1770","diff_url":"https://github.com/amplab/tachyon/pull/1770.diff","patch_url":"https://github.com/amplab/tachyon/pull/1770.patch","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/1770","number":1770,"state":"open","locked":false,"title":"[TACHYON-1115] Update docs to reflect latest setup/features","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":"https://tachyon.atlassian.net/browse/TACHYON-1115","created_at":"2015-10-12T09:30:46Z","updated_at":"2015-10-15T20:51:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"979fa07889c0ac3e62423bd5ce694956d27be337","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/tachyon/pulls/1770/commits","review_comments_url":"https://api.github.com/repos/amplab/tachyon/pulls/1770/comments","review_comment_url":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/1770/comments","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/18af5eb4f1ede41d959af5c9558ff06a6bf9c8af","head":{"label":"amplab:0.8-docs","ref":"0.8-docs","sha":"18af5eb4f1ede41d959af5c9558ff06a6bf9c8af","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-15T20:34:20Z","pushed_at":"2015-10-15T20:51:42Z","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":55418,"stargazers_count":1643,"watchers_count":1643,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":652,"mirror_url":null,"open_issues_count":29,"forks":652,"open_issues":29,"watchers":1643,"default_branch":"master"}},"base":{"label":"amplab:master","ref":"master","sha":"9d3c942b704d8ea83541acfd9ba942d88e30b5e7","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-15T20:34:20Z","pushed_at":"2015-10-15T20:51:42Z","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":55418,"stargazers_count":1643,"watchers_count":1643,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":652,"mirror_url":null,"open_issues_count":29,"forks":652,"open_issues":29,"watchers":1643,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1770"},"html":{"href":"https://github.com/amplab/tachyon/pull/1770"},"issue":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1770"},"comments":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1770/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1770/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1770/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/tachyon/statuses/18af5eb4f1ede41d959af5c9558ff06a6bf9c8af"}}}}