/** * enqueue the seqno that is still be to acked by the downstream datanode. * @param seqno sequence number of the packet * @param lastPacketInBlock if true, this is the last packet in block * @param offsetInBlock offset of this packet in block */ void enqueue(final long seqno, final boolean lastPacketInBlock, final long offsetInBlock, final Status ackStatus) { final Packet p = new Packet(seqno, lastPacketInBlock, offsetInBlock, System.nanoTime(), ackStatus); if(LOG.isDebugEnabled()) { LOG.debug(myString + ": enqueue " + p); } synchronized(ackQueue) { if (running) { ackQueue.addLast(p); ackQueue.notifyAll(); } } }
pkt.waitForPersistent(); } catch (InterruptedException ine) { isInterrupted = true;
ackPacket.setPersistent();
/** * enqueue the seqno that is still be to acked by the downstream datanode. * @param seqno sequence number of the packet * @param lastPacketInBlock if true, this is the last packet in block * @param offsetInBlock offset of this packet in block */ void enqueue(final long seqno, final boolean lastPacketInBlock, final long offsetInBlock, final Status ackStatus) { final Packet p = new Packet(seqno, lastPacketInBlock, offsetInBlock, System.nanoTime(), ackStatus); if(LOG.isDebugEnabled()) { LOG.debug(myString + ": enqueue " + p); } synchronized(ackQueue) { if (running) { ackQueue.addLast(p); ackQueue.notifyAll(); } } }
/** * enqueue the seqno that is still be to acked by the downstream datanode. * @param seqno sequence number of the packet * @param lastPacketInBlock if true, this is the last packet in block * @param offsetInBlock offset of this packet in block */ void enqueue(final long seqno, final boolean lastPacketInBlock, final long offsetInBlock, final Status ackStatus) { final Packet p = new Packet(seqno, lastPacketInBlock, offsetInBlock, System.nanoTime(), ackStatus); if(LOG.isDebugEnabled()) { LOG.debug(myString + ": enqueue " + p); } synchronized(ackQueue) { if (running) { ackQueue.addLast(p); ackQueue.notifyAll(); } } }
/** * enqueue the seqno that is still be to acked by the downstream datanode. * @param seqno * @param lastPacketInBlock */ synchronized Packet enqueue(long seqno, boolean lastPacketInBlock, long offsetInBlock) { if (running) { if (LOG.isDebugEnabled()) { LOG.debug("PacketResponder " + numTargets + " adding seqno " + seqno + " with new offset in Block " + offsetInBlock + " to ack queue."); } Packet newPacket = new Packet(seqno, lastPacketInBlock, offsetInBlock); ackQueue.addLast(newPacket); notifyAll(); return newPacket; } return null; }
/** * enqueue the seqno that is still be to acked by the downstream datanode. * @param seqno * @param lastPacketInBlock */ synchronized void enqueue(long seqno, boolean lastPacketInBlock) { if (running) { LOG.debug("PacketResponder " + numTargets + " adding seqno " + seqno + " to ack queue."); ackQueue.addLast(new Packet(seqno, lastPacketInBlock)); notifyAll(); } }