throws ServletException, IOException { request.setAttribute("fatalError", ""); TachyonFileSystem tFS = TachyonFileSystemFactory.get(); String filePath = request.getParameter("path"); if (!(filePath == null || filePath.isEmpty())) {
sResultPrefix = "TachyonFilesWriteTest " + sResultPrefix; LOG.info(sResultPrefix); sTFS = TachyonFileSystem.TachyonFileSystemFactory.get(); createFiles(); TachyonTest(true); sResultPrefix = "TachyonFilesReadTest " + sResultPrefix; LOG.info(sResultPrefix); sTFS = TachyonFileSystem.TachyonFileSystemFactory.get(); sTachyonStreamingRead = (9 == testCase); TachyonTest(false);
sTfs = TachyonFileSystemFactory.get(); sOldTfs = TachyonFS.get(ClientContext.getConf()); try {
TachyonFileSystem tFS = TachyonFileSystemFactory.get(); TachyonFile tFile = tFS.open(path); String fileData = null;
HttpServletResponse response) throws FileDoesNotExistException, IOException, InvalidPathException, TachyonException { TachyonFileSystem tachyonClient = TachyonFileSystemFactory.get(); TachyonFile fd = tachyonClient.open(path); FileInfo tFile = tachyonClient.getInfo(fd);
public TachyonReadWorker(int id, int left, int right, ByteBuffer buf) throws IOException { super(id, left, right, buf); mTFS = TachyonFileSystem.TachyonFileSystemFactory.get(); }
/** * Returns a {@link tachyon.client.TachyonFS} client. This client does not need to be closed * directly, but can be closed by calling {@link #close()} on this object. * * @param tachyonConf Tachyon configuration * @return a TachyonFS client * @throws IOException when the operation fails */ public TachyonFileSystem getClient(TachyonConf tachyonConf) throws IOException { final TachyonFileSystem fs = TachyonFileSystemFactory.get(); mClients.add(fs); return fs; }
public TachyonWriterWorker(int id, int left, int right, ByteBuffer buf) throws IOException { super(id, left, right, buf); mTFS = TachyonFileSystem.TachyonFileSystemFactory.get(); }
/** * Creates a new <code>TachyonFile</code>, based on file id. * * @param tfs the Tachyon file system client handler * @param fid the file id * @param tachyonConf the TachyonConf for this file */ TachyonFile(TachyonFS tfs, long fid, TachyonConf tachyonConf) { mTachyonFS = tfs; mTFS = TachyonFileSystemFactory.get(); mFileId = fid; mTachyonConf = tachyonConf; }
@Override public Boolean call() throws Exception { TachyonFileSystem tachyonClient = TachyonFileSystemFactory.get(); writeFile(tachyonClient); return readFile(tachyonClient); }
public TfsShell(TachyonConf tachyonConf) { mTachyonConf = tachyonConf; mCloser = Closer.create(); mTfs = TachyonFileSystemFactory.get(); }
@Override public Boolean call() throws Exception { TachyonConf tachyonConf = ClientContext.getConf(); tachyonConf.set(Constants.MASTER_HOSTNAME, mMasterLocation.getHost()); tachyonConf.set(Constants.MASTER_PORT, Integer.toString(mMasterLocation.getPort())); ClientContext.reset(tachyonConf); TachyonFileSystem tFS = TachyonFileSystem.TachyonFileSystemFactory.get(); write(tFS, mFilePath, mWriteType, mDeleteIfExists, mLength); return read(tFS, mFilePath, mReadType); }
@Override public Boolean call() throws Exception { TachyonConf tachyonConf = ClientContext.getConf(); tachyonConf.set(Constants.MASTER_HOSTNAME, mMasterLocation.getHost()); tachyonConf.set(Constants.MASTER_PORT, Integer.toString(mMasterLocation.getPort())); ClientContext.reset(tachyonConf); TachyonFileSystem tFS = TachyonFileSystem.TachyonFileSystemFactory.get(); long fileId = createFile(tFS); writeFile(fileId); return readFile(tFS, fileId); }