Java 类org.apache.hadoop.hdfs.server.datanode.ShortCircuitRegistry.NewShmInfo 实例源码

项目:hadoop    文件:DataXceiver.java   
private void sendShmSuccessResponse(DomainSocket sock, NewShmInfo shmInfo)
    throws IOException {
  DataNodeFaultInjector.get().sendShortCircuitShmResponse();
  ShortCircuitShmResponseProto.newBuilder().setStatus(SUCCESS).
      setId(PBHelper.convert(shmInfo.shmId)).build().
      writeDelimitedTo(socketOut);
  // Send the file descriptor for the shared memory segment.
  byte buf[] = new byte[] { (byte)0 };
  FileDescriptor shmFdArray[] =
      new FileDescriptor[] { shmInfo.stream.getFD() };
  sock.sendFileDescriptors(shmFdArray, buf, 0, buf.length);
}
项目:aliyun-oss-hadoop-fs    文件:DataXceiver.java   
private void sendShmSuccessResponse(DomainSocket sock, NewShmInfo shmInfo)
    throws IOException {
  DataNodeFaultInjector.get().sendShortCircuitShmResponse();
  ShortCircuitShmResponseProto.newBuilder().setStatus(SUCCESS).
      setId(PBHelperClient.convert(shmInfo.shmId)).build().
      writeDelimitedTo(socketOut);
  // Send the file descriptor for the shared memory segment.
  byte buf[] = new byte[] { (byte)0 };
  FileDescriptor shmFdArray[] =
      new FileDescriptor[] { shmInfo.stream.getFD() };
  sock.sendFileDescriptors(shmFdArray, buf, 0, buf.length);
}
项目:big-c    文件:DataXceiver.java   
private void sendShmSuccessResponse(DomainSocket sock, NewShmInfo shmInfo)
    throws IOException {
  DataNodeFaultInjector.get().sendShortCircuitShmResponse();
  ShortCircuitShmResponseProto.newBuilder().setStatus(SUCCESS).
      setId(PBHelper.convert(shmInfo.shmId)).build().
      writeDelimitedTo(socketOut);
  // Send the file descriptor for the shared memory segment.
  byte buf[] = new byte[] { (byte)0 };
  FileDescriptor shmFdArray[] =
      new FileDescriptor[] { shmInfo.stream.getFD() };
  sock.sendFileDescriptors(shmFdArray, buf, 0, buf.length);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:DataXceiver.java   
private void sendShmSuccessResponse(DomainSocket sock, NewShmInfo shmInfo)
    throws IOException {
  DataNodeFaultInjector.get().sendShortCircuitShmResponse();
  ShortCircuitShmResponseProto.newBuilder().setStatus(SUCCESS).
      setId(PBHelper.convert(shmInfo.shmId)).build().
      writeDelimitedTo(socketOut);
  // Send the file descriptor for the shared memory segment.
  byte buf[] = new byte[] { (byte)0 };
  FileDescriptor shmFdArray[] =
      new FileDescriptor[] { shmInfo.stream.getFD() };
  sock.sendFileDescriptors(shmFdArray, buf, 0, buf.length);
}
项目:FlexMap    文件:DataXceiver.java   
private void sendShmSuccessResponse(DomainSocket sock, NewShmInfo shmInfo)
    throws IOException {
  ShortCircuitShmResponseProto.newBuilder().setStatus(SUCCESS).
      setId(PBHelper.convert(shmInfo.shmId)).build().
      writeDelimitedTo(socketOut);
  // Send the file descriptor for the shared memory segment.
  byte buf[] = new byte[] { (byte)0 };
  FileDescriptor shmFdArray[] =
      new FileDescriptor[] { shmInfo.stream.getFD() };
  sock.sendFileDescriptors(shmFdArray, buf, 0, buf.length);
}
项目:hadoop-on-lustre2    文件:DataXceiver.java   
private void sendShmSuccessResponse(DomainSocket sock, NewShmInfo shmInfo)
    throws IOException {
  ShortCircuitShmResponseProto.newBuilder().setStatus(SUCCESS).
      setId(PBHelper.convert(shmInfo.shmId)).build().
      writeDelimitedTo(socketOut);
  // Send the file descriptor for the shared memory segment.
  byte buf[] = new byte[] { (byte)0 };
  FileDescriptor shmFdArray[] =
      new FileDescriptor[] { shmInfo.stream.getFD() };
  sock.sendFileDescriptors(shmFdArray, buf, 0, buf.length);
}