Full outer join in RDD scala spark

Keywords: scala apache-spark rdd

Question: 

I have two file below: file1

0000003 杉山______ 26 F
0000005 崎村______ 50 F
0000007 梶川______ 42 F

file2

0000005 82 79 16 21 80
0000001 46 39 8 5 21
0000004 58 71 20 10 6
0000009 60 89 33 18 6
0000003 30 50 71 36 30
0000007 50 2 33 15 62

Now, I join columns have the same key in field 1, I want something like this:

0000005 崎村______ 50 F 82 79 16 21 80
0000003 杉山______ 26 F 30 50 71 36 30
0000007 梶川______ 42 F 50 2  33 15 62

Answers: