HDFS-17339:Skip cacheReport when one blockPool does not have CacheBlock on this DataNode (#6456). Contributed by lei w.
Signed-off-by: Shuyan Zhang <zhangshuyan@apache.org>
This commit is contained in:
parent
7272a3d960
commit
ac471d7daa
@ -503,6 +503,10 @@ DatanodeCommand cacheReport() throws IOException {
|
||||
|
||||
String bpid = bpos.getBlockPoolId();
|
||||
List<Long> blockIds = dn.getFSDataset().getCacheReport(bpid);
|
||||
// Skip cache report
|
||||
if (blockIds.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
long createTime = monotonicNow();
|
||||
|
||||
cmd = bpNamenode.cacheReport(bpRegistration, bpid, blockIds);
|
||||
|
Loading…
Reference in New Issue
Block a user