Hadoop Archives is a special file format. A Hadoop archive corresponds to a file system directory. The name of the Hadoop archive extension is *.har. The Hadoop archive contains metadata (in the form of _index and _MASTERINDX) and data (part-*) files. The _index file contains file name and location information for files in the archive.
How do I create archive?
Usage: Hadoop archive-archivename name <src>* <dest>
The-archivename option specifies the name of the archive you want to create. Like Foo.har. The archive name extension should be *.har. The input is the path name of the file system, and the path name is the same as the usual expression. The created archive are saved to the target directory. Note that creating archives is a map/reduce job. You should run this command on the map reduce cluster. Here is an example:
In the above example,/user/hadoop/dir1 and/user/hadoop/dir2 are archived to the file system directory-/user/zoo/foo.har. When you create a archive, the source file is not changed or deleted.
How do I view the files in archives?
Archive as a file system layer exposed to the outside world. So all FS shell commands can be run on archive, but use a different URI. In addition, archive is immutable. So renaming, deleting, and creating will return an error. The URI of the Hadoop archives is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.