You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Vladimir Rodionov (JIRA)" <ji...@apache.org> on 2016/03/22 22:53:25 UTC
[jira] [Created] (HDFS-10194) FSDataOutputStream.write() allocates
new byte buffer on each operation
Vladimir Rodionov created HDFS-10194:
----------------------------------------
Summary: FSDataOutputStream.write() allocates new byte buffer on each operation
Key: HDFS-10194
URL: https://issues.apache.org/jira/browse/HDFS-10194
Project: Hadoop HDFS
Issue Type: Improvement
Components: hdfs-client
Affects Versions: 2.7.1
Reporter: Vladimir Rodionov
This is the code:
{code}
private DFSPacket createPacket(int packetSize, int chunksPerPkt, long offsetInBlock, long seqno, boolean lastPacketInBlock) throws InterruptedIOException {
final byte[] buf;
final int bufferSize = PacketHeader.PKT_MAX_HEADER_LEN + packetSize;
try {
buf = byteArrayManager.newByteArray(bufferSize);
} catch (InterruptedException ie) {
final InterruptedIOException iioe = new InterruptedIOException(
"seqno=" + seqno);
iioe.initCause(ie);
throw iioe;
}
return new DFSPacket(buf, chunksPerPkt, offsetInBlock, seqno,
getChecksumSize(), lastPacketInBlock);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)