Example usage for org.apache.hadoop.hdfs.protocol.datatransfer PipelineAck write

List of usage examples for org.apache.hadoop.hdfs.protocol.datatransfer PipelineAck write

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.protocol.datatransfer PipelineAck write.

Prototype

public void write(OutputStream out) throws IOException 

Source Link

Usage

From source file:com.mellanox.r4h.DataXceiverBase.java

License:Apache License

private void replyPacketAck(Msg msg, PipelineAck replyAck, boolean breakEventLoop, boolean lastPacketInBlock)
        throws IOException {
    msg.getOut().clear();/*  w  w  w.j  av  a  2s .  co  m*/
    OutputStream replyOut = new ByteBufferOutputStream(msg.getOut());
    replyAck.write(replyOut);
    replyOut.flush();

    if (LOG.isDebugEnabled()) {
        LOG.debug("queue ack reply for async response : " + replyAck + "\nuri=" + uri);
    }
    spw.queueAsyncReply(DataXceiverBase.this, msg, onFlightMsgs, breakEventLoop);
}