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


Java RpcCall.write方法代码示例

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


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

示例1: create

import org.apache.hadoop.oncrpc.RpcCall; //导入方法依赖的package包/类
static XDR create() {
  XDR request = new XDR();
  RpcCall.write(request, 0x8000004c, Nfs3Constant.PROGRAM,
      Nfs3Constant.VERSION, Nfs3Constant.NFSPROC3_CREATE);

  // credentials
  request.writeInt(0); // auth null
  request.writeInt(0); // length zero
  // verifier
  request.writeInt(0); // auth null
  request.writeInt(0); // length zero

  SetAttr3 objAttr = new SetAttr3();
  CREATE3Request createReq = new CREATE3Request(new FileHandle("/"),
      "out-of-order-write" + System.currentTimeMillis(), 0, objAttr, 0);
  createReq.serialize(request);
  return request;
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:19,代码来源:TestOutOfOrderWrite.java

示例2: write

import org.apache.hadoop.oncrpc.RpcCall; //导入方法依赖的package包/类
static XDR write(FileHandle handle, int xid, long offset, int count,
    byte[] data) {
  XDR request = new XDR();
  RpcCall.write(request, xid, Nfs3Constant.PROGRAM, Nfs3Constant.VERSION,
      Nfs3Constant.NFSPROC3_WRITE);

  // credentials
  request.writeInt(0); // auth null
  request.writeInt(0); // length zero
  // verifier
  request.writeInt(0); // auth null
  request.writeInt(0); // length zero
  WRITE3Request write1 = new WRITE3Request(handle, offset, count,
      WriteStableHow.UNSTABLE, ByteBuffer.wrap(data));
  write1.serialize(request);
  return request;
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:18,代码来源:TestOutOfOrderWrite.java

示例3: create

import org.apache.hadoop.oncrpc.RpcCall; //导入方法依赖的package包/类
public static XDR create(PortmapMapping mapping, boolean set) {
  XDR request = new XDR();
  int procedure = set ? RpcProgramPortmap.PMAPPROC_SET
      : RpcProgramPortmap.PMAPPROC_UNSET;
  RpcCall call = RpcCall.getInstance(
      RpcUtil.getNewXid(String.valueOf(RpcProgramPortmap.PROGRAM)),
      RpcProgramPortmap.PROGRAM, RpcProgramPortmap.VERSION, procedure,
      new CredentialsNone(), new VerifierNone());
  call.write(request);
  return mapping.serialize(request);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:PortmapRequest.java

示例4: createPortmapXDRheader

import org.apache.hadoop.oncrpc.RpcCall; //导入方法依赖的package包/类
static void createPortmapXDRheader(XDR xdr_out, int procedure) {
    // TODO: Move this to RpcRequest
    RpcCall.write(xdr_out, 0, 100000, 2, procedure);
    xdr_out.writeInt(0); //no auth
    xdr_out.writeInt(0);
    xdr_out.writeInt(0);
    xdr_out.writeInt(0);
    
    /*
    xdr_out.putInt(1); //unix auth
    xdr_out.putVariableOpaque(new byte[20]);
    xdr_out.putInt(0);
    xdr_out.putInt(0);
*/
  }
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:16,代码来源:TestPortmapRegister.java

示例5: create

import org.apache.hadoop.oncrpc.RpcCall; //导入方法依赖的package包/类
public static XDR create(PortmapMapping mapping) {
  XDR request = new XDR();
  RpcCall.write(request,
      RpcUtil.getNewXid(String.valueOf(RpcProgramPortmap.PROGRAM)),
      RpcProgramPortmap.PROGRAM, RpcProgramPortmap.VERSION,
      Procedure.PMAPPROC_SET.getValue());
  request.writeInt(AuthFlavor.AUTH_NONE.getValue());
  request.writeInt(0);
  request.writeInt(0);
  request.writeInt(0);
  return mapping.serialize(request);
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:13,代码来源:PortmapRequest.java

示例6: create

import org.apache.hadoop.oncrpc.RpcCall; //导入方法依赖的package包/类
public static XDR create(PortmapMapping mapping) {
  XDR request = new XDR();
  RpcCall call = RpcCall.getInstance(
      RpcUtil.getNewXid(String.valueOf(RpcProgramPortmap.PROGRAM)),
      RpcProgramPortmap.PROGRAM, RpcProgramPortmap.VERSION,
      Procedure.PMAPPROC_SET.getValue(), new CredentialsNone(),
      new VerifierNone());
  call.write(request);
  return mapping.serialize(request);
}
 
开发者ID:chendave,项目名称:hadoop-TCP,代码行数:11,代码来源:PortmapRequest.java

示例7: createPortmapXDRheader

import org.apache.hadoop.oncrpc.RpcCall; //导入方法依赖的package包/类
static void createPortmapXDRheader(XDR xdr_out, int procedure) {
  // Make this a method
  RpcCall.write(xdr_out, 0, 100000, 2, procedure);
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:5,代码来源:TestUdpServer.java


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