Examples of WccAttr


Examples of org.apache.hadoop.nfs.nfs3.response.WccAttr

      return null;
    }

    long size = fstat.isDir() ? Nfs3FileAttributes.getDirSize(fstat
        .getChildrenNum()) : fstat.getLen();
    return new WccAttr(size, new NfsTime(fstat.getModificationTime()),
        new NfsTime(fstat.getModificationTime()));
  }
View Full Code Here

Examples of org.apache.hadoop.nfs.nfs3.response.WccAttr

    return new WccAttr(size, new NfsTime(fstat.getModificationTime()),
        new NfsTime(fstat.getModificationTime()));
  }

  public static WccAttr getWccAttr(Nfs3FileAttributes attr) {
    return new WccAttr(attr.getSize(), attr.getMtime(), attr.getCtime());
  }
View Full Code Here

Examples of org.apache.hadoop.nfs.nfs3.response.WccAttr

      response.setStatus(Nfs3Status.NFS3ERR_INVAL);
      return response;
    }

    String fileIdPath = Nfs3Utils.getFileIdPath(handle);
    WccAttr preOpAttr = null;
    try {
      preOpAttr = Nfs3Utils.getWccAttr(dfsClient, fileIdPath);
      if (preOpAttr == null) {
        LOG.info("Can't get path for fileId:" + handle.getFileId());
        response.setStatus(Nfs3Status.NFS3ERR_STALE);
        return response;
      }
      if (request.isCheck()) {
        if (!preOpAttr.getCtime().equals(request.getCtime())) {
          WccData wccData = Nfs3Utils.createWccData(preOpAttr, dfsClient,
              fileIdPath, iug);
          return new SETATTR3Response(Nfs3Status.NFS3ERR_NOT_SYNC, wccData);
        }
      }
View Full Code Here

Examples of org.apache.hadoop.nfs.nfs3.response.WccAttr

      try {
        postOpAttr = writeManager.getFileAttr(dfsClient, handle, iug);
      } catch (IOException e1) {
        LOG.info("Can't get postOpAttr for fileId: " + handle.getFileId());
      }
      WccAttr attr = preOpAttr == null ? null : Nfs3Utils.getWccAttr(preOpAttr);
      WccData fileWcc = new WccData(attr, postOpAttr);
      return new WRITE3Response(Nfs3Status.NFS3ERR_IO, fileWcc, 0,
          request.getStableHow(), Nfs3Constant.WRITE_COMMIT_VERF);
    }
View Full Code Here

Examples of org.apache.hadoop.nfs.nfs3.response.WccAttr

      return new CREATE3Response(Nfs3Status.NFS3ERR_INVAL);
    }

    FSDataOutputStream fos = null;
    String dirFileIdPath = Nfs3Utils.getFileIdPath(dirHandle);
    WccAttr preOpDirAttr = null;
    Nfs3FileAttributes postOpObjAttr = null;
    FileHandle fileHandle = null;
    WccData dirWcc = null;
    try {
      preOpDirAttr = Nfs3Utils.getWccAttr(dfsClient, dirFileIdPath);
View Full Code Here

Examples of org.apache.hadoop.nfs.nfs3.response.WccAttr

          + " in dirHandle" + dirHandle);
      return new MKDIR3Response(Nfs3Status.NFS3ERR_INVAL);
    }

    String dirFileIdPath = Nfs3Utils.getFileIdPath(dirHandle);
    WccAttr preOpDirAttr = null;
    Nfs3FileAttributes postOpDirAttr = null;
    Nfs3FileAttributes postOpObjAttr = null;
    FileHandle objFileHandle = null;
    try {
      preOpDirAttr = Nfs3Utils.getWccAttr(dfsClient, dirFileIdPath);
View Full Code Here

Examples of org.apache.hadoop.nfs.nfs3.response.WccAttr

      LOG.debug("NFS REMOVE dir fileId: " + dirHandle.getFileId()
          + " fileName: " + fileName);
    }

    String dirFileIdPath = Nfs3Utils.getFileIdPath(dirHandle);
    WccAttr preOpDirAttr = null;
    Nfs3FileAttributes postOpDirAttr = null;
    try {
      preOpDirAttr = Nfs3Utils.getWccAttr(dfsClient, dirFileIdPath);
      if (preOpDirAttr == null) {
        LOG.info("Can't get path for dir fileId:" + dirHandle.getFileId());
View Full Code Here

Examples of org.apache.hadoop.nfs.nfs3.response.WccAttr

      LOG.debug("NFS RMDIR dir fileId: " + dirHandle.getFileId()
          + " fileName: " + fileName);
    }

    String dirFileIdPath = Nfs3Utils.getFileIdPath(dirHandle);
    WccAttr preOpDirAttr = null;
    Nfs3FileAttributes postOpDirAttr = null;
    try {
      preOpDirAttr = Nfs3Utils.getWccAttr(dfsClient, dirFileIdPath);
      if (preOpDirAttr == null) {
        LOG.info("Can't get path for dir fileId:" + dirHandle.getFileId());
View Full Code Here

Examples of org.apache.hadoop.nfs.nfs3.response.WccAttr

          + " to: " + toHandle.getFileId() + "/" + toName);
    }

    String fromDirFileIdPath = Nfs3Utils.getFileIdPath(fromHandle);
    String toDirFileIdPath = Nfs3Utils.getFileIdPath(toHandle);
    WccAttr fromPreOpAttr = null;
    WccAttr toPreOpAttr = null;
    WccData fromDirWcc = null;
    WccData toDirWcc = null;
    try {
      fromPreOpAttr = Nfs3Utils.getWccAttr(dfsClient, fromDirFileIdPath);
      if (fromPreOpAttr == null) {
View Full Code Here

Examples of org.apache.hadoop.nfs.nfs3.response.WccAttr

      LOG.debug("NFS COMMIT fileId: " + handle.getFileId() + " offset="
          + request.getOffset() + " count=" + request.getCount());
    }

    String fileIdPath = Nfs3Utils.getFileIdPath(handle);
    WccAttr preOpAttr = null;
    try {
      preOpAttr = Nfs3Utils.getWccAttr(dfsClient, fileIdPath);
      if (preOpAttr == null) {
        LOG.info("Can't get path for fileId:" + handle.getFileId());
        return new COMMIT3Response(Nfs3Status.NFS3ERR_STALE);
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.