Create a Hadoop archive

Use the hadoop archive command to invoke the Hadoop archiving tool.

Run the hadoop archive command by specifying the archive name to create, the parent directory relative to the archive location, the source files to archive, and the destination archive location.
hadoop archive -archiveName name -p <parent> <src>* <dest>

The archive name must have a .har extension

Consider the following example of archiving two files:
hadoop archive -archiveName foo.har -p /user/hadoop dir1 dir2 /user/zoo

This example creates an archive using /user/hadoop as the relative archive directory. The directories /user/hadoop/dir1 and /user/hadoop/dir2 will be archived in the /user/zoo/foo.har archive.