【菜鸟系列】spark常用算子总结(java)--union,intersection,coalesce,repartition,cartesian,distinct
/***union*合并*/JavaRDDrdd1=jsc.parallelize(Arrays.asList(1,2,3,4,5,6,7),2);JavaRDDrdd2=jsc.parallelize(Arrays.asList(1,21,31,41,51,61,7),2);JavaRDDrdd3=rdd1.union(rdd2);//System.out.println(rdd3.collec