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 o3fs protocol.

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