Package fuse

Examples of fuse.FuseException


          directoryService.updateMetadata(meta.getPath(), nodeMeta);
          Statistics.incUpdateMeta(System.currentTimeMillis()-time);
        }
      }
    } catch (DirectoryServiceConnectionProblemException e) {
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    } catch (DirectoryServiceException e) {
      e.printStackTrace();
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    }

    return 0;
  }
View Full Code Here


          directoryService.updateMetadata(path, node);
          Statistics.incUpdateMeta(System.currentTimeMillis() - time);
        }

      } catch (DirectoryServiceConnectionProblemException e) {
        throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
      } catch (DirectoryServiceException e) {
        throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
      }

    }else{
      try {
        long time = System.currentTimeMillis();
View Full Code Here

    numOp[14]++;
    if(!config.isNonSharing()){
      try {
        namespace.removeMetadata(path);
      } catch (DirectoryServiceConnectionProblemException e) {
        throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
      } catch (DirectoryServiceException e) {
        try {
          long time = System.currentTimeMillis();
          directoryService.removeMetadata(path);
          Statistics.incDelMeta(System.currentTimeMillis()-time);
        } catch (DirectoryServiceException e1) {
          throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
        }
      }
    }else{
      try {
        long time = System.currentTimeMillis();
        directoryService.removeMetadata(path);
        Statistics.incDelMeta(System.currentTimeMillis()-time);
      } catch (DirectoryServiceException e1) {
        throw new FuseException(e1.getMessage()).initErrno(FuseException.ECONNABORTED);
      }
    }

    return 0;
  }
View Full Code Here

      FileStats fs = createDefaultFileStats(NodeType.SYMLINK, 0, -1);
      NodeMetadata m = new NodeMetadata(NodeType.SYMLINK, vec[0], vec[1], fs, from, defaultKey, null, null);

      directoryService.putMetadata(m);
    } catch (DirectoryServiceConnectionProblemException e) {
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    } catch (DirectoryServiceException e) {
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    }

    return 0;
  }
View Full Code Here

    numOp[11]++;
    NodeMetadata nm = null;
    try {
      nm = namespace.getMetadata(path);
    } catch (DirectoryServiceConnectionProblemException e) {
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    } catch (DirectoryServiceException e) {
      try {
        long time = System.currentTimeMillis();
        nm = directoryService.getMetadata(path);
        Statistics.incGetMeta(System.currentTimeMillis() - time);
      } catch (DirectoryServiceException e1) {
        throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
      }
    }
    link.put(nm.getId_path());

    return 0;
View Full Code Here

          long time = System.currentTimeMillis();
          metadata = directoryService.getMetadata(path);
          Statistics.incGetMeta(System.currentTimeMillis() - time);
          isInPNS = false;
        } catch (DirectoryServiceException e) {
          throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
        }
      }
    }else{
      try {
        long time = System.currentTimeMillis();
        metadata = directoryService.getMetadata(path);
        Statistics.incGetMeta(System.currentTimeMillis() - time);
      } catch (DirectoryServiceException e) {
        throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
      }
    }

    if(metadata.getStats().getNlink() == 1)
      daS.deleteData(metadata.getId_path());

    try {
      if(!config.isNonSharing() && isInPNS){
        namespace.removeMetadata(path);
      }else{
        long time = System.currentTimeMillis();
        directoryService.removeMetadata(path);
        Statistics.incDelMeta(System.currentTimeMillis()-time);
      }
    } catch (DirectoryServiceConnectionProblemException e) {
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    } catch (DirectoryServiceException e) {
      e.printStackTrace();
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    }

    return 0;
  }
View Full Code Here

      try {
        long time = System.currentTimeMillis();
        metadata = directoryService.getMetadata(path);
        Statistics.incGetMeta(System.currentTimeMillis() - time);
      } catch (DirectoryServiceException e) {
        throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
      }
    }

    FileStats fs = metadata.getStats();
    fs.setAtime(atime);
    fs.setMtime(mtime);
    NodeMetadata node = new NodeMetadata(metadata.getNodeType(), metadata.getParent(), metadata.getName(), fs, metadata.getId_path(), metadata.getKey(), metadata.getC_r(), metadata.getC_w());

    try {
      if(!config.isNonSharing() && metadata.getStats().isPrivate()){
        namespace.updateMetadata(path, node);
      }else{
        long time = System.currentTimeMillis();
        directoryService.updateMetadata(path, node);
        Statistics.incUpdateMeta(System.currentTimeMillis() - time);
      }

    } catch (DirectoryServiceConnectionProblemException e) {
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    } catch (DirectoryServiceException e) {
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    }

    return 0;
  }
View Full Code Here

      try {
        long time = System.currentTimeMillis();
        metadata = directoryService.getMetadata(path);
        Statistics.incGetMeta(System.currentTimeMillis() - time);
      } catch (DirectoryServiceException e) {
        throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
      }
    }

    FileStats fs = metadata.getStats();
    fs.setUid(uid);
    fs.setGid(gid);
    NodeMetadata node = new NodeMetadata(metadata.getNodeType(), metadata.getParent(), metadata.getName(), fs, metadata.getId_path(), metadata.getKey(), metadata.getC_r(), metadata.getC_w());

    try {
      if(!config.isNonSharing() && metadata.getStats().isPrivate()){
        namespace.updateMetadata(path, node);
      }else{
        long time = System.currentTimeMillis();
        directoryService.updateMetadata(path, node);
        Statistics.incUpdateMeta(System.currentTimeMillis() - time);
      }

    } catch (DirectoryServiceConnectionProblemException e) {
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    } catch (DirectoryServiceException e) {
      throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
    }
    return 0;
  }
View Full Code Here

        if(m.getStats().isPrivate())
          namespace.updateMetadata(path, m);
        else
          directoryService.updateMetadata(path, m);
      } catch (DirectoryServiceException e) {
        throw new FuseException(e.getMessage()).initErrno(FuseException.ENOENT);
      }
    }
    return 0;
  }
View Full Code Here

        else
          namespace.updateMetadata(path, m);
      }
    } catch (DirectoryServiceException e) {
      e.printStackTrace();
      throw new FuseException(e.getMessage()).initErrno(FuseException.ENOENT);
    }
    return 0;
  }
View Full Code Here

TOP

Related Classes of fuse.FuseException

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.