Commit 08baf381 authored by 张彦钊's avatar 张彦钊

change test file

parent 2067e393
...@@ -147,9 +147,17 @@ if __name__ == '__main__': ...@@ -147,9 +147,17 @@ if __name__ == '__main__':
# validate_date, value_map, app_list_map = feature() # validate_date, value_map, app_list_map = feature()
# get_predict(validate_date, value_map, app_list_map) # get_predict(validate_date, value_map, app_list_map)
spark = SparkSession.builder.getOrCreate() import subprocess
d = spark.textFile("hdfs://172.16.32.4:8020/strategy/esmm/tr").collect()
print(d) p = subprocess.Popen("hdfs dfs -ls /strategy/esmm/tr | awk '{print $8}",
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
for line in p.stdout.readlines():
print(line)
# 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