Setting up o3fs

Select the Ozone bucket to configure o3fs.

  1. Select the Ozone bucket on which you want o3fs to reside.
    If you do not have a designated volume or bucket for o3fs, create them using the required commands:
    ozone sh volume create /volume
                ozone sh bucket create /volume/bucket
  2. The o3fs file system implementation classpath is added to CDP services by default. But if an application is unable to instantiate the o3fs 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
  3. After setting up o3fs, you can run HDFS commands such as the following on Ozone: (Assuming Ozone Service ID is “ozone”)
    hdfs dfs -ls o3fs://bucket.volume.ozone/ and hdfs dfs -mkdir o3fs://bucket.volume.ozone/users
    Now, applications such as Hive and Spark can run on this file system after some basic configuration changes.