@Test public void shouldInitializeWithTachyonFTSchemePassedByUser() throws Exception { mockTachyonFSGet(); mTfs.initialize(new URI(Constants.HEADER_FT + "stanley:19998/tmp/path.txt"), new Configuration()); verifyStatic(); TachyonFS.get(Constants.HEADER_FT + "stanley:19998"); }
@Override public void initialize(URI uri, Configuration conf) throws IOException { super.initialize(uri, conf); LOG.info("initialize(" + uri + ", " + conf + "). Connecting to Tachyon: " + uri.toString()); Utils.addS3Credentials(conf); setConf(conf); mTachyonHeader = uri.getScheme() + ": mTFS = TachyonFS.get(mTachyonHeader); mUri = URI.create(mTachyonHeader); UNDERFS_ADDRESS = mTFS.getUnderfsAddress(); LOG.info(mTachyonHeader + " " + mUri + " " + UNDERFS_ADDRESS); }
TFS extends FileSystem { @Override public void initialize(URI uri, Configuration conf) throws IOException { super.initialize(uri, conf); LOG.info("initialize(" + uri + ", " + conf + "). Connecting to Tachyon: " + uri.toString()); Utils.addS3Credentials(conf); setConf(conf); mTachyonHeader = uri.getScheme() + ": mTFS = TachyonFS.get(mTachyonHeader); mUri = URI.create(mTachyonHeader); UNDERFS_ADDRESS = mTFS.getUnderfsAddress(); LOG.info(mTachyonHeader + " " + mUri + " " + UNDERFS_ADDRESS); } }
TFS extends FileSystem { @Override public void initialize(URI uri, Configuration conf) throws IOException { super.initialize(uri, conf); LOG.info("initialize(" + uri + ", " + conf + "). Connecting to Tachyon: " + uri.toString()); Utils.addS3Credentials(conf); setConf(conf); mTachyonHeader = uri.getScheme() + ": mTFS = TachyonFS.get(mTachyonHeader); mUri = URI.create(mTachyonHeader); UNDERFS_ADDRESS = mTFS.getUnderfsAddress(); LOG.info(mTachyonHeader + " " + mUri + " " + UNDERFS_ADDRESS); }  }
TFS extends FileSystem { @Override public void initialize(URI uri, Configuration conf) throws IOException { super.initialize(uri, conf); LOG.info("initialize(" + uri + ", " + conf + "). Connecting to Tachyon: " + uri.toString()); Utils.addS3Credentials(conf); setConf(conf); mTachyonHeader = uri.getScheme() + ": mTFS = TachyonFS.get(mTachyonHeader); mUri = URI.create(mTachyonHeader); UNDERFS_ADDRESS = mTFS.getUnderfsAddress(); LOG.info(mTachyonHeader + " " + mUri + " " + UNDERFS_ADDRESS); }  @Override FSDataOutputStream append(Path cPath, int bufferSize, Progressable progress); @Override FSDataOutputStream create(Path cPath, FsPermission permission, boolean overwrite,
      int bufferSize, short replication, long blockSize, Progressable progress); @Override @Deprecated boolean delete(Path path); @Override boolean delete(Path path, boolean recursive); @Override BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len); @Override /** * Return the status of a single file. If the file does not exist in Tachyon, query it from HDFS. */ FileStatus getFileStatus(Path path); TachyonFS getTachyonFS(); @Override URI getUri(); @Override Path getWorkingDirectory(); @Override void initialize(URI uri, Configuration conf); @Override /** * List entries of a path */ FileStatus[] listStatus(Path path); @Override boolean mkdirs(Path cPath, FsPermission permission); @Override /** * Return the FSDataInputStream of a file. */ FSDataInputStream open(Path cPath, int bufferSize); @Override boolean rename(Path src, Path dst); @Override void setWorkingDirectory(Path path); }
TFS extends FileSystem { @Override public void initialize(URI uri, Configuration conf) throws IOException { super.initialize(uri, conf); LOG.info("initialize(" + uri + ", " + conf + "). Connecting to Tachyon: " + uri.toString()); Utils.addS3Credentials(conf); setConf(conf); mTachyonHeader = uri.getScheme() + ": mTFS = TachyonFS.get(mTachyonHeader); mUri = URI.create(mTachyonHeader); UNDERFS_ADDRESS = mTFS.getUnderfsAddress(); LOG.info(mTachyonHeader + " " + mUri + " " + UNDERFS_ADDRESS); }  @Override FSDataOutputStream append(Path cPath, int bufferSize, Progressable progress); @Override FSDataOutputStream create(Path cPath, FsPermission permission, boolean overwrite,
      int bufferSize, short replication, long blockSize, Progressable progress); @Override @Deprecated boolean delete(Path path); @Override boolean delete(Path path, boolean recursive); @Override BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len); @Override /** * Return the status of a single file. If the file does not exist in Tachyon, query it from HDFS. */ FileStatus getFileStatus(Path path); TachyonFS getTachyonFS(); @Override URI getUri(); @Override Path getWorkingDirectory(); @Override void initialize(URI uri, Configuration conf); @Override /** * List entries of a path */ FileStatus[] listStatus(Path path); @Override boolean mkdirs(Path cPath, FsPermission permission); @Override /** * Return the FSDataInputStream of a file. */ FSDataInputStream open(Path cPath, int bufferSize); @Override boolean rename(Path src, Path dst); @Override void setWorkingDirectory(Path path); static final String FIRST_COM_PATH; static final String RECOMPUTE_PATH; static String UNDERFS_ADDRESS; }