HDFS-16819. Modify patch based on comments
This commit is contained in:
parent
09dacd784a
commit
77cc37d29a
|
@ -1888,7 +1888,6 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
|
||||||
invalidate(b.getBlockPoolId(), new Block[] { lastFoundReplicaInfo },
|
invalidate(b.getBlockPoolId(), new Block[] { lastFoundReplicaInfo },
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
long startHoldLockTimeMs = Time.monotonicNow();
|
|
||||||
FsVolumeReference ref = volumes.getNextVolume(storageType, storageId, b
|
FsVolumeReference ref = volumes.getNextVolume(storageType, storageId, b
|
||||||
.getNumBytes());
|
.getNumBytes());
|
||||||
FsVolumeImpl v = (FsVolumeImpl) ref.getVolume();
|
FsVolumeImpl v = (FsVolumeImpl) ref.getVolume();
|
||||||
|
@ -1909,7 +1908,7 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
|
||||||
} finally {
|
} finally {
|
||||||
if (dataNodeMetrics != null) {
|
if (dataNodeMetrics != null) {
|
||||||
// Create temporary operation hold write lock once.
|
// Create temporary operation hold write lock once.
|
||||||
long createTemporaryOpMs = Time.monotonicNow() - startHoldLockTimeMs;
|
long createTemporaryOpMs = Time.monotonicNow() - startTimeMs;
|
||||||
dataNodeMetrics.addCreateTemporaryOp(createTemporaryOpMs);
|
dataNodeMetrics.addCreateTemporaryOp(createTemporaryOpMs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue