// servers before modifying BnP. Otherwise, servers will immediately
// using http w/o going through RESTHdfsClient and the operations
// will fail.
sourceFileUrl = sourceFileUrl.replace("webhdfs", "http");
URL sourceUrl = new URL(sourceFileUrl);
RestFileSystem rfs = new RestFileSystem(sourceUrl.getProtocol() + "://"
+ sourceUrl.getHost() + ":"
+ sourceUrl.getPort());
String fullyQualifiedFileName = sourceUrl.getFile();
CopyStats stats = new CopyStats(fullyQualifiedFileName,
sizeOfPath(rfs, fullyQualifiedFileName));