Key management using ofs
When using ofs, Ozone administrators and users can perform various
operations on Ozone keys with the help of the Hadoop shell commands such as creating keys,
recursively listing keys, and renaming keys in a bucket.
Creating keys
You must consider the following when creating Ozone keys using
ofs:- You cannot create files (keys) under the root or the first-level directory
(volume) except in the
/tmp/directory. - You can add keys to the second-level directory (bucket) or lower-level directories.
Recursively listing keys
You must consider the following when using the
ls -R command to
recursively list Ozone keys under volumes and buckets:Running the ls -R command... |
Recursively lists the following... |
|---|---|
| For a bucket | All the keys that belong to the particular bucket |
| For a volume | All the buckets that belong to the specified volume and the keys that belong to each bucket |
| At the root | All the volumes under the root, all the buckets that belong to each volume, and all the keys that belong to each bucket |
Renaming keys
You can rename only the keys that belong to a bucket. The ofs file
system does not allow you to rename the keys across volumes or buckets.
For example, ofs allows renaming of the key
ofs:///volume1/bucket1/key1.txt to
ofs:///volume1/bucket1/key2.txt. However,
ofs:///volume1/bucket1/key1.txt cannot be renamed to
ofs:///volume1/bucket2/key11.txt.
