Commit 582bdbf2 authored by 张彦钊's avatar 张彦钊

修改测试文件

parent 9decad9f
...@@ -54,18 +54,15 @@ def gen_tfrecords(in_file): ...@@ -54,18 +54,15 @@ def gen_tfrecords(in_file):
def main(_): def main(_):
client = Client("http://nvwa01:50070") client = Client("http://nvwa01:50070")
path = "/recommend/va" file_list = []
files = client.walk(path) for root, dir, files in client.walk(FLAGS.input_dir):
print(files[3]) for file in files:
print(type(files[3])) if file[-5:] == "*.avro":
# for root, dir, files in client.walk(path): file_list.append(FLAGS.input_dir+file)
# for file in files:
# print(file)
if not os.path.exists(FLAGS.output_dir): if not os.path.exists(FLAGS.output_dir):
os.mkdir(FLAGS.output_dir) os.mkdir(FLAGS.output_dir)
file_list = glob.glob(os.path.join(FLAGS.input_dir, "*.avro"))
print(FLAGS.input_dir)
print(file_list) print(file_list)
print("total files: %d" % len(file_list)) print("total files: %d" % len(file_list))
......
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