void addBlockPinningFailures(PendingMove pendingBlock) { synchronized (blockPinningFailures) { long blockId = pendingBlock.reportedBlock.getBlock().getBlockId(); Set<DatanodeInfo> pinnedLocations = blockPinningFailures.get(blockId); if (pinnedLocations == null) { pinnedLocations = new HashSet<>(); blockPinningFailures.put(blockId, pinnedLocations); } pinnedLocations.add(pendingBlock.getSource()); } }