try {
conf = new org.apache.hadoop.conf.Configuration();
//conf.set("fs.default.name", "hdfs://zal:9000");
hdfs = FileSystem.get(conf);
Path src = new Path(urlTmpFile);
Path dst = new Path(ipPath);
hdfs.copyFromLocalFile(false, true, src, dst);
//hdfs.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
log.error("updateLocalFileToHDFS failed" + e.getMessage() );
}
错误信息是校验和错误真的让我很困惑!
12/09/07 06:19:18 INFO fs.FSInputChecker: Found checksum error: b[0, 20]=687474703a2f2f77772e62616964752e636f6d0a
org.apache.hadoop.fs.ChecksumException: Checksum error: url.txt at 0
有没有关于如何做到这一点的提示或示例?