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()); } }
/** Iterate all source's blocks to remove moved ones */ private void removeMovedBlocks() { for (Iterator<DBlock> i = getBlockIterator(); i.hasNext();) { if (movedBlocks.contains(i.next().getBlock())) { i.remove(); } } }
InputStream unbufIn = sock.getInputStream(); ExtendedBlock eb = new ExtendedBlock(nnc.getBlockpoolID(), reportedBlock.getBlock()); final KeyManager km = nnc.getKeyManager(); Token<BlockTokenIdentifier> accessToken = km.getAccessToken(eb,
InputStream unbufIn = sock.getInputStream(); ExtendedBlock eb = new ExtendedBlock(nnc.getBlockpoolID(), block.getBlock()); final KeyManager km = nnc.getKeyManager(); Token<BlockTokenIdentifier> accessToken = km.getAccessToken(eb);
InputStream unbufIn = sock.getInputStream(); ExtendedBlock eb = new ExtendedBlock(nnc.getBlockpoolID(), block.getBlock()); final KeyManager km = nnc.getKeyManager(); Token<BlockTokenIdentifier> accessToken = km.getAccessToken(eb);
if (movedBlocks.contains(block.getBlock())) { return false;
if (movedBlocks.contains(block.getBlock())) { return false;
@Override public String toString() { final Block b = block != null ? block.getBlock() : null; String bStr = b != null ? (b + " with size=" + b.getNumBytes() + " ") : " "; return bStr + "from " + source.getDisplayName() + " to " + target .getDisplayName() + " through " + (proxySource != null ? proxySource .datanode : ""); }
/** Iterate all source's blocks to remove moved ones */ private void removeMovedBlocks() { for (Iterator<DBlock> i = getBlockIterator(); i.hasNext();) { if (movedBlocks.contains(i.next().getBlock())) { i.remove(); } } }
/** Iterate all source's blocks to remove moved ones */ private void removeMovedBlocks() { for (Iterator<DBlock> i = getBlockIterator(); i.hasNext();) { if (movedBlocks.contains(i.next().getBlock())) { i.remove(); } } }
@Override public String toString() { final Block b = block != null ? block.getBlock() : null; String bStr = b != null ? (b + " with size=" + b.getNumBytes() + " ") : " "; return bStr + "from " + source.getDisplayName() + " to " + target .getDisplayName() + " through " + (proxySource != null ? proxySource .datanode : ""); }
if (movedBlocks.contains(block.getBlock())) { return false;
long blockId = db.getBlock().getBlockId(); if (excludedPinnedBlocks.containsKey(blockId)) { Set<DatanodeInfo> locs = excludedPinnedBlocks.get(blockId);
@Override public String toString() { final Block b = reportedBlock != null ? reportedBlock.getBlock() : null; String bStr = b != null ? (b + " with size=" + b.getNumBytes() + " ") : " "; return bStr + "from " + source.getDisplayName() + " to " + target .getDisplayName() + " through " + (proxySource != null ? proxySource .datanode : ""); }