1. آپلود فایل به HDFS: from hdfs import Client client = Client(“hdfs://namenode.example.com:9000”) with open(“/local/file.txt”, “rb”) as f: client.write(“/hdfs/file.txt”, f) 2. دانلود فایل از HDFS: from hdfs import Client client = Client(“hdfs://namenode.example.com:9000”) with open(“/local/file.txt”, “wb”) as f: client.read(“/hdfs/file.txt”, f) 3. ایجاد دایرکتوری در HDFS: from hdfs import Client client = Client(“hdfs://namenode.example.com:9000”) client.makedirs(“/hdfs/dir”) 4. لیست کردن محتویات […]

