Skip to content
Snippets Groups Projects
Commit 516307e5 authored by Khanna's avatar Khanna
Browse files

Spark Apps Done

parent fc18c008
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment