Examples of FileDoesNotExistException


Examples of tachyon.thrift.FileDoesNotExistException

            + mMasterInfo.getMasterAddress().getPort();
    TachyonFS tachyonClient = TachyonFS.get(new TachyonURI(masterAddress));
    TachyonFile tFile = tachyonClient.getFile(path);
    String fileData = null;
    if (tFile == null) {
      throw new FileDoesNotExistException(path.toString());
    }
    if (tFile.isComplete()) {
      InStream is = tFile.getInStream(ReadType.NO_CACHE);
      try {
        int len = (int) Math.min(5 * Constants.KB, tFile.length() - offset);
View Full Code Here

Examples of tachyon.thrift.FileDoesNotExistException

    try {
      ClientFileInfo clientFileInfo = mMasterInfo.getClientFileInfo(currentPath);
      UiFileInfo currentFileInfo = new UiFileInfo(clientFileInfo);
      if (null == currentFileInfo.getAbsolutePath()) {
        throw new FileDoesNotExistException(currentPath.toString());
      }
      request.setAttribute("currentDirectory", currentFileInfo);
      request.setAttribute("blockSizeByte", currentFileInfo.getBlockSizeBytes());
      if (!currentFileInfo.getIsDirectory()) {
        String tmpParam = request.getParameter("offset");
View Full Code Here

Examples of tachyon.thrift.FileDoesNotExistException

    }
    TachyonURI currentPath = new TachyonURI(requestPath);
    try {
      ClientFileInfo clientFileInfo = mMasterInfo.getClientFileInfo(currentPath);
      if (null == clientFileInfo) {
        throw new FileDoesNotExistException(currentPath.toString());
      }
      downloadFile(new TachyonURI(clientFileInfo.getPath()), request, response);
    } catch (FileDoesNotExistException fdne) {
      request.setAttribute("invalidPathError", "Error: Invalid Path " + fdne.getMessage());
      getServletContext().getRequestDispatcher("/browse.jsp").forward(request, response);
View Full Code Here

Examples of tachyon.thrift.FileDoesNotExistException

        Constants.HEADER + mMasterInfo.getMasterAddress().getHostName() + ":"
            + mMasterInfo.getMasterAddress().getPort();
    TachyonFS tachyonClient = TachyonFS.get(new TachyonURI(masterAddress));
    TachyonFile tFile = tachyonClient.getFile(path);
    if (tFile == null) {
      throw new FileDoesNotExistException(path.toString());
    }
    long len = tFile.length();
    String fileName = path.getName();
    response.setContentType("application/octet-stream");
    if (len <= Integer.MAX_VALUE) {
View Full Code Here

Examples of tachyon.thrift.FileDoesNotExistException

      SuspectedFileSizeException, BlockInfoException, IOException {
    File srcFile = new File(CommonUtils.concat(getUserLocalTempFolder(userId), blockId));
    File dstFile = new File(CommonUtils.concat(mLocalDataFolder, blockId));
    long fileSizeBytes = srcFile.length();
    if (!srcFile.exists()) {
      throw new FileDoesNotExistException("File " + srcFile + " does not exist.");
    }
    synchronized (mBlockIdToLatestAccessTimeMs) {
      if (!srcFile.renameTo(dstFile)) {
        throw new FileDoesNotExistException("Failed to rename file from " + srcFile.getPath()
            + " to " + dstFile.getPath());
      }
      if (mBlockSizes.containsKey(blockId)) {
        mSpaceCounter.returnUsedBytes(mBlockSizes.get(blockId));
      }
View Full Code Here

Examples of tachyon.thrift.FileDoesNotExistException

      throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, TException {
    try {
      return mMasterInfo.addCheckpoint(workerId, fileId, fileSizeBytes, new TachyonURI(
          checkpointPath));
    } catch (FileNotFoundException e) {
      throw new FileDoesNotExistException(e.getMessage());
    }
  }
View Full Code Here

Examples of tachyon.thrift.FileDoesNotExistException

        parentUris.add(new TachyonURI(parents.get(k)));
      }
      return mMasterInfo.createDependency(parentUris, childrenUris, commandPrefix, data, comment,
          framework, frameworkVersion, DependencyType.getDependencyType(dependencyType));
    } catch (IOException e) {
      throw new FileDoesNotExistException(e.getMessage());
    }
  }
View Full Code Here

Examples of tachyon.thrift.FileDoesNotExistException

      BlockInfoException, TException {
    ClientBlockInfo ret = null;
    try {
      ret = mMasterInfo.getClientBlockInfo(blockId);
    } catch (IOException e) {
      throw new FileDoesNotExistException(e.getMessage());
    }
    return ret;
  }
View Full Code Here

Examples of tachyon.thrift.FileDoesNotExistException

        ret = mMasterInfo.getFileBlocks(fileId);
      } else {
        ret = mMasterInfo.getFileBlocks(new TachyonURI(path));
      }
    } catch (IOException e) {
      throw new FileDoesNotExistException(e.getMessage());
    }
    return ret;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.