Skip to content

Conversation

@mgummelt
Copy link

I believe this fixes SPARK-12413. I'm currently running an integration test to verify.

@andrewor14
Copy link
Contributor

add to whitelist

Copy link
Contributor

Choose a reason for hiding this comment

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

this line will fail style tests because it's too long. Need to break it into 2

Copy link
Author

Choose a reason for hiding this comment

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

fixed. thanks.

@SparkQA
Copy link

SparkQA commented Dec 17, 2015

Test build #47959 has finished for PR 10366 at commit bbfbbdf.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

I was able to verify SI-6654 in the REPL and I believe this patch is the correct fix:

val map = Map[String, String]("a" -> "b", "c" -> "d")
val filteredMap = map.filterKeys(_ != "a")
val identitiedMap = filteredMap.map(identity)

// OK
(new ObjectOutputStream(new ByteArrayOutputStream)).writeObject(map)

// NotSerializableException: scala.collection.immutable.MapLike$$anon$1
(new ObjectOutputStream(new ByteArrayOutputStream)).writeObject(filteredMap)

// OK
(new ObjectOutputStream(new ByteArrayOutputStream)).writeObject(identitiedMap)

@andrewor14
Copy link
Contributor

LGTM, retest this please

@andrewor14
Copy link
Contributor

@mgummelt is this still WIP? If not can you remove that from the title? Also, any updates from your integration tests?

@mgummelt
Copy link
Author

I included [WIP] to indicate that my integration test hasn't finished yet (still pending). Code should be frozen though. Would you like me to remove [WIP]?

@andrewor14
Copy link
Contributor

Yes

@mgummelt mgummelt changed the title [WIP] [SPARK-12413] Fix Mesos ZK persistence [SPARK-12413] Fix Mesos ZK persistence Dec 17, 2015
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, there's a slightly nicer way...

// Do not use `filterKeys` here to avoid SI-6654, which breaks ZK persistence
val environmentVariables = request.environmentVariables.filter { case (k, _) =>
  k != "SPARK_HOME"
}

so we don't have to do the weird filterKeys(...).map(identity) thing

Copy link
Author

Choose a reason for hiding this comment

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

Yes, that's better. Fixed.

@mgummelt
Copy link
Author

Fixed

@mgummelt mgummelt closed this Dec 17, 2015
@mgummelt mgummelt reopened this Dec 17, 2015
@SparkQA
Copy link

SparkQA commented Dec 17, 2015

Test build #2226 has started for PR 10366 at commit d70bcee.

@SparkQA
Copy link

SparkQA commented Dec 17, 2015

Test build #2225 has started for PR 10366 at commit d70bcee.

@mgummelt
Copy link
Author

Test failure looks like some sort of timeout? https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47962/console

@andrewor14
Copy link
Contributor

It's OK, we have 2 builds that are actually running. Hopefully one of them will pass.

@andrewor14
Copy link
Contributor

retest this please. I'm not sure why it's timing out on tests. AFAIK this file isn't even used in tests.

@SparkQA
Copy link

SparkQA commented Dec 18, 2015

Test build #2229 has started for PR 10366 at commit d70bcee.

@SparkQA
Copy link

SparkQA commented Dec 18, 2015

Test build #47960 has finished for PR 10366 at commit 05c4da3.

  • This patch fails from timeout after a configured wait of 250m.
  • This patch merges cleanly.
  • This patch adds no public classes.

@nraychaudhuri
Copy link
Contributor

retest this please

@SparkQA
Copy link

SparkQA commented Dec 18, 2015

Test build #47974 has finished for PR 10366 at commit d70bcee.

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

@SparkQA
Copy link

SparkQA commented Dec 18, 2015

Test build #2228 has finished for PR 10366 at commit d70bcee.

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

@SparkQA
Copy link

SparkQA commented Dec 18, 2015

Test build #2230 has finished for PR 10366 at commit d70bcee.

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

@keithchambers
Copy link

Will this make 1.6.0?

@dragos
Copy link
Contributor

dragos commented Dec 18, 2015

LGTM. Thanks @mgummelt for catching and fixing this!

@tnachen
Copy link
Contributor

tnachen commented Dec 18, 2015

LGTM as well.

@sarutak
Copy link
Member

sarutak commented Dec 18, 2015

LGTM. Merging into master and branch-1.6. Thanks @mgummelt !

@asfgit asfgit closed this in 2bebaa3 Dec 18, 2015
asfgit pushed a commit that referenced this pull request Dec 18, 2015
I believe this fixes SPARK-12413.  I'm currently running an integration test to verify.

Author: Michael Gummelt <[email protected]>

Closes #10366 from mgummelt/fix-zk-mesos.

(cherry picked from commit 2bebaa3)
Signed-off-by: Kousuke Saruta <[email protected]>
@andrewor14
Copy link
Contributor

Note: I'm reverting this patch in master only since #10329, the better alternative, is merged there.
This patch continues to exist in branch-1.6.

@keithchambers
Copy link

@andrewor14 makes sense. Thank you!

Copy link
Contributor

Choose a reason for hiding this comment

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

Should a scalastyle rule be added which prevents filterKeys to be used in future PRs ?

@mgummelt mgummelt deleted the fix-zk-mesos branch August 2, 2016 20:58
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.

9 participants