public Boolean call() throws Exception { InterDatanodeProtocol remoteDatanode = null; try { File srcBlockFile = data.getBlockFile(srcNamespaceId, srcBlock); remoteDatanode = DataNode .createInterDataNodeProtocolProxy(target, getConf(), socketTimeout); remoteDatanode.copyBlockLocal(srcFileSystem, srcNamespaceId, srcBlock, dstNamespaceId, dstBlock, srcBlockFile.getAbsolutePath()); } catch (IOException e) { LOG.warn("Cross datanode local block copy failed", e); throw e; } finally { if (remoteDatanode != null) { stopDatanodeProxy(remoteDatanode); } } return true; } }