Reputation: 11
I'm trying to list all the files in my hdfs path but something seems strange. the function is only listing some files, but not all, even in paths that only have 7 files, it only gets the ones with ending 1. But I need to get all the .parquet files that are in the path.
Can you help me?
def list_files_hdfs(client, path):
try:
files = client.list(path)
return [f"{path}/{file}" for file in files]
except Exception as e:
print(f"Error listing files: {e}")
Upvotes: 0
Views: 26