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