|
@@ -9,8 +9,8 @@ client = InsecureClient("http://master-1-1.c-7f31a3eea195cb73.cn-hangzhou.emr.al
|
|
|
|
|
|
def read_predict(hdfs_path: str):
|
|
|
for file in client.list(hdfs_path):
|
|
|
- with client.read(hdfs_path + file, encoding="utf-8") as reador:
|
|
|
- with gzip.GzipFile(fileobj=reador, mode="rb") as gz_file:
|
|
|
+ with client.read(hdfs_path + file) as reader:
|
|
|
+ with gzip.GzipFile(fileobj=reader, mode="rb") as gz_file:
|
|
|
content = gz_file.read()
|
|
|
print(f"Content of {hdfs_path + file}:\n {content}")
|
|
|
|