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

[SPARK-3869] ./bin/spark-class miss Java version with _JAVA_OPTIONS set #2725

Closed
wants to merge 1 commit into from
Closed

[SPARK-3869] ./bin/spark-class miss Java version with _JAVA_OPTIONS set #2725

wants to merge 1 commit into from

Conversation

cocoatomo
Copy link
Contributor

When _JAVA_OPTIONS environment variable is set, a command "java -version" outputs a message like "Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8".
./bin/spark-class knows java version from the first line of "java -version" output, so it mistakes java version with _JAVA_OPTIONS set.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

1 similar comment
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@JoshRosen
Copy link
Contributor

Jenkins, add to whitelist.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21677/
Test FAILed.

@SparkQA
Copy link

SparkQA commented Oct 13, 2014

QA tests have started for PR 2725 at commit f894ebd.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 13, 2014

QA tests have finished for PR 2725 at commit f894ebd.

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

@andrewor14
Copy link
Contributor

Hey @cocoatomo I might be missing something. What do you mean by "_JAVA_OPTIONS set"? How does your fix cause that output to be printed?

@vanzin
Copy link
Contributor

vanzin commented Oct 14, 2014

Funny. Seems to be a feature of the JVM itself, but I can't find any documentation about it.

$ _JAVA_OPTIONS=-Dfoo=bar java -version
Picked up _JAVA_OPTIONS: -Dfoo=bar
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)

@andrewor14
Copy link
Contributor

Ahh I see. That is very strange indeed. I think in general it's a good idea to grep for version anyway. Thanks I'm merging this.

@asfgit asfgit closed this in 7b4f39f Oct 14, 2014
@cocoatomo
Copy link
Contributor Author

Hi, @andrewor14 @vanzin . Thank you for your comments.

A value of _JAVA_OPTIONS is automatically passed to java command as an argument.
Because the default file.encoding on Mac OS X is MacRoman which is not confortable,
it is common to set _JAVA_OPTIONS=-Dfile.encoding=UTF-8.

Thanks!

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.

6 participants