From 3d5d49bc0362c2c0bd7faed7170f449b7c179807 Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Wed, 13 Jul 2016 10:53:15 +0200 Subject: [PATCH 01/10] warning added while using sparkPackages with spark-submit --- R/pkg/R/sparkR.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index 62659b0c0ce5f..2ec231962e70c 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -155,6 +155,9 @@ sparkR.sparkContext <- function( existingPort <- Sys.getenv("EXISTING_SPARKR_BACKEND_PORT", "") if (existingPort != "") { + if(sparkPackages != ""){ + warning("--packages flag should be used with with spark-submit") + } backendPort <- existingPort } else { path <- tempfile(pattern = "backend_port") From 259c4af4aad6a3e72bdcffca28668f97024125f8 Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Thu, 14 Jul 2016 20:05:55 +0200 Subject: [PATCH 02/10] style change and improve warning message --- R/pkg/R/sparkR.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index 2ec231962e70c..1de8d869bfa64 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -155,8 +155,8 @@ sparkR.sparkContext <- function( existingPort <- Sys.getenv("EXISTING_SPARKR_BACKEND_PORT", "") if (existingPort != "") { - if(sparkPackages != ""){ - warning("--packages flag should be used with with spark-submit") + if (length(sparkPackages) != 0) { + warning("--packages flag should be used with with spark-submit or sparkR shell") } backendPort <- existingPort } else { From 76fa14b7f8410d23e9f400ab704bc5b04a85d491 Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Fri, 15 Jul 2016 20:14:09 +0200 Subject: [PATCH 03/10] Improve warning message --- R/pkg/R/sparkR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index 1de8d869bfa64..a3962075131d9 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -156,7 +156,7 @@ sparkR.sparkContext <- function( existingPort <- Sys.getenv("EXISTING_SPARKR_BACKEND_PORT", "") if (existingPort != "") { if (length(sparkPackages) != 0) { - warning("--packages flag should be used with with spark-submit or sparkR shell") + warning("sparkPackages has no effect when using spark-submit or sparkR shell, please use the --packages commandline instead") } backendPort <- existingPort } else { From c0dca31439c1aed242aca514be050d44a5598f52 Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Sat, 16 Jul 2016 19:33:06 +0200 Subject: [PATCH 04/10] character limit --- R/pkg/R/sparkR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index a3962075131d9..e3a095c9c74a2 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -156,7 +156,7 @@ sparkR.sparkContext <- function( existingPort <- Sys.getenv("EXISTING_SPARKR_BACKEND_PORT", "") if (existingPort != "") { if (length(sparkPackages) != 0) { - warning("sparkPackages has no effect when using spark-submit or sparkR shell, please use the --packages commandline instead") + warning("sparkPackages has no effect when using spark-submit or sparkR shell, use the --packages commandline instead") } backendPort <- existingPort } else { From 204fa2560bdbcc1211249aac40025f9d6ec76f5f Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Sat, 16 Jul 2016 21:43:58 +0200 Subject: [PATCH 05/10] character limit --- R/pkg/R/sparkR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index e3a095c9c74a2..36261cf407181 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -156,7 +156,7 @@ sparkR.sparkContext <- function( existingPort <- Sys.getenv("EXISTING_SPARKR_BACKEND_PORT", "") if (existingPort != "") { if (length(sparkPackages) != 0) { - warning("sparkPackages has no effect when using spark-submit or sparkR shell, use the --packages commandline instead") + warning("sparkPackages has no effect when using spark-submit/sparkR shell, use --packages") } backendPort <- existingPort } else { From 1f013653d22068c00c199ba7a64ec2acdf07aed5 Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Sat, 16 Jul 2016 23:24:01 +0200 Subject: [PATCH 06/10] fix warning --- R/pkg/R/sparkR.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index 36261cf407181..a42758d6c25c8 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -156,7 +156,8 @@ sparkR.sparkContext <- function( existingPort <- Sys.getenv("EXISTING_SPARKR_BACKEND_PORT", "") if (existingPort != "") { if (length(sparkPackages) != 0) { - warning("sparkPackages has no effect when using spark-submit/sparkR shell, use --packages") + warning(paste("sparkPackages has no effect when using spark-submit or sparkR shell", + "please use the --packages commandline instead", sep = ",")) } backendPort <- existingPort } else { From b425540018881be644697c3a1468a3f5bebb9d9d Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Sat, 16 Jul 2016 23:25:41 +0200 Subject: [PATCH 07/10] fix warning --- R/pkg/R/sparkR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index a42758d6c25c8..bcdb22d00dd5f 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -157,7 +157,7 @@ sparkR.sparkContext <- function( if (existingPort != "") { if (length(sparkPackages) != 0) { warning(paste("sparkPackages has no effect when using spark-submit or sparkR shell", - "please use the --packages commandline instead", sep = ",")) + "please use the --packages commandline instead", sep = ",")) } backendPort <- existingPort } else { From 28245ec56ada0d427a88c2d45e6186b9c239617b Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Sun, 17 Jul 2016 08:09:45 +0200 Subject: [PATCH 08/10] using packages to check length --- R/pkg/R/sparkR.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index bcdb22d00dd5f..42eec77e76c0c 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -155,9 +155,9 @@ sparkR.sparkContext <- function( existingPort <- Sys.getenv("EXISTING_SPARKR_BACKEND_PORT", "") if (existingPort != "") { - if (length(sparkPackages) != 0) { + if (length(packages) != 0) { warning(paste("sparkPackages has no effect when using spark-submit or sparkR shell", - "please use the --packages commandline instead", sep = ",")) + "please use the --packages commandline instead", sep = "")) } backendPort <- existingPort } else { From aefdb45e81a2463a89630d7f764673d136497ab2 Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Sun, 17 Jul 2016 08:10:29 +0200 Subject: [PATCH 09/10] using packages to check length --- R/pkg/R/sparkR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index 42eec77e76c0c..95358d31def9e 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -157,7 +157,7 @@ sparkR.sparkContext <- function( if (existingPort != "") { if (length(packages) != 0) { warning(paste("sparkPackages has no effect when using spark-submit or sparkR shell", - "please use the --packages commandline instead", sep = "")) + "please use the --packages commandline instead", sep = ",")) } backendPort <- existingPort } else { From 12bd70015ce49dbb4c57f63e06de76876844500d Mon Sep 17 00:00:00 2001 From: krishnakalyan3 Date: Sun, 17 Jul 2016 08:19:16 +0200 Subject: [PATCH 10/10] fix space --- R/pkg/R/sparkR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index 95358d31def9e..ff5297ffd51cb 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -157,7 +157,7 @@ sparkR.sparkContext <- function( if (existingPort != "") { if (length(packages) != 0) { warning(paste("sparkPackages has no effect when using spark-submit or sparkR shell", - "please use the --packages commandline instead", sep = ",")) + " please use the --packages commandline instead", sep = ",")) } backendPort <- existingPort } else {