Package tachyon.thrift

Examples of tachyon.thrift.FileDoesNotExistException$FileDoesNotExistExceptionStandardSchemeFactory


  void _completeFile(int fileId, long opTimeMs) throws FileDoesNotExistException {
    synchronized (mRootLock) {
      Inode inode = mFileIdToInodes.get(fileId);

      if (inode == null) {
        throw new FileDoesNotExistException("File " + fileId + " does not exit.");
      }
      if (!inode.isFile()) {
        throw new FileDoesNotExistException("File " + fileId + " is not a file.");
      }

      addFile(fileId, ((InodeFile) inode).getDependencyId());

      ((InodeFile) inode).setComplete();
View Full Code Here


    LOG.info("setPinned(" + fileId + ", " + pinned + ")");
    synchronized (mRootLock) {
      Inode inode = mFileIdToInodes.get(fileId);

      if (inode == null) {
        throw new FileDoesNotExistException("Failed to find inode" + fileId);
      }

      _recomputePinnedFiles(inode, Optional.of(pinned), opTimeMs);
    }
  }
View Full Code Here

    int blockIndex = BlockInfo.computeBlockIndex(blockId);
    synchronized (mRootLock) {
      Inode inode = mFileIdToInodes.get(fileId);

      if (inode == null) {
        throw new FileDoesNotExistException("File " + fileId + " does not exist.");
      }
      if (inode.isDirectory()) {
        throw new FileDoesNotExistException("File " + fileId + " is a folder.");
      }

      InodeFile tFile = (InodeFile) inode;
      if (tFile.getNumberOfBlocks() <= blockIndex) {
        addBlock(tFile, new BlockInfo(tFile, blockIndex, length), System.currentTimeMillis());
View Full Code Here

  public long createNewBlock(int fileId) throws FileDoesNotExistException {
    synchronized (mRootLock) {
      Inode inode = mFileIdToInodes.get(fileId);

      if (inode == null) {
        throw new FileDoesNotExistException("File " + fileId + " does not exit.");
      }
      if (!inode.isFile()) {
        throw new FileDoesNotExistException("File " + fileId + " is not a file.");
      }

      return ((InodeFile) inode).getNewBlockId();
    }
  }
View Full Code Here

  public long getBlockIdBasedOnOffset(int fileId, long offset) throws FileDoesNotExistException {
    synchronized (mRootLock) {
      Inode inode = mFileIdToInodes.get(fileId);
      if (inode == null) {
        throw new FileDoesNotExistException("FileId " + fileId + " does not exist.");
      }
      if (!inode.isFile()) {
        throw new FileDoesNotExistException(fileId + " is not a file.");
      }

      return ((InodeFile) inode).getBlockIdBasedOnOffset(offset);
    }
  }
View Full Code Here

   */
  public List<BlockInfo> getBlockList(TachyonURI path) throws InvalidPathException,
      FileDoesNotExistException {
    Inode inode = getInode(path);
    if (inode == null) {
      throw new FileDoesNotExistException(path + " does not exist.");
    }
    if (!inode.isFile()) {
      throw new FileDoesNotExistException(path + " is not a file.");
    }
    InodeFile inodeFile = (InodeFile) inode;
    return inodeFile.getBlockList();
  }
View Full Code Here

      IOException, BlockInfoException {
    int fileId = BlockInfo.computeInodeId(blockId);
    synchronized (mRootLock) {
      Inode inode = mFileIdToInodes.get(fileId);
      if (inode == null || inode.isDirectory()) {
        throw new FileDoesNotExistException("FileId " + fileId + " does not exist.");
      }
      ClientBlockInfo ret =
          ((InodeFile) inode).getClientBlockInfo(BlockInfo.computeBlockIndex(blockId));
      LOG.debug("getClientBlockInfo: {} : {}", blockId, ret);
      return ret;
View Full Code Here

  public List<ClientBlockInfo> getFileBlocks(int fileId) throws FileDoesNotExistException,
      IOException {
    synchronized (mRootLock) {
      Inode inode = mFileIdToInodes.get(fileId);
      if (inode == null || inode.isDirectory()) {
        throw new FileDoesNotExistException("FileId " + fileId + " does not exist.");
      }
      List<ClientBlockInfo> ret = ((InodeFile) inode).getClientBlockInfos();
      LOG.debug("getFileLocations: {} {}", fileId, ret);
      return ret;
    }
View Full Code Here

      InvalidPathException, IOException {
    LOG.info("getFileLocations: " + path);
    synchronized (mRootLock) {
      Inode inode = getInode(path);
      if (inode == null) {
        throw new FileDoesNotExistException(path.toString());
      }
      return getFileBlocks(inode.getId());
    }
  }
View Full Code Here

      InvalidPathException {
    List<ClientFileInfo> ret = new ArrayList<ClientFileInfo>();

    Inode inode = getInode(path);
    if (inode == null) {
      throw new FileDoesNotExistException(path.toString());
    }

    if (inode.isDirectory()) {
      for (Inode child : ((InodeFolder) inode).getChildren()) {
        ret.add(child.generateClientFileInfo(CommonUtils.concat(path, child.getName())));
View Full Code Here

TOP

Related Classes of tachyon.thrift.FileDoesNotExistException$FileDoesNotExistExceptionStandardSchemeFactory

Copyright © 2018 www.massapicom. 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.