{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/comments/48635051","id":48635051,"diff_hunk":"@@ -0,0 +1,365 @@\n+/*\n+ * Licensed to the University of California, Berkeley under one or more contributor license\n+ * agreements. See the NOTICE file distributed with this work for additional information regarding\n+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance with the License. You may obtain a\n+ * copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License\n+ * is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n+ * or implied. See the License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+\n+package tachyon.client.file;\n+\n+import java.io.IOException;\n+import java.util.List;\n+\n+import tachyon.TachyonURI;\n+import tachyon.annotation.PublicApi;\n+import tachyon.client.file.options.CreateDirectoryOptions;\n+import tachyon.client.file.options.CreateFileOptions;\n+import tachyon.client.file.options.DeleteOptions;\n+import tachyon.client.file.options.ExistsOptions;\n+import tachyon.client.file.options.FreeOptions;\n+import tachyon.client.file.options.GetStatusOptions;\n+import tachyon.client.file.options.ListStatusOptions;\n+import tachyon.client.file.options.LoadMetadataOptions;\n+import tachyon.client.file.options.MountOptions;\n+import tachyon.client.file.options.OpenFileOptions;\n+import tachyon.client.file.options.RenameOptions;\n+import tachyon.client.file.options.SetAttributeOptions;\n+import tachyon.client.file.options.UnmountOptions;\n+import tachyon.exception.DirectoryNotEmptyException;\n+import tachyon.exception.FileAlreadyExistsException;\n+import tachyon.exception.FileDoesNotExistException;\n+import tachyon.exception.InvalidPathException;\n+import tachyon.exception.TachyonException;\n+\n+/**\n+ * Basic file system interface supporting metadata operations and data operations. Developers\n+ * should not implement this class but extend the default implementation provided by {@link\n+ * BaseFileSystem} instead. This ensures any new methods added to the interface will be provided\n+ * by the default implementation.\n+ */\n+@PublicApi\n+interface FileSystem {\n+  /**\n+   * Convenience method for creating a directory with default options.\n+   *\n+   * @param path the path of the directory to create in Tachyon space\n+   * @return the {@link TachyonURI} referencing the newly created directory\n+   */\n+  TachyonURI createDirectory(TachyonURI path)\n+      throws FileAlreadyExistsException, InvalidPathException, IOException, TachyonException;\n+\n+  /**\n+   * Creates a directory.\n+   *\n+   * @param path the path of the directory to create in Tachyon space\n+   * @param options options to associate with this operation\n+   * @return the {@link TachyonURI} referencing the newly created directory\n+   * @throws IOException if a non-Tachyon exception occurs\n+   * @throws FileAlreadyExistsException if there is already a file at the given path\n+   * @throws InvalidPathException if the path is invalid\n+   * @throws TachyonException if an unexpected tachyon exception is thrown\n+   */\n+  TachyonURI createDirectory(TachyonURI path, CreateDirectoryOptions options)\n+      throws FileAlreadyExistsException, InvalidPathException, IOException, TachyonException;\n+\n+  /**\n+   * Convenience method for creating a file with default options.\n+   *\n+   * @param path the path of the file to create in Tachyon space\n+   * @return a {@link FileOutStream} which will write data to the newly created file\n+   * @throws IOException if a non-Tachyon exception occurs\n+   * @throws FileAlreadyExistsException if there is already a file at the given path\n+   * @throws InvalidPathException if the path is invalid\n+   * @throws TachyonException if an unexpected tachyon exception is thrown\n+   */\n+  FileOutStream createFile(TachyonURI path)\n+      throws FileAlreadyExistsException, InvalidPathException, IOException, TachyonException;\n+\n+  /**\n+   * Creates a file.\n+   *\n+   * @param path the path of the file to create in Tachyon space\n+   * @param options options to associate with this operation\n+   * @return a {@link FileOutStream} which will write data to the newly created file\n+   * @throws IOException if a non-Tachyon exception occurs\n+   * @throws FileAlreadyExistsException if there is already a file at the given path\n+   * @throws InvalidPathException if the path is invalid\n+   * @throws TachyonException if an unexpected tachyon exception is thrown\n+   */\n+  FileOutStream createFile(TachyonURI path, CreateFileOptions options)\n+      throws FileAlreadyExistsException, InvalidPathException, IOException, TachyonException;\n+\n+  /**\n+   * Convenience method for delete with default options.\n+   *\n+   * @param path the path to delete in Tachyon space\n+   * @throws IOException if a non-Tachyon exception occurs\n+   * @throws FileDoesNotExistException if the given path does not exist\n+   * @throws DirectoryNotEmptyException if recursive is false and the path is a nonempty directory\n+   * @throws TachyonException if an unexpected Tachyon exception is thrown\n+   */\n+  void delete(TachyonURI path)\n+      throws DirectoryNotEmptyException, FileDoesNotExistException, IOException, TachyonException;\n+\n+  /**\n+   * Deletes a file or a directory.\n+   *\n+   * @param path the path to delete in Tachyon space\n+   * @param options options to associate with this operation\n+   * @throws IOException if a non-Tachyon exception occurs\n+   * @throws FileDoesNotExistException if the given path does not exist\n+   * @throws DirectoryNotEmptyException if recursive is false and the path is a nonempty directory\n+   * @throws TachyonException if an unexpected Tachyon exception is thrown\n+   */\n+  void delete(TachyonURI path, DeleteOptions options)\n+      throws DirectoryNotEmptyException, FileDoesNotExistException, IOException, TachyonException;\n+\n+  /**\n+   * Convenience method for exists with default options.\n+   *\n+   * @param path the path in question\n+   * @return true if the path exists, false otherwise\n+   * @throws IOException if a non-Tachyon exception occurs\n+   * @throws InvalidPathException if the path is invalid\n+   * @throws TachyonException if an unexpected Tachyon exception is thrown\n+   */\n+  boolean exists(TachyonURI path) throws InvalidPathException, IOException, TachyonException;\n+\n+  /**\n+   * Checks whether a path exists in Tachyon space\n+   *\n+   * @param path the path in question\n+   * @param options options to associate with this operation\n+   * @return true if the path exists, false otherwise\n+   * @throws IOException if a non-Tachyon exception occurs\n+   * @throws InvalidPathException if the path is invalid\n+   * @throws TachyonException if an unexpected Tachyon exception is thrown\n+   */\n+  boolean exists(TachyonURI path, ExistsOptions options) throws InvalidPathException, IOException,\n+      TachyonException;\n+\n+  /**\n+   * Convenience method to free a path with default options.\n+   *\n+   * @param path the path to free in Tachyon space\n+   * @throws IOException if a non-Tachyon exception occurs\n+   * @throws FileDoesNotExistException if the given path does not exist\n+   * @throws TachyonException if an unexpected tachyon exception is thrown\n+   */\n+  void free(TachyonURI path) throws FileDoesNotExistException, IOException, TachyonException;\n+\n+  /**\n+   * Evicts any data under the given path from Tachyon space, but does not delete the data from the\n+   * UFS.\n+   *\n+   * @param path the path to free in Tachyon space\n+   * @param options options to associate with this operation\n+   * @throws IOException if a non-Tachyon exception occurs\n+   * @throws FileDoesNotExistException if the given path does not exist\n+   * @throws TachyonException if an unexpected tachyon exception is thrown\n+   */\n+  void free(TachyonURI path, FreeOptions options)\n+      throws FileDoesNotExistException, IOException, TachyonException;\n+\n+  /**\n+   * Convenience method for get status with default options.","path":"clients/unshaded/src/main/java/tachyon/client/file/FileSystem.java","position":173,"original_position":173,"commit_id":"54909753a425b51db736aefd88fcf15dde07fa8c","original_commit_id":"54909753a425b51db736aefd88fcf15dde07fa8c","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":"Updated, thanks.","created_at":"2015-12-30T22:07:26Z","updated_at":"2015-12-30T22:07:26Z","html_url":"https://github.com/amplab/tachyon/pull/2377#discussion_r48635051","pull_request_url":"https://api.github.com/repos/amplab/tachyon/pulls/2377","_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments/48635051"},"html":{"href":"https://github.com/amplab/tachyon/pull/2377#discussion_r48635051"},"pull_request":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/2377"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/2377","id":54824001,"html_url":"https://github.com/amplab/tachyon/pull/2377","diff_url":"https://github.com/amplab/tachyon/pull/2377.diff","patch_url":"https://github.com/amplab/tachyon/pull/2377.patch","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/2377","number":2377,"state":"open","locked":false,"title":"[TACHYON-167] FileSystem Interface","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":"FileSystem interface which abstracts file id from the user. This is the first of several steps to update the client workflow.","created_at":"2015-12-30T19:38:34Z","updated_at":"2015-12-30T22:07:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93b4d1d8454787bc45b727e0b4caaebd93cf588a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/tachyon/pulls/2377/commits","review_comments_url":"https://api.github.com/repos/amplab/tachyon/pulls/2377/comments","review_comment_url":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/2377/comments","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/54909753a425b51db736aefd88fcf15dde07fa8c","head":{"label":"calvinjia:client","ref":"client","sha":"54909753a425b51db736aefd88fcf15dde07fa8c","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},"repo":{"id":9278135,"name":"tachyon","full_name":"calvinjia/tachyon","owner":{"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},"private":false,"html_url":"https://github.com/calvinjia/tachyon","description":"Tachyon","fork":true,"url":"https://api.github.com/repos/calvinjia/tachyon","forks_url":"https://api.github.com/repos/calvinjia/tachyon/forks","keys_url":"https://api.github.com/repos/calvinjia/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calvinjia/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calvinjia/tachyon/teams","hooks_url":"https://api.github.com/repos/calvinjia/tachyon/hooks","issue_events_url":"https://api.github.com/repos/calvinjia/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/calvinjia/tachyon/events","assignees_url":"https://api.github.com/repos/calvinjia/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/calvinjia/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/calvinjia/tachyon/tags","blobs_url":"https://api.github.com/repos/calvinjia/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calvinjia/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calvinjia/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/calvinjia/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calvinjia/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/calvinjia/tachyon/languages","stargazers_url":"https://api.github.com/repos/calvinjia/tachyon/stargazers","contributors_url":"https://api.github.com/repos/calvinjia/tachyon/contributors","subscribers_url":"https://api.github.com/repos/calvinjia/tachyon/subscribers","subscription_url":"https://api.github.com/repos/calvinjia/tachyon/subscription","commits_url":"https://api.github.com/repos/calvinjia/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/calvinjia/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/calvinjia/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/calvinjia/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/calvinjia/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/calvinjia/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calvinjia/tachyon/merges","archive_url":"https://api.github.com/repos/calvinjia/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calvinjia/tachyon/downloads","issues_url":"https://api.github.com/repos/calvinjia/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/calvinjia/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/calvinjia/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/calvinjia/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calvinjia/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/calvinjia/tachyon/releases{/id}","created_at":"2013-04-07T14:56:38Z","updated_at":"2015-05-08T17:53:06Z","pushed_at":"2015-12-30T19:51:30Z","git_url":"git://github.com/calvinjia/tachyon.git","ssh_url":"git@github.com:calvinjia/tachyon.git","clone_url":"https://github.com/calvinjia/tachyon.git","svn_url":"https://github.com/calvinjia/tachyon","homepage":null,"size":34318,"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":"amplab:client","ref":"client","sha":"7799c00a849b8dc02c1650215c1f227eb1a5b275","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-12-30T18:14:21Z","pushed_at":"2015-12-30T19:51:30Z","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":42666,"stargazers_count":1833,"watchers_count":1833,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":725,"mirror_url":null,"open_issues_count":33,"forks":725,"open_issues":33,"watchers":1833,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/2377"},"html":{"href":"https://github.com/amplab/tachyon/pull/2377"},"issue":{"href":"https://api.github.com/repos/amplab/tachyon/issues/2377"},"comments":{"href":"https://api.github.com/repos/amplab/tachyon/issues/2377/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/2377/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/2377/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/tachyon/statuses/54909753a425b51db736aefd88fcf15dde07fa8c"}}}}