Uh oh!
There was an error while loading. Please reload this page.
[SPARK-2314][SQL] Override collect and take in python library, and count in java library, with optimized versions. - #1592
[SPARK-2314][SQL] Override collect and take in python library, and count in java library, with optimized versions.#1592staple wants to merge 5 commits into
Conversation
AmplabJenkins
commented
Jul 25, 2014
Can one of the admins verify this patch? |
marmbrus
commented
Jul 30, 2014
Thanks for working on this! We'll need to coordinate merging with #1346 and related PRs. (cc @yhuai) @JoshRosen can you look at the other pyspark changes? |
staple
commented
Jul 30, 2014
Sure, I’m fine with reworking based on other changes (it seems that some merge conflicts have already cropped up in master since I submitted my PR last week). I think my change set is a little simpler than the one you linked to, so would it make sense for me to wait until that one goes in? I also thought I’d add a couple of notes on what I had in mind with this patch:
|
marmbrus
commented
Jul 30, 2014
Yeah, I'm hoping to merge #1346 as soon as it passes Jenkins, so I'd wait for that.
Can you add these notes to the PR description so that they get included in the commit message? |
staple
commented
Jul 30, 2014
Sure, added the notes. |
staple
commented
Jul 31, 2014
Hi, I've updated the patch to work with the new code in master. |
marmbrus
commented
Jul 31, 2014
cc @davies |
davies
commented
Jul 31, 2014
staple
commented
Jul 31, 2014
Sure, no problem. |
davies
commented
Aug 2, 2014
@staple could you rebase this pr to PR-1598? it gets very close to merge. |
marmbrus
commented
Aug 3, 2014
This seems to have captured a bunch of unrelated changes during the rebase. |
staple
commented
Aug 3, 2014
Sorry, I'm away from home and had limited time / access to try and do the merge last night - which I didn't finish, and as you mentioned messed up the included commits. I'll post an explicit comment here when the merge is ready. |
staple
commented
Aug 4, 2014
Hi folks I’ve merged with the most recent code (pushed to my branch), but with the most recent merge I am getting NPEs in Kryo for schemas containing array data type fields in the sql.py tests. I’m away from home, with no real dev system and spotty internet access until Thursday, so unfortunately I think it’s impractical for me to diagnose the problem until then. Sorry for the delay. |
marmbrus
commented
Sep 3, 2014
Hey @staple if you have time to update this would be great to include it. |
SparkQA
commented
Sep 5, 2014
Can one of the admins verify this patch? |
staple
commented
Sep 6, 2014
Sorry for the delay. I wrote a simple test case in pyspark to trigger the kryo NPEs I've started seeing, that doesn't require my patch. I tested against master at ba5bcad. from pyspark.sql import Row, SQLContext The kryo NPE is coming from the TaskResultGetter: 14/09/05 21:59:47 ERROR TaskResultGetter: Exception while getting task result @davies, do you have any insight as to the cause? |
davies
commented
Sep 6, 2014
@marmbrus This seems that JListWrapper() can not be serialized by kryo correctly, but I don't know how to reproduce it in Scala. Reproduce this bug in one line Python: |
marmbrus
commented
Sep 7, 2014
Hmm, that kryo error is unfortunate. We'll probably need to add a special serializer in SparkSqlSerializer to work around this. |
marmbrus
commented
Sep 8, 2014
#2323 seems to fix the Kryo error for me. Let me know if you have further issues after updating this to master. |
SparkQA
commented
Sep 9, 2014
QA tests have started for PR 1592. This patch merges cleanly. |
staple
commented
Sep 9, 2014
Great! I'll go ahead and merge once #2323 is in. |
marmbrus
commented
Sep 11, 2014
I just merged #2323 to master. |
staple
commented
Sep 11, 2014
Thanks!, I'm not getting any more NPEs now. I went ahead and merged. |
SparkQA
commented
Sep 11, 2014
QA tests have started for PR 1592 at commit
|
SparkQA
commented
Sep 11, 2014
QA tests have finished for PR 1592 at commit
|
staple
commented
Sep 11, 2014
Hi, the failing test was CheckpointSuite / 'recovery with file input stream'. This test passed when I ran the tests locally, and it sometimes fails spuriously according to this ticket: 'flaky test case in streaming.CheckpointSuite' |
staple
commented
Sep 11, 2014
Also, I'm assuming I don't have permission to ask jenkins to run a test myself, right? |
JoshRosen
commented
Sep 11, 2014
@staple The Jenkins pull request builder is in an odd state of flux right now. I've manually re-triggered your build (I should have self-service "retest this please" working more consistently by sometime next week). |
SparkQA
commented
Sep 11, 2014
QA tests have started for PR 1592 at commit
|
SparkQA
commented
Sep 11, 2014
QA tests have started for PR 1592 at commit
|
staple
commented
Sep 11, 2014
@JoshRosen Great, thanks for your help! |
SparkQA
commented
Sep 11, 2014
QA tests have finished for PR 1592 at commit
|
SparkQA
commented
Sep 11, 2014
QA tests have finished for PR 1592 at commit
|
marmbrus
commented
Sep 13, 2014
SQL LGTM. @JoshRosen is this ready to go? |
There was a problem hiding this comment.
This file sets __all__ further down on line 100; we should only set it once. Actually, do you mind just moving the extract_concise_traceback stuff to its own file? There's actually an open JIRA ticket for this (SPARK-1087) and if you're going to touch the traceback code anyways now seems like a good time to do this refactoring. You could name the file something like traceback_utils.py.
JoshRosen
commented
Sep 13, 2014
staple
commented
Sep 14, 2014
Thanks for taking a look, guys. Hmm, it looks like the duplicate |
JoshRosen
commented
Sep 16, 2014
Now that #2385 has been merged, this looks like it will be ready to merge as soon as you rebase it on top of master. |
staple
commented
Sep 16, 2014
Ok, just merged with master. |
marmbrus
commented
Sep 16, 2014
Thanks! I've merged this to master. |
staple
commented
Sep 16, 2014
Great! Thanks |
…ache#1592) This fixes two Spark test failures related to Boson: - `ParquetEncryptionSuite` is failing in Boson because `org.apache.parquet.crypto.keytools.mocks.InMemoryKMS` is not included in the shaded `boson-spark` jar - `HadoopFsRelationTest` is failing because it generates date time that's before the cutoff date of Proleptic Gregorian calendar.
SchemaRDD overrides RDD functions, including collect, count, and take, with optimized versions making use of the query optimizer. The java and python interface classes wrapping SchemaRDD need to ensure the optimized versions are called as well. This patch overrides relevant calls in the python and java interfaces with optimized versions.
Adds a new Row serialization pathway between python and java, based on JList[Array[Byte]] versus the existing RDD[Array[Byte]]. I wasn’t overjoyed about doing this, but I noticed that some QueryPlans implement optimizations in executeCollect(), which outputs an Array[Row] rather than the typical RDD[Row] that can be shipped to python using the existing serialization code. To me it made sense to ship the Array[Row] over to python directly instead of converting it back to an RDD[Row] just for the purpose of sending the Rows to python using the existing serialization code.