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 CML 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