HDFS-17312. packetsReceived metric should ignore heartbeat packet. (#6394)
Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
This commit is contained in:
parent
55b9f87698
commit
6a053765ee
@ -38,6 +38,7 @@
|
||||
import org.apache.hadoop.fs.ChecksumException;
|
||||
import org.apache.hadoop.fs.FSOutputSummer;
|
||||
import org.apache.hadoop.fs.StorageType;
|
||||
import org.apache.hadoop.hdfs.DFSPacket;
|
||||
import org.apache.hadoop.hdfs.DFSUtilClient;
|
||||
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
|
||||
import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
|
||||
@ -598,7 +599,9 @@ private int receivePacket() throws IOException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
datanode.metrics.incrPacketsReceived();
|
||||
if (seqno != DFSPacket.HEART_BEAT_SEQNO) {
|
||||
datanode.metrics.incrPacketsReceived();
|
||||
}
|
||||
//First write the packet to the mirror:
|
||||
if (mirrorOut != null && !mirrorError) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user