当前位置: 首页>>代码示例>>Java>>正文


Java Nfs3Status.NFS3_OK属性代码示例

本文整理汇总了Java中org.apache.hadoop.nfs.nfs3.Nfs3Status.NFS3_OK属性的典型用法代码示例。如果您正苦于以下问题:Java Nfs3Status.NFS3_OK属性的具体用法?Java Nfs3Status.NFS3_OK怎么用?Java Nfs3Status.NFS3_OK使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.hadoop.nfs.nfs3.Nfs3Status的用法示例。


在下文中一共展示了Nfs3Status.NFS3_OK属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: serialize

@Override
public XDR serialize(XDR out, int xid, Verifier verifier) {
  super.serialize(out, xid, verifier);
  if (getStatus() == Nfs3Status.NFS3_OK) {
    out.writeBoolean(true); // Handle follows
    objHandle.serialize(out);
    out.writeBoolean(true); // Attributes follow
    postOpObjAttr.serialize(out);
  }
  if (dirWcc == null) {
    dirWcc = new WccData(null, null);
  }
  dirWcc.serialize(out);

  return out;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:16,代码来源:CREATE3Response.java

示例2: deserialize

public static PATHCONF3Response deserialize(XDR xdr) {
  int status = xdr.readInt();
  xdr.readBoolean();
  Nfs3FileAttributes objPostOpAttr = Nfs3FileAttributes.deserialize(xdr);
  int linkMax = 0;
  int nameMax = 0;
  boolean noTrunc = false;
  boolean chownRestricted = false;
  boolean caseInsensitive = false;
  boolean casePreserving = false;

  if (status == Nfs3Status.NFS3_OK) {
    linkMax = xdr.readInt();
    nameMax = xdr.readInt();
    noTrunc = xdr.readBoolean();
    chownRestricted = xdr.readBoolean();
    caseInsensitive = xdr.readBoolean();
    casePreserving = xdr.readBoolean();
  }
  return new PATHCONF3Response(status, objPostOpAttr, linkMax, nameMax,
      noTrunc, chownRestricted, caseInsensitive, casePreserving);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:22,代码来源:PATHCONF3Response.java

示例3: serialize

@Override
public XDR serialize(XDR xdr, int xid, Verifier verifier) {
  super.serialize(xdr, xid, verifier);
  xdr.writeBoolean(true); // Attributes follow
  postOpDirAttr.serialize(xdr);

  if (getStatus() == Nfs3Status.NFS3_OK) {
    xdr.writeLongAsHyper(cookieVerf);
    for (Entry3 e : dirList.entries) {
      xdr.writeBoolean(true); // Value follows
      e.seralize(xdr);
    }

    xdr.writeBoolean(false);
    xdr.writeBoolean(dirList.eof);
  }
  return xdr;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:READDIR3Response.java

示例4: deserialize

public static FSSTAT3Response deserialize(XDR xdr) {
  int status = xdr.readInt();
  xdr.readBoolean();
  Nfs3FileAttributes postOpAttr = Nfs3FileAttributes.deserialize(xdr);
  long tbytes = 0;
  long fbytes = 0;
  long abytes = 0;
  long tfiles = 0;
  long ffiles = 0;
  long afiles = 0;
  int invarsec = 0;

  if (status == Nfs3Status.NFS3_OK) {
    tbytes = xdr.readHyper();
    fbytes = xdr.readHyper();
    abytes = xdr.readHyper();
    tfiles = xdr.readHyper();
    ffiles = xdr.readHyper();
    afiles = xdr.readHyper();
    invarsec = xdr.readInt();
  }
  return new FSSTAT3Response(status, postOpAttr, tbytes, fbytes, abytes,
      tfiles, ffiles, afiles, invarsec);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:24,代码来源:FSSTAT3Response.java

示例5: deserialize

public static READDIRPLUS3Response deserialize(XDR xdr) {
  int status = xdr.readInt();
  xdr.readBoolean();
  Nfs3FileAttributes postOpDirAttr = Nfs3FileAttributes.deserialize(xdr);
  long cookieVerf = 0;
  ArrayList<EntryPlus3> entries = new ArrayList<EntryPlus3>();
  DirListPlus3 dirList = null;

  if (status == Nfs3Status.NFS3_OK) {
    cookieVerf = xdr.readHyper();
    while (xdr.readBoolean()) {
      EntryPlus3 e = EntryPlus3.deseralize(xdr);
      entries.add(e);
    }
    boolean eof = xdr.readBoolean();
    EntryPlus3[] allEntries = new EntryPlus3[entries.size()];
    entries.toArray(allEntries);
    dirList = new DirListPlus3(allEntries, eof);
  }
  return new READDIRPLUS3Response(status, postOpDirAttr, cookieVerf, dirList);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:READDIRPLUS3Response.java

示例6: serialize

@Override
public XDR serialize(XDR out, int xid, Verifier verifier) {
  super.serialize(out, xid, verifier);
  out.writeBoolean(true);
  postOpAttr.serialize(out);

  if (getStatus() == Nfs3Status.NFS3_OK) {
    out.writeInt(rtmax);
    out.writeInt(rtpref);
    out.writeInt(rtmult);
    out.writeInt(wtmax);
    out.writeInt(wtpref);
    out.writeInt(wtmult);
    out.writeInt(dtpref);
    out.writeLongAsHyper(maxFileSize);
    timeDelta.serialize(out);
    out.writeInt(properties);
 }
  return out;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:20,代码来源:FSINFO3Response.java

示例7: deserialize

public static READDIR3Response deserialize(XDR xdr) {
  int status = xdr.readInt();
  xdr.readBoolean();
  Nfs3FileAttributes postOpDirAttr = Nfs3FileAttributes.deserialize(xdr);
  long cookieVerf = 0;
  ArrayList<Entry3> entries = new ArrayList<Entry3>();
  DirList3 dirList = null;

  if (status == Nfs3Status.NFS3_OK) {
    cookieVerf = xdr.readHyper();
    while (xdr.readBoolean()) {
      Entry3 e =  Entry3.deserialzie(xdr);
      entries.add(e);
    }
    boolean eof = xdr.readBoolean();
    Entry3[] allEntries = new Entry3[entries.size()];
    entries.toArray(allEntries);
    dirList = new DirList3(allEntries, eof);
  }
  return new READDIR3Response(status, postOpDirAttr, cookieVerf, dirList);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:21,代码来源:READDIR3Response.java

示例8: deserialize

public static WRITE3Response deserialize(XDR xdr) {
  int status = xdr.readInt();
  WccData fileWcc = WccData.deserialize(xdr);
  int count = 0;
  WriteStableHow stableHow = null;
  long verifier = 0;

  if (status == Nfs3Status.NFS3_OK) {
    count = xdr.readInt();
    int how = xdr.readInt();
    stableHow = WriteStableHow.values()[how];
    verifier = xdr.readHyper();
  }
  return new WRITE3Response(status, fileWcc, count, stableHow, verifier);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:15,代码来源:WRITE3Response.java

示例9: serialize

@Override
public XDR serialize(XDR out, int xid, Verifier verifier) {
  super.serialize(out, xid, verifier);
  out.writeBoolean(true); // Attribute follows
  postOpAttr.serialize(out);

  if (getStatus() == Nfs3Status.NFS3_OK) {
    out.writeInt(count);
    out.writeBoolean(eof);
    out.writeInt(count);
    out.writeFixedOpaque(data.array(), count);
  }
  return out;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:READ3Response.java

示例10: deserialize

public static ACCESS3Response deserialize(XDR xdr) {
  int status = xdr.readInt();
  Nfs3FileAttributes postOpAttr = null;
  int access = 0;

  if (status == Nfs3Status.NFS3_OK) {
    postOpAttr = Nfs3FileAttributes.deserialize(xdr);
    access = xdr.readInt();
  }
  return new ACCESS3Response(status, postOpAttr, access);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:ACCESS3Response.java

示例11: messageReceived

@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
  // Get handle from create response
  ChannelBuffer buf = (ChannelBuffer) e.getMessage();
  XDR rsp = new XDR(buf.array());
  if (rsp.getBytes().length == 0) {
    LOG.info("rsp length is zero, why?");
    return;
  }
  LOG.info("rsp length=" + rsp.getBytes().length);

  RpcReply reply = RpcReply.read(rsp);
  int xid = reply.getXid();
  // Only process the create response
  if (xid != 0x8000004c) {
    return;
  }
  int status = rsp.readInt();
  if (status != Nfs3Status.NFS3_OK) {
    LOG.error("Create failed, status =" + status);
    return;
  }
  LOG.info("Create succeeded");
  rsp.readBoolean(); // value follow
  handle = new FileHandle();
  handle.deserialize(rsp);
  channel = e.getChannel();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:28,代码来源:TestOutOfOrderWrite.java

示例12: deserialize

public static CREATE3Response deserialize(XDR xdr) {
  int status = xdr.readInt();
  FileHandle objHandle = new FileHandle();
  Nfs3FileAttributes postOpObjAttr = null;

  if (status == Nfs3Status.NFS3_OK) {
    xdr.readBoolean();
    objHandle.deserialize(xdr);
    xdr.readBoolean();
    postOpObjAttr = Nfs3FileAttributes.deserialize(xdr);
  }

  WccData dirWcc = WccData.deserialize(xdr);
  return new CREATE3Response(status, objHandle, postOpObjAttr, dirWcc);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:15,代码来源:CREATE3Response.java

示例13: deserialize

public static MKDIR3Response deserialize(XDR xdr) {
  int status = xdr.readInt();
  FileHandle objFileHandle = new FileHandle();
  Nfs3FileAttributes objAttr = null;
  WccData dirWcc;

  if (status == Nfs3Status.NFS3_OK) {
    xdr.readBoolean();
    objFileHandle.deserialize(xdr);
    xdr.readBoolean();
    objAttr = Nfs3FileAttributes.deserialize(xdr);
  }
  dirWcc = WccData.deserialize(xdr);
  return new MKDIR3Response(status, objFileHandle, objAttr, dirWcc);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:15,代码来源:MKDIR3Response.java

示例14: serialize

@Override
public XDR serialize(XDR out, int xid, Verifier verifier) {
  super.serialize(out, xid, verifier);
  if (getStatus() == Nfs3Status.NFS3_OK) {
    out.writeBoolean(true); // Handle follows
    objFileHandle.serialize(out);
    out.writeBoolean(true); // Attributes follow
    objAttr.serialize(out);
  }
  dirWcc.serialize(out);
  return out;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:MKDIR3Response.java

示例15: serialize

@Override
public XDR serialize(XDR out, int xid, Verifier verifier) {
  super.serialize(out, xid, verifier);
  if (this.getStatus() == Nfs3Status.NFS3_OK) {
    out.writeBoolean(true);
    objFileHandle.serialize(out);
    out.writeBoolean(true);
    objPostOpAttr.serialize(out);
  }
  dirWcc.serialize(out);
  
  return out;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:MKNOD3Response.java


注:本文中的org.apache.hadoop.nfs.nfs3.Nfs3Status.NFS3_OK属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。