private void copyBlockReplica() {
boolean error = false;
try {
// Timeout of 8 minutes for this RPC, this is sufficient since
// PendingReplicationMonitor timeout itself is 5 minutes.
ClientDatanodeProtocol cdp = getDatanodeConnection(srcDn, conf,
rpcTimeout);
LOG.debug("Fast Copy : Copying block " + src.getBlockName() + " to "
+ dst.getBlockName() + " on " + dstDn.getHostName());
// This is a blocking call that does not return until the block is
// successfully copied on the Datanode.
if (supportFederation) {
cdp.copyBlock(srcNamespaceId, src,
dstNamespaceId, dst, dstDn,
false);
} else {
cdp.copyBlock(src, dst, dstDn,
false);
}
} catch (Exception e) {
String errMsg = "Fast Copy : Failed for Copying block "
+ src.getBlockName() + " to " + dst.getBlockName() + " on "