Accessing local files in Ozone

You can access files in Ozone on a local file system using hdfsCLI. This method works with both legacy engines and runtime sessions.

The following commands enable a Cloudera AI session to connect to Ozone using the OFS protocol.

  1. Put the input file into Ozone:
    hdfs dfs -put data/jedi_wisdom.txt ofs://omservice1/s3v/hivetest/spark
  2. List the files in Ozone:
    hdfs dfs -ls ofs://omservice1/s3v/hivetest/
  3. Download file from ozone to local:
    hdfs dfs -copyToLocal ofs://omservice1/s3v/hivetest/spark data/jedi_wisdom.txt