From 516307e5f7ae33d2588f6814d612979bd6ee7b43 Mon Sep 17 00:00:00 2001 From: Khanna <avkhann2@fa18-cs425-g05-01.cs.illinois.edu> Date: Sun, 2 Dec 2018 20:31:04 -0600 Subject: [PATCH] Spark Apps Done --- apache-spark/python/join.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apache-spark/python/join.py b/apache-spark/python/join.py index f457116..220369d 100755 --- a/apache-spark/python/join.py +++ b/apache-spark/python/join.py @@ -34,12 +34,12 @@ if __name__ == "__main__": lines = spark.read.text(sys.argv[1]).rdd.map(lambda r: r[0]) lines = lines.map(lambda a: a.encode('utf-8')) - one = lines.filter(lambda x: x if 'profileName' in x else '') - names = one.map(lambda y: y.split(':')[1]) - + names = lines.filter(lambda x: x.split(':')[1] if 'profileName' in x else '') profiles = names.map(lambda c: (c, random.randint(1, 10))) + #randos = randos.map(lambda d: (d, random.randint(1, 10)) #final = profiles.join(randos) + res = profiles.collect() for r in res: -- GitLab