Commit 8761cee5 authored by 张彦钊's avatar 张彦钊

change test file

parent c2a6d59a
......@@ -150,6 +150,7 @@ if __name__ == '__main__':
# [path + "tr/part-r-00000"]
import subprocess
pre_path = "hdfs://172.16.32.4:8020"
dir_in = "/strategy/esmm/tr"
args = "hdfs dfs -ls " + dir_in + " | awk '{print $8}'"
proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
......@@ -157,7 +158,14 @@ if __name__ == '__main__':
s_output, s_err = proc.communicate()
all_dart_dirs = s_output.split()
print(all_dart_dirs)
print(type(all_dart_dirs))
a = []
for i in all_dart_dirs:
b = str(i).split("/")[4]
if b[:4] == "part":
tmp = pre_path+i[2:-1]
a.append(tmp)
print(a)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment