Skip to content

Commit c706af9

Browse files
committed
Added examples
1 parent a2c19af commit c706af9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

R/pkg/R/sparkR.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,11 @@ sparkRHive.init <- function(jsc = NULL) {
286286
#' @param groupid the ID to be assigned to job groups
287287
#' @param description description for the the job group ID
288288
#' @param interruptOnCancel flag to indicate if the job is interrupted on job cancellation
289+
#' @examples
290+
#'\dontrun{
291+
#' sc <- sparkR.init()
292+
#' setJobGroup(sc, "myJobGroup", "My job group description", TRUE)
293+
#'}
289294

290295
setJobGroup <- function(sc, groupId, description, interruptOnCancel) {
291296
callJMethod(sc, "setJobGroup", groupId, description, interruptOnCancel)
@@ -294,6 +299,11 @@ setJobGroup <- function(sc, groupId, description, interruptOnCancel) {
294299
#' Clear current job group ID and its description
295300
#'
296301
#' @param sc existing spark context
302+
#' @examples
303+
#'\dontrun{
304+
#' sc <- sparkR.init()
305+
#' clearJobGroup(sc)
306+
#'}
297307

298308
clearJobGroup <- function(sc) {
299309
callJMethod(sc, "clearJobGroup")
@@ -303,6 +313,11 @@ clearJobGroup <- function(sc) {
303313
#'
304314
#' @param sc existing spark context
305315
#' @param groupId the ID of job group to be cancelled
316+
#' @examples
317+
#'\dontrun{
318+
#' sc <- sparkR.init()
319+
#' cancelJobGroup(sc, "myJobGroup)
320+
#'}
306321

307322
cancelJobGroup <- function(sc, groupId) {
308323
callJMethod(sc, "cancelJobGroup", groupId)

0 commit comments

Comments
 (0)