IN 튜토리얼이 제안cogroup는 PySpark
('a', (<pyspark.resultiterable.ResultIterable object at 0x1d8b190>, <pyspark.resultiterable.ResultIterable object at 0x1d8b150>))
('b', (<pyspark.resultiterable.ResultIterable object at 0x1d8b210>, <pyspark.resultiterable.ResultIterable object at 0x1d8b1d0>))
나는에 출력을 저장하는 경우이 ', 중첩의 3 수준이 R '및 이렇게 :
for i in r:
for j in i[1]:
print list(j)
내가 올바른 cogrouped 번호를 얻을 :
1) Cogroup이 PySpark에서 rightjoin/leftouterjoin 등의 숫자를 반환하지 않는 이유는 무엇입니까? 2) PySpark 셸에서 예제를 복제 할 수없는 이유는 무엇입니까? 그 cogroup은 기본적으로 가입,
/**
* For each key k in `this` or `other`, return a resulting RDD that contains a tuple with the
* list of values for that key in `this` as well as `other`.
*/
def cogroup[W](other: RDD[(K, W)]): RDD[(K, (Iterable[V], Iterable[W]))]
실제로 cogroup 구현하는 스파크에 조인 반환하도록되어 무엇 때문에
게시물을 편집하여 참조 된 튜토리얼에 링크 할 수 있습니까? –
@Nick : http://spark.apache.org/docs/0.7.0/api/pyspark/pyspark.rdd.RDD-class.html#cogroup 링크가 있습니다.이 자습서는 유효하지 않을 수 있습니다. Spark의 최신 릴리스. – Vedant
예, 0.7.0 용 문서를보고 있습니다. Spark의 최신 버전은 1.0.0입니다. 'cogroup()'에 해당하는 문서는 [here] (http://spark.apache.org/docs/latest/api/python/pyspark.rdd.RDD-class.html#cogroup)이며, 올바른 출력. –