Setting up OzoneFS
Select the Ozone bucket to configure OzoneFS and add specific properties to
core-site.xml
.
- 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
-
Add the properties
fs.o3fs.impl
andfs.default.name
tocore-site.xml
.Adding these properties makes the bucket as the default file system for HDFSdfs
commands and registers theo3fs
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>
-
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 runhdfs
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.