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


Java XDR.readHyper方法代码示例

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


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

示例1: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
public static CREATE3Request deserialize(XDR xdr) throws IOException {
  FileHandle handle = readHandle(xdr);
  String name = xdr.readString();
  int mode = xdr.readInt();
  SetAttr3 objAttr = new SetAttr3();
  long verf = 0;
  if ((mode == Nfs3Constant.CREATE_UNCHECKED)
      || (mode == Nfs3Constant.CREATE_GUARDED)) {
    objAttr.deserialize(xdr);
  } else if (mode == Nfs3Constant.CREATE_EXCLUSIVE) {
    verf = xdr.readHyper();
  } else {
    throw new IOException("Wrong create mode:" + mode);
  }
  return new CREATE3Request(handle, name, mode, objAttr, verf);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:CREATE3Request.java

示例2: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
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:naver,项目名称:hadoop,代码行数:22,代码来源:READDIR3Response.java

示例3: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
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,代码行数:25,代码来源:FSSTAT3Response.java

示例4: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
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,代码行数:22,代码来源:READDIRPLUS3Response.java

示例5: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
public static Nfs3FileAttributes deserialize(XDR xdr) {
  Nfs3FileAttributes attr = new Nfs3FileAttributes();
  attr.type = xdr.readInt();
  attr.mode = xdr.readInt();
  attr.nlink = xdr.readInt();
  attr.uid = xdr.readInt();
  attr.gid = xdr.readInt();
  attr.size = xdr.readHyper();
  attr.used = xdr.readHyper();
  attr.rdev = new Specdata3(xdr.readInt(), xdr.readInt());
  attr.fsid = xdr.readHyper();
  attr.fileId = xdr.readHyper();
  attr.atime = NfsTime.deserialize(xdr);
  attr.mtime = NfsTime.deserialize(xdr);
  attr.ctime = NfsTime.deserialize(xdr);
  return attr;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:Nfs3FileAttributes.java

示例6: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
public static READDIRPLUS3Request deserialize(XDR xdr) throws IOException {
  FileHandle handle = readHandle(xdr);
  long cookie = xdr.readHyper();
  long cookieVerf = xdr.readHyper();
  int dirCount = xdr.readInt();
  int maxCount = xdr.readInt();
  return new READDIRPLUS3Request(handle, cookie, cookieVerf, dirCount,
      maxCount);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:10,代码来源:READDIRPLUS3Request.java

示例7: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
public static WRITE3Request deserialize(XDR xdr) throws IOException {
  FileHandle handle = readHandle(xdr);
  long offset = xdr.readHyper();
  int count = xdr.readInt();
  WriteStableHow stableHow = WriteStableHow.fromValue(xdr.readInt());
  ByteBuffer data = ByteBuffer.wrap(xdr.readFixedOpaque(xdr.readInt()));
  return new WRITE3Request(handle, offset, count, stableHow, data);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:WRITE3Request.java

示例8: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
public static READDIR3Request deserialize(XDR xdr) throws IOException {
  FileHandle handle = readHandle(xdr);
  long cookie = xdr.readHyper();
  long cookieVerf = xdr.readHyper();
  int count = xdr.readInt();
  return new READDIR3Request(handle, cookie, cookieVerf, count);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:READDIR3Request.java

示例9: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
public static FSINFO3Response deserialize(XDR xdr) {
  int status = xdr.readInt();
  xdr.readBoolean();
  Nfs3FileAttributes postOpObjAttr = Nfs3FileAttributes.deserialize(xdr);
  int rtmax = 0;
  int rtpref = 0;
  int rtmult = 0;
  int wtmax = 0;
  int wtpref = 0;
  int wtmult = 0;
  int dtpref = 0;
  long maxFileSize = 0;
  NfsTime timeDelta = null;
  int properties = 0;

  if (status == Nfs3Status.NFS3_OK) {
    rtmax = xdr.readInt();
    rtpref = xdr.readInt();
    rtmult = xdr.readInt();
    wtmax = xdr.readInt();
    wtpref = xdr.readInt();
    wtmult = xdr.readInt();
    dtpref = xdr.readInt();
    maxFileSize = xdr.readHyper();
    timeDelta = NfsTime.deserialize(xdr);
    properties = xdr.readInt();
  }
  return new FSINFO3Response(status, postOpObjAttr, rtmax, rtpref, rtmult,
      wtmax, wtpref, wtmult, dtpref, maxFileSize, timeDelta, properties);

}
 
开发者ID:naver,项目名称:hadoop,代码行数:32,代码来源:FSINFO3Response.java

示例10: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
public static COMMIT3Response deserialize(XDR xdr) {
  int status = xdr.readInt();
  long verf = 0;
  WccData fileWcc = WccData.deserialize(xdr);
  if (status == Nfs3Status.NFS3_OK) {
    verf = xdr.readHyper();
  }
  return new COMMIT3Response(status, fileWcc, verf);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:10,代码来源:COMMIT3Response.java

示例11: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
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,代码行数:16,代码来源:WRITE3Response.java

示例12: deseralize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
static EntryPlus3 deseralize(XDR xdr) {
  long fileId = xdr.readHyper();
  String name = xdr.readString();
  long cookie = xdr.readHyper();
  xdr.readBoolean();
  Nfs3FileAttributes nameAttr = Nfs3FileAttributes.deserialize(xdr);
  FileHandle objFileHandle = new FileHandle();
  objFileHandle.deserialize(xdr);
  return new EntryPlus3(fileId, name, cookie, nameAttr, objFileHandle);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:READDIRPLUS3Response.java

示例13: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
public static COMMIT3Request deserialize(XDR xdr) throws IOException {
  FileHandle handle = readHandle(xdr);
  long offset = xdr.readHyper();
  int count = xdr.readInt();
  return new COMMIT3Request(handle, offset, count);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:COMMIT3Request.java

示例14: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
public static READ3Request deserialize(XDR xdr) throws IOException {
  FileHandle handle = readHandle(xdr);
  long offset = xdr.readHyper();
  int count = xdr.readInt();
  return new READ3Request(handle, offset, count);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:READ3Request.java

示例15: deserialize

import org.apache.hadoop.oncrpc.XDR; //导入方法依赖的package包/类
public static WccAttr deserialize(XDR xdr) {
  long size = xdr.readHyper();
  NfsTime mtime = NfsTime.deserialize(xdr);
  NfsTime ctime = NfsTime.deserialize(xdr);
  return new WccAttr(size, mtime, ctime);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:WccAttr.java


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