Examples of WccAttr


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

      LOG.debug("NFS SYMLINK, target: " + symData + " link: " + linkIdPath);
    }

    try {
      WccData dirWcc = response.getDirWcc();
      WccAttr preOpAttr = Nfs3Utils.getWccAttr(dfsClient, linkDirIdPath);
      dirWcc.setPreOpAttr(preOpAttr);

      dfsClient.createSymlink(symData, linkIdPath, false);
      // Set symlink attr is considered as to change the attr of the target
      // file. So no need to set symlink attr here after it's created.
View Full Code Here

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

    long offset = request.getOffset();
    int count = request.getCount();
    WriteStableHow stableHow = request.getStableHow();

    // Get file length, fail non-append call
    WccAttr preOpAttr = latestAttr.getWccAttr();
    if (LOG.isDebugEnabled()) {
      LOG.debug("requesed offset=" + offset + " and current filesize="
          + preOpAttr.getSize());
    }

    long nextOffset = getNextOffsetUnprotected();
    if (offset == nextOffset) {
      LOG.info("Add to the list, update nextOffset and notify the writer,"
View Full Code Here

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

      if (writeCtx.getDataState() == DataState.ALLOW_DUMP) {
        updateNonSequentialWriteInMemory(-count);
      }
     
      if (!writeCtx.getReplied()) {
        WccAttr preOpAttr = latestAttr.getWccAttr();
        WccData fileWcc = new WccData(preOpAttr, latestAttr);
        WRITE3Response response = new WRITE3Response(Nfs3Status.NFS3_OK,
            fileWcc, count, stableHow, Nfs3Constant.WRITE_COMMIT_VERF);
        Nfs3Utils.writeChannel(channel, response.send(new XDR(), xid));
      }
View Full Code Here

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

          + ", error:" + e);
    }
   
    // Reply error for pending writes
    LOG.info("There are " + pendingWrites.size() + " pending writes.");
    WccAttr preOpAttr = latestAttr.getWccAttr();
    while (!pendingWrites.isEmpty()) {
      OffsetRange key = pendingWrites.firstKey();
      LOG.info("Fail pending write: (" + key.getMin() + "," + key.getMax()
          + "), nextOffset=" + getNextOffsetUnprotected());
     
View Full Code Here

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

    long offset = request.getOffset();
    int count = request.getCount();
    WriteStableHow stableHow = request.getStableHow();

    // Get file length, fail non-append call
    WccAttr preOpAttr = latestAttr.getWccAttr();
    if (LOG.isDebugEnabled()) {
      LOG.debug("requesed offset=" + offset + " and current filesize="
          + preOpAttr.getSize());
    }

    long nextOffset = getNextOffsetUnprotected();
    if (offset == nextOffset) {
      LOG.info("Add to the list, update nextOffset and notify the writer,"
View Full Code Here

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

      if (writeCtx.getDataState() == WriteCtx.ALLOW_DUMP) {
        updateNonSequentialWriteInMemory(-count);
      }
     
      if (!writeCtx.getReplied()) {
        WccAttr preOpAttr = latestAttr.getWccAttr();
        WccData fileWcc = new WccData(preOpAttr, latestAttr);
        WRITE3Response response = new WRITE3Response(Nfs3Status.NFS3_OK,
            fileWcc, count, stableHow, Nfs3Constant.WRITE_COMMIT_VERF);
        Nfs3Utils.writeChannel(channel, response.send(new XDR(), xid));
      }
View Full Code Here

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

          + ", error:" + e);
    }
   
    // Reply error for pending writes
    LOG.info("There are " + pendingWrites.size() + " pending writes.");
    WccAttr preOpAttr = latestAttr.getWccAttr();
    while (!pendingWrites.isEmpty()) {
      OffsetRange key = pendingWrites.firstKey();
      LOG.info("Fail pending write: (" + key.getMin() + "," + key.getMax()
          + "), nextOffset=" + getNextOffsetUnprotected());
     
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.