numPartitions {SparkR}R Documentation

Gets the number of partitions of an RDD

Description

Gets the number of partitions of an RDD

Usage

numPartitions(rdd)

## S4 method for signature 'RDD'
numPartitions(rdd)

Arguments

rdd

A RDD.

Value

the number of partitions of rdd as an integer.

Examples

## Not run: 
##D sc <- sparkR.init()
##D rdd <- parallelize(sc, 1:10, 2L)
##D numParititions(rdd)  # 2L
## End(Not run)

[Package SparkR version 0.1 Index]