Commit 8444571b authored by 张彦钊's avatar 张彦钊

change test file

parent 08baf381
......@@ -149,13 +149,13 @@ if __name__ == '__main__':
import subprocess
p = subprocess.Popen("hdfs dfs -ls /strategy/esmm/tr | awk '{print $8}",
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
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)
for line in p.stdout.readlines():
print(line)
s_output, s_err = proc.communicate()
all_dart_dirs = s_output.split()
print(all_dart_dirs)
# d = spark.textFile("hdfs://172.16.32.4:8020/strategy/esmm/tr").collect()
# print(d)
......
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