两种方式:
1. diff <(hadoop fs -cat /path/to/file) <(hadoop fs -cat /path/to/file2)
2. 利用hdfs api:
FileSystem fs = FileSystem.get(conf);
chksum1 = fs.getFileChecksum(new Path(/home/test1/test1.txt));
chksum2 = fs.getFileChecksum(new Path(/home/test1/test2.txt));
return chksum1 == chksum2;