Connecting to Spark 2

You can connect to local instances of Spark 2 as well as remote clusters.

## Connecting to Spark 2
# Connect to an existing Spark 2 cluster in YARN client mode using the spark_connect function.
system.time(sc <- spark_connect(master = "yarn-client"))
# The returned Spark 2 connection (sc) provides a remote dplyr data source to the Spark 2 cluster.

For a complete example, see Sparklyr (R).