FSDataInputStream in = fs.open(path);
in.readFully(arr);
}
Block getFirstBlock(FileSystem fs, Path path) throws IOException {
DFSDataInputStream in =
(DFSDataInputStream) ((DistributedFileSystem)fs).open(path);
in.readByte();
return in.getCurrentBlock();
}