Skip to content

Conversation

@patmcdonough
Copy link

...ing the number of RDD partitions across languages.

…aining the number of RDD partitions across languages
@SparkQA
Copy link

SparkQA commented Sep 18, 2014

Can one of the admins verify this patch?

@laserson
Copy link
Contributor

fyi: I think you referenced the wrong JIRA

@patmcdonough patmcdonough changed the title SPARK-3389: New public method for RDD's to have consistent way of obtain... SPARK-3580: New public method for RDD's to have consistent way of obtain... Sep 18, 2014
@patmcdonough
Copy link
Author

thanks for catching that @laserson! Fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

minor style comment but you can just write this like:

def getNumPartitions: Int = partitions.size

@pwendell
Copy link
Contributor

LGTM pending a minor comment and tests. Jenkins, test this please.

@SparkQA
Copy link

SparkQA commented Sep 18, 2014

QA tests have started for PR 2447 at commit de966fd.

  • This patch merges cleanly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Including a (pretty obvious) spark-shell example in the scaladoc of a simple RDD method isn't really consistent with the rest of the RDD API documentation.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I can clean this up along with the other style issue on merge.

Copy link
Author

Choose a reason for hiding this comment

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

Good point, although it's worth noting this was essentially ported directly from the python API (including the doc). Any doc changes should be consistent across both versions if possible.

@SparkQA
Copy link

SparkQA commented Sep 18, 2014

QA tests have finished for PR 2447 at commit de966fd.

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

@pwendell
Copy link
Contributor

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Sep 19, 2014

QA tests have started for PR 2447 at commit afc4e09.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 19, 2014

QA tests have finished for PR 2447 at commit afc4e09.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • sealed trait Matrix extends Serializable
    • class SparseMatrix(
    • sealed trait Vector extends Serializable

@pwendell
Copy link
Contributor

pwendell commented Oct 1, 2014

Jenkins, retest this please.

1 similar comment
@pwendell
Copy link
Contributor

pwendell commented Oct 1, 2014

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Oct 1, 2014

QA tests have started for PR 2447 at commit afc4e09.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 1, 2014

QA tests have finished for PR 2447 at commit afc4e09.

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

@andrewor14
Copy link
Contributor

The changes here look fine. @pwendell @markhamstra any additional thoughts? This PR hasn't had much activity for a while.

@srowen
Copy link
Member

srowen commented Feb 19, 2015

FWIW I think:

  • needs a rebase
  • scaladoc should be consistent with others in RDD.scala -- no shell example
  • JavaRDD needs this even more since I think you have to call javaRDD.rdd().partitions().length right now
  • Shouldn't it be partitions.length since it's an array? size works but requires an implicit conversion I think. While we're bothering, might as well do the direct efficient thing

The one bummer here is that there are 20-30 usages of partitions.size in the code already. It's not hard to make those use the method. The usual worry about annoying merge conflicts rears its head though. Still it feels worth doing right if at all?

@andrewor14
Copy link
Contributor

Yeah I think it's still worth doing just to enforce consistent APIs across python and Scala. Merge conflicts may be a little annoying but they shouldn't stop us from bringing the Scala API to parity. Also I think it's fine to continue to use the old way internally since the motivation here is simply to expose it as a public API. I agree that we should also do the same for Java while we're at it.

@srowen
Copy link
Member

srowen commented Apr 15, 2015

@patmcdonough are you in a position to follow up on the comments above? I'm wondering if this is alive or not or whether it should be closed.

@patmcdonough
Copy link
Author

Thanks for following up on this @srowen - I didn't even realize it's still open.

I'll close this out in favor of somebody issuing a new patch as I'm not in a position to address the comments right now (a lot can happen in 6 months I guess). Please shout at me and suggest otherwise if necessary.

CC: @andrewor14 @pwendell

srowen pushed a commit to srowen/spark that referenced this pull request Dec 2, 2015
…ons Across Different Languages

I have tried to address all the comments in pull request apache#2447.

Note that the second commit (using the new method in all internal code of all components) is quite intrusive and could be omitted.

Author: Jeroen Schot <[email protected]>

Closes apache#9767 from schot/master.
asfgit pushed a commit that referenced this pull request Dec 2, 2015
…ons Across Different Languages

I have tried to address all the comments in pull request #2447.

Note that the second commit (using the new method in all internal code of all components) is quite intrusive and could be omitted.

Author: Jeroen Schot <[email protected]>

Closes #9767 from schot/master.

(cherry picked from commit 128c290)
Signed-off-by: Sean Owen <[email protected]>
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.

7 participants