powered by
Invoke methods on Java object references. These functions provide a mechanism for invoking various Java object methods directly from R.
invoke(jobj, method, ...)invoke_static(sc, class, method, ...)invoke_new(sc, class, ...)
invoke_static(sc, class, method, ...)
invoke_new(sc, class, ...)
An R object acting as a Java object reference (typically, a spark_jobj).
spark_jobj
The name of the method to be invoked.
Optional arguments, currently unused.
A spark_connection.
spark_connection
The name of the Java class whose methods should be invoked.
Use each of these functions in the following scenarios:
invoke
invoke_static
invoke_new
sc <- spark_connect(master = "spark://HOST:PORT") spark_context(sc) %>% invoke("textFile", "file.csv", 1L) %>% invoke("count")
Run the code above in your browser using DataLab