HDFS-7399. Lack of synchronization in DFSOutputStream#Packet#getLastByteOffsetBlock() (Contributed by Vinayakumar B)
(cherry picked from commit 6783d17fcf
)
This commit is contained in:
parent
5d3c130e8f
commit
5bb47d0418
|
@ -178,6 +178,9 @@ Release 2.7.0 - UNRELEASED
|
||||||
HDFS-7395. BlockIdManager#clear() bails out when resetting the
|
HDFS-7395. BlockIdManager#clear() bails out when resetting the
|
||||||
GenerationStampV1Limit. (wheat9)
|
GenerationStampV1Limit. (wheat9)
|
||||||
|
|
||||||
|
HDFS-7399. Lack of synchronization in
|
||||||
|
DFSOutputStream#Packet#getLastByteOffsetBlock() (vinayakumarb)
|
||||||
|
|
||||||
Release 2.6.0 - 2014-11-18
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -342,12 +342,12 @@ public class DFSOutputStream extends FSOutputSummer
|
||||||
bam.release(buf);
|
bam.release(buf);
|
||||||
buf = null;
|
buf = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the packet's last byte's offset in the block
|
// get the packet's last byte's offset in the block
|
||||||
long getLastByteOffsetBlock() {
|
synchronized long getLastByteOffsetBlock() {
|
||||||
return offsetInBlock + dataPos - dataStart;
|
return offsetInBlock + dataPos - dataStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if this packet is a heart beat packet
|
* Check if this packet is a heart beat packet
|
||||||
* @return true if the sequence number is HEART_BEAT_SEQNO
|
* @return true if the sequence number is HEART_BEAT_SEQNO
|
||||||
|
|
Loading…
Reference in New Issue