glom,RDD-method {SparkR}R Documentation

Coalesce all elements within each partition of an RDD into a list.

Description

Coalesce all elements within each partition of an RDD into a list.

Usage

## S4 method for signature 'RDD'
glom(x)

glom(x)

Arguments

x

An RDD.

Value

An RDD created by coalescing all elements within each partition into a list.

Examples

## Not run: 
##D sc <- sparkR.init()
##D rdd <- parallelize(sc, as.list(1:4), 2L)
##D collect(glom(rdd))
##D # list(list(1, 2), list(3, 4))
## End(Not run)

[Package SparkR version 0.1 Index]