@Override public void transferBlock(final ExtendedBlock blk, final Token<BlockTokenIdentifier> blockToken, final String clientName, final DatanodeInfo[] targets, final StorageType[] targetStorageTypes, final String[] targetStorageIds) throws IOException { previousOpClientName = clientName; updateCurrentThreadName(Op.TRANSFER_BLOCK + " " + blk); final DataOutputStream out = new DataOutputStream( getOutputStream()); checkAccess(out, true, blk, blockToken, Op.TRANSFER_BLOCK, BlockTokenIdentifier.AccessMode.COPY, targetStorageTypes, targetStorageIds); try { datanode.transferReplicaForPipelineRecovery(blk, targets, targetStorageTypes, targetStorageIds, clientName); writeResponse(Status.SUCCESS, null, out); } catch (IOException ioe) { LOG.info("transferBlock {} received exception {}", blk, ioe.toString()); incrDatanodeNetworkErrors(); throw ioe; } finally { IOUtils.closeStream(out); } }
updateCurrentThreadName("Waiting for operation #" + (opsProcessed + 1)); LOG.debug("{}:Number of active connections is: {}", datanode.getDisplayName(), datanode.getXceiverCount()); updateCurrentThreadName("Cleaning up"); if (peer != null) { dataXceiverServer.closePeer(peer);
final DatanodeInfo proxySource, final String storageId) throws IOException { updateCurrentThreadName("Replacing block " + block + " from " + delHint); DataOutputStream replyOut = new DataOutputStream(getOutputStream()); checkAccess(replyOut, true, block, blockToken,
BlockChecksumOptions blockChecksumOptions) throws IOException { updateCurrentThreadName("Getting checksum for block " + block); final DataOutputStream out = new DataOutputStream( getOutputStream());
SlotId slotId, int maxVersion, boolean supportsReceiptVerification) throws IOException { updateCurrentThreadName("Passing file descriptors for block " + blk); DataOutputStream out = getBufferedOutputStream(); checkAccess(out, true, blk, token,
throws IOException { final ExtendedBlock block = stripedBlockInfo.getBlock(); updateCurrentThreadName("Getting checksum for block group" + block); final DataOutputStream out = new DataOutputStream(getOutputStream());
@Override public void copyBlock(final ExtendedBlock block, final Token<BlockTokenIdentifier> blockToken) throws IOException { updateCurrentThreadName("Copying block " + block); DataOutputStream reply = getBufferedOutputStream(); checkAccess(reply, true, block, blockToken, Op.COPY_BLOCK,
previousOpClientName = clientName; long read = 0; updateCurrentThreadName("Sending block " + block); OutputStream baseStream = getOutputStream(); DataOutputStream out = getBufferedOutputStream();
final String[] targetStorageIds) throws IOException { previousOpClientName = clientname; updateCurrentThreadName("Receiving block " + block); final boolean isDatanode = clientname.length() == 0; final boolean isClient = !isDatanode;
MetaDataInputStream checksumIn = null; DataOutputStream out = null; updateCurrentThreadName("reading metadata for block " + block); try { checksumIn = datanode.data.getMetaDataInputStream(namespaceId, block);
metadataIn, BUFFER_SIZE)); updateCurrentThreadName("getting checksum for block " + block); try {
DataOutputStream reply = null; boolean isOpSuccess = true; updateCurrentThreadName("Copying block " + block); try {
@Override public void transferBlock(final ExtendedBlock blk, final Token<BlockTokenIdentifier> blockToken, final String clientName, final DatanodeInfo[] targets, final StorageType[] targetStorageTypes) throws IOException { previousOpClientName = clientName; updateCurrentThreadName(Op.TRANSFER_BLOCK + " " + blk); final DataOutputStream out = new DataOutputStream( getOutputStream()); checkAccess(out, true, blk, blockToken, Op.TRANSFER_BLOCK, BlockTokenSecretManager.AccessMode.COPY); try { datanode.transferReplicaForPipelineRecovery(blk, targets, targetStorageTypes, clientName); writeResponse(Status.SUCCESS, null, out); } catch (IOException ioe) { LOG.info("transferBlock " + blk + " received exception " + ioe); incrDatanodeNetworkErrors(); throw ioe; } finally { IOUtils.closeStream(out); } }
@Override public void transferBlock(final ExtendedBlock blk, final Token<BlockTokenIdentifier> blockToken, final String clientName, final DatanodeInfo[] targets, final StorageType[] targetStorageTypes) throws IOException { previousOpClientName = clientName; updateCurrentThreadName(Op.TRANSFER_BLOCK + " " + blk); final DataOutputStream out = new DataOutputStream( getOutputStream()); checkAccess(out, true, blk, blockToken, Op.TRANSFER_BLOCK, BlockTokenSecretManager.AccessMode.COPY); try { datanode.transferReplicaForPipelineRecovery(blk, targets, targetStorageTypes, clientName); writeResponse(Status.SUCCESS, null, out); } catch (IOException ioe) { LOG.info("transferBlock " + blk + " received exception " + ioe); incrDatanodeNetworkErrors(); throw ioe; } finally { IOUtils.closeStream(out); } }
@Override public void blockChecksum(final ExtendedBlock block, final Token<BlockTokenIdentifier> blockToken) throws IOException { updateCurrentThreadName("Getting checksum for block " + block); final DataOutputStream out = new DataOutputStream( getOutputStream());
previousOpClientName = clientName; long read = 0; updateCurrentThreadName("Sending block " + block); OutputStream baseStream = getOutputStream(); DataOutputStream out = getBufferedOutputStream();
@Override public void copyBlock(final ExtendedBlock block, final Token<BlockTokenIdentifier> blockToken) throws IOException { updateCurrentThreadName("Copying block " + block); DataOutputStream reply = getBufferedOutputStream(); checkAccess(reply, true, block, blockToken,
@Override public void blockChecksum(final ExtendedBlock block, final Token<BlockTokenIdentifier> blockToken) throws IOException { updateCurrentThreadName("Getting checksum for block " + block); final DataOutputStream out = new DataOutputStream( getOutputStream());
previousOpClientName = clientName; long read = 0; updateCurrentThreadName("Sending block " + block); OutputStream baseStream = getOutputStream(); DataOutputStream out = getBufferedOutputStream();
@Override public void copyBlock(final ExtendedBlock block, final Token<BlockTokenIdentifier> blockToken) throws IOException { updateCurrentThreadName("Copying block " + block); DataOutputStream reply = getBufferedOutputStream(); checkAccess(reply, true, block, blockToken,