如何在apache spark中使用键值

时间:2014-11-06 07:28:12

标签: python scala apache-spark

我正在尝试为作者和他所写的书创建键值对RDD。

数据集看起来像这样,两个标签将书籍与作者分开,然后按空格分隔后续字段。

Rowling, JK  two tabs Harry Potter and the Chamber of Secrets space (1998)   
             two tabs Harry Potter and the Order of the Phoenix space (2003)

其中两个标签是两个标签空格,空格表示单个空格。

我的问题是如何将这两本书映射到spark中的单个作者并创建RDD?

0 个答案:

没有答案