/** * Call * {@link #transferToFully(FileChannel, long, int, MutableRate, MutableRate)} * with null <code>waitForWritableTime</code> and <code>transferToTime</code> */ public void transferToFully(FileChannel fileCh, long position, int count) throws IOException { transferToFully(fileCh, position, count, null, null); }
/** * Transfer data from a FileChannel to a SocketOutputStream. * * @param volume target volume. null if unavailable. * @param sockOut SocketOutputStream to write the data. * @param fileCh FileChannel from which to read data. * @param position position within the channel where the transfer begins. * @param count number of bytes to transfer. * @param waitTime returns the nanoseconds spent waiting for the socket * to become writable. * @param transferTime returns the nanoseconds spent transferring data. * @throws IOException */ public void transferToSocketFully( @Nullable FsVolumeSpi volume, SocketOutputStream sockOut, FileChannel fileCh, long position, int count, LongWritable waitTime, LongWritable transferTime) throws IOException { final long begin = profilingEventHook.beforeFileIo(volume, TRANSFER, count); try { faultInjectorEventHook.beforeFileIo(volume, TRANSFER, count); sockOut.transferToFully(fileCh, position, count, waitTime, transferTime); profilingEventHook.afterFileIo(volume, TRANSFER, begin, count); } catch (Exception e) { onFailure(volume, begin); throw e; } }
/** * Call * {@link #transferToFully(FileChannel, long, int, MutableRate, MutableRate)} * with null <code>waitForWritableTime</code> and <code>transferToTime</code> */ public void transferToFully(FileChannel fileCh, long position, int count) throws IOException { transferToFully(fileCh, position, count, null, null); }
/** * Call * {@link #transferToFully(FileChannel, long, int, MutableRate, MutableRate)} * with null <code>waitForWritableTime</code> and <code>transferToTime</code> */ public void transferToFully(FileChannel fileCh, long position, int count) throws IOException { transferToFully(fileCh, position, count, null, null); }
/** * Call * {@link #transferToFully(FileChannel, long, int, MutableRate, MutableRate)} * with null <code>waitForWritableTime</code> and <code>transferToTime</code> */ public void transferToFully(FileChannel fileCh, long position, int count) throws IOException { transferToFully(fileCh, position, count, null, null); }
/** * Call * {@link #transferToFully(FileChannel, long, int, MutableRate, MutableRate)} * with null <code>waitForWritableTime</code> and <code>transferToTime</code> */ public void transferToFully(FileChannel fileCh, long position, int count) throws IOException { transferToFully(fileCh, position, count, null, null); }
sockOut.transferToFully(((FileInputStream)blockIn).getChannel(), blockInPosition, len);
LongWritable waitTime = new LongWritable(); LongWritable transferTime = new LongWritable(); sockOut.transferToFully(fileCh, blockInPosition, dataLen, waitTime, transferTime); datanode.metrics.addSendDataPacketBlockedOnNetworkNanos(waitTime.get());
sockOut.transferToFully(fileChannel, blockInPosition, len);
LongWritable waitTime = new LongWritable(); LongWritable transferTime = new LongWritable(); sockOut.transferToFully(fileCh, blockInPosition, dataLen, waitTime, transferTime); datanode.metrics.addSendDataPacketBlockedOnNetworkNanos(waitTime.get());