I got the hadoop checksum file from https://dist.apache.org/repos/dist/release/hadoop/common/hadoop-2.7.1/hadoop-2.7.1.tar.gz.mds. But the file format is not the ones expected by tools like sha256sum. What tools should I use to read checksum in a .mds file?
5 Answers
Just take a look inside the file with a text editor. It's a plain text file containing lots of different hash formats, so you are free to choose which one to use for verifying your file checksums.
In general, when faced with such a situation, I'd suggest you run the unix file utility against the file. It will give you detailed information about the contents of "strange" files.
- 988
You didnt mention what OS you are using but still you can use MD5SUM
In Linux make sure your data file and MD5SUM files are at same location
then do md5sum -c mdsfile and it will check md5sum automatically.
for more information please look at
- 567
Read the original article here.
Here is the complete procedure to verify the releases, by using GPG or by using SHA-256.
GPG:
Download the release(hadoop-X.Y.Z-src.tar.gz) from a mirror site.
Download the signature file hadoop-X.Y.Z-src.tar.gz.asc from Apache.
Download Hadoop KEYS file.
Run these command separately:
gpg --import KEYS
gpg --verify hadoop-X.Y.Z-src.tar.gz.asc
SHA-256:
Download the release(hadoop-X.Y.Z-src.tar.gz) from a mirror site.
Download the checksum hadoop-X.Y.Z-src.tar.gz.mds from Apache.
Run
shasum -a 256 hadoop-X.Y.Z-src.tar.gz
- 2,485
-
I know how to use those tools. The problem is that the format in the
.mdsfile is unknown. – David S. Aug 24 '16 at 13:04 -
Okay, I have downloaded your .mds file and then right clicked on it and opened it in Notepad++. Here's the image: http://i.stack.imgur.com/4aVKz.jpg – Animesh Patra Aug 25 '16 at 06:05
That file is messed up. Anyway you can extract it as follows:
mv hadoop-2.7.1.tar.gz{.mds,}
gunzip hadoop-2.7.1.tar.gz
mv hadoop-2.7.1{.tar,.txt}
cat hadoop-3.1.1.tar.gz.mds | grep "^SHA256" | sed 's/ //g' | sed 's/SHA256=//' will then give you something you can check with sha256sum.
- 109
- 1
md5sumandsha256sumat first, but they do not read the.mdsformat. – David S. Aug 24 '16 at 13:03