Storing Data Using OzonePDF version

Setting up OzoneFS

Select the Ozone bucket to configure OzoneFS and add specific properties to core-site.xml.

  1. Select the Ozone bucket on which you want OzoneFS to reside.
    If you do not have a designated volume or bucket for OzoneFS, create them using the required commands:
    ozone sh volume create /volume
    ozone sh bucket create /volume/bucket
  2. Add the properties fs.o3fs.impl and fs.default.name to core-site.xml.
    Adding these properties makes the bucket as the default file system for HDFS dfs commands and registers the o3fs file system type.
    <property>
      <name>fs.o3fs.impl</name>
      <value>org.apache.hadoop.fs.ozone.OzoneFileSystem</value>
    </property>
    <property>
      <name>fs.defaultFS</name>
      <value>o3fs://bucket.volume</value>
    </property>
  3. Add the ozone-filesystem.jarfile to the classpath.
    export HADOOP_CLASSPATH=/opt/ozone/share/hadoop/ozonefs/hadoop-ozone-filesystem.jar:$HADOOP_CLASSPATH
    After setting up OzoneFS, you can run hdfs commands such as the following on Ozone:
    • hdfs dfs -ls /
    • hdfs dfs -mkdir /users
    Now, applications such as Hive and Spark can run on this file system after some basic configuration changes.

We want your opinion

How can we improve this page?

What kind of feedback do you have?