Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Conversation

@mccheah
Copy link

@mccheah mccheah commented Aug 18, 2017

Closes #235 and requires #444.

@mccheah mccheah changed the base branch from branch-2.2-kubernetes to support-java-options-with-spaces August 18, 2017 23:19
val executorSysProps = spark.parallelize(Seq(0)).flatMap { _ =>
Maps.fromProperties(System.getProperties).asScala
}.collectAsMap()
println(s"The executor's JVM options did not match. Expected" +

Choose a reason for hiding this comment

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

I'm wondering why would you use println here instead of logger output?

Copy link

Choose a reason for hiding this comment

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

because this is integration test code, and we only get the container output (its stdout) so using a logger only adds more variability to the output.

See runSparkApplicationAndVerifyCompletion's expectedLogOnCompletion parameter

println(s"All expected JVM options were present on the driver and executors.")
val spark = SparkSession.builder().getOrCreate().sparkContext
try {
val nonMatchingExecutorOptions = spark.parallelize(Seq(0)).flatMap { _ =>
Copy link

Choose a reason for hiding this comment

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

note to other reviewers: the lambda parameter to this flatMap will run on executors, not driver

val executorSysProps = spark.parallelize(Seq(0)).flatMap { _ =>
Maps.fromProperties(System.getProperties).asScala
}.collectAsMap()
println(s"The executor's JVM options did not match. Expected" +
Copy link

Choose a reason for hiding this comment

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

because this is integration test code, and we only get the container output (its stdout) so using a logger only adds more variability to the output.

See runSparkApplicationAndVerifyCompletion's expectedLogOnCompletion parameter

println(s"Key: ${prop._1}, Value: ${prop._2}")
}
} else {
println("All expected JVM options were present on the driver and executors.")
Copy link

Choose a reason for hiding this comment

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

you use System.exit(1) to fail out of the driver section but have an if here. I think I'd prefer using System.exit in both places

Copy link

@ash211 ash211 left a comment

Choose a reason for hiding this comment

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

LGTM, ready to merge

@mccheah
Copy link
Author

mccheah commented Aug 21, 2017

Merge #444 first

@ash211 ash211 changed the base branch from support-java-options-with-spaces to branch-2.2-kubernetes August 22, 2017 06:49
@ash211
Copy link

ash211 commented Aug 22, 2017

@mccheah haven't figured out why PRs A <- B <- C can all be clean, and then when you merge A <-B and retarget A <- C there are conflicts. Bottom line is, merge conflicts

@mccheah
Copy link
Author

mccheah commented Aug 22, 2017

I've been using a different workflow to retarget these chained PRs:

  1. Merge downstream PR
  2. Checkout a new branch off of master
  3. git diff upstream-pr-branch master | git apply
  4. git commit
  5. git push --force

Doing it this way doesn't introduce any conflicts.

If this is the first time you compile the Kubernetes core implementation module, run the following command to install the dependencies and compile:

build/mvn install -Pkubernetes -pl resource-managers/kubernetes/core -am -DskipTests

Copy link

Choose a reason for hiding this comment

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

@mccheah accidental deletion here?

@mccheah mccheah force-pushed the support-executor-java-options branch from ae0f1f7 to e03492b Compare August 22, 2017 19:41
Copy link

@ash211 ash211 left a comment

Choose a reason for hiding this comment

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

Looks right now, ready to merge when tests pass

@ash211 ash211 merged commit 2cb2074 into branch-2.2-kubernetes Aug 23, 2017
@kimoonkim kimoonkim mentioned this pull request Aug 23, 2017
11 tasks
@ash211 ash211 deleted the support-executor-java-options branch September 5, 2017 05:55
ifilonenko pushed a commit to ifilonenko/spark that referenced this pull request Feb 26, 2019
puneetloya pushed a commit to puneetloya/spark that referenced this pull request Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants