Setting up ofs
Select the Ozone bucket to configure ofs
.
-
Select the Ozone bucket on which you want
ofs
to reside.If you do not have a designated volume or bucket forofs
, create them using the required commands:ozone sh volume create /volume ozone sh bucket create /volume/bucket
-
The
ofs
file system implementation classpath is added to CDP services by default. But if an application is unable to instantiate theofs
file system class, add the ozone-filesystem-hadoop3.jar to the classpath.export HADOOP_CLASSPATH=/opt/ozone/share/ozonefs/lib/hadoop-ozone-filesystem-hadoop3-*.jar:$HADOOP_CLASSPATH
-
After setting up
ofs
, you can run HDFS dfs CLI commands such as the following on Ozone FS: (Assuming Ozone Service ID is “omservice1”)hdfs dfs -ls ofs://omservice1/volume/bucket and hdfs dfs -mkdir ofs://omservice1/volume/bucket/usersNow, applications such as Hive and Spark can run on this file system after some basic configuration changes.