Skip to content

Instantly share code, notes, and snippets.

@treper
Created August 22, 2013 08:57
Show Gist options
  • Save treper/6304771 to your computer and use it in GitHub Desktop.
Save treper/6304771 to your computer and use it in GitHub Desktop.
val tags=file.filter(line => label_name_map.contains(line.split("\t")(0).toLong)).map(line => (line.split("\t")(1).toLong ->label_name_map(line.split("\t")(0).toLong))).sortByKey(false)
tags.saveAsTextFile("hdfs://finger-test2:54310/home/TagHierarchy/tag_count_sorted")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment