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.
- Put the input file into Ozone:
hdfs dfs -put data/jedi_wisdom.txt o3fs://hivetest.s3v.o3service1/spark
- List the files in Ozone:
hdfs dfs -ls o3fs://hivetest.s3v.o3service1/
- Download file from ozone to local:
hdfs dfs -copyToLocal o3fs://hivetest.s3v.o3service1/spark data/jedi_wisdom.txt