Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARKR][SPARK-22315] Warn if SparkR package version doesn't match SparkContext #19624

Closed
wants to merge 3 commits into from

Conversation

shivaram
Copy link
Contributor

What changes were proposed in this pull request?

This PR adds a check between the R package version used and the version reported by SparkContext running in the JVM. The goal here is to warn users when they have a R package downloaded from CRAN and are using that to connect to an existing Spark cluster.

This is raised as a warning rather than an error as users might want to use patch versions interchangeably (e.g., 2.1.3 with 2.1.2 etc.)

How was this patch tested?

Manually by changing the DESCRIPTION file

@shivaram shivaram changed the title [SPARKR][SPARK-22315] Warn is SparkR package version doesn't match SparkContext [SPARKR][SPARK-22315] Warn if SparkR package version doesn't match SparkContext Oct 31, 2017
@SparkQA
Copy link

SparkQA commented Oct 31, 2017

Test build #83276 has finished for PR 19624 at commit 680a38c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

R/pkg/R/sparkR.R Outdated

if (jvmVersion != rPackageVersion) {
warning(paste("Version mismatch between Spark JVM and SparkR package. JVM version was",
jvmVersion, ", while R package version was", rPackageVersion))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if it's important, perhaps print the original version (ie. with -SNAPSHOT)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if that would be more confusing as somebody might think they just need to remove the -snapshot ?

@felixcheung
Copy link
Member

felixcheung commented Nov 1, 2017 via email

1 similar comment
@felixcheung
Copy link
Member

Maybe but it will say

Version mismatch between Spark JVM and SparkR package. JVM version was 2.3.0-SNAPSHOT, while R package version was 2.1.2

I think it will be clear the numbers are different.
If they are both 2.3.0 it won't show the warning.

@SparkQA
Copy link

SparkQA commented Nov 6, 2017

Test build #83467 has finished for PR 19624 at commit cc6b540.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request Nov 6, 2017
…arkContext

## What changes were proposed in this pull request?

This PR adds a check between the R package version used and the version reported by SparkContext running in the JVM. The goal here is to warn users when they have a R package downloaded from CRAN and are using that to connect to an existing Spark cluster.

This is raised as a warning rather than an error as users might want to use patch versions interchangeably (e.g., 2.1.3 with 2.1.2 etc.)

## How was this patch tested?

Manually by changing the `DESCRIPTION` file

Author: Shivaram Venkataraman <shivaram@cs.berkeley.edu>

Closes #19624 from shivaram/sparkr-version-check.

(cherry picked from commit 65a8bf6)
Signed-off-by: Shivaram Venkataraman <shivaram@cs.berkeley.edu>
@asfgit asfgit closed this in 65a8bf6 Nov 6, 2017
MatthewRBruce pushed a commit to Shopify/spark that referenced this pull request Jul 31, 2018
…arkContext

## What changes were proposed in this pull request?

This PR adds a check between the R package version used and the version reported by SparkContext running in the JVM. The goal here is to warn users when they have a R package downloaded from CRAN and are using that to connect to an existing Spark cluster.

This is raised as a warning rather than an error as users might want to use patch versions interchangeably (e.g., 2.1.3 with 2.1.2 etc.)

## How was this patch tested?

Manually by changing the `DESCRIPTION` file

Author: Shivaram Venkataraman <shivaram@cs.berkeley.edu>

Closes apache#19624 from shivaram/sparkr-version-check.

(cherry picked from commit 65a8bf6)
Signed-off-by: Shivaram Venkataraman <shivaram@cs.berkeley.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants