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-12130] Replace shuffleManagerClass with shortShuffleMgrNames in ExternalShuffleBlockResolver #10131

Closed
wants to merge 6 commits into from

Conversation

lianhuiwang
Copy link
Contributor

Replace shuffleManagerClassName with shortShuffleMgrName is to reduce time of string's comparison. and put sort's comparison on the front. cc @JoshRosen @andrewor14

@@ -200,7 +200,7 @@ private[spark] class BlockManager(
val shuffleConfig = new ExecutorShuffleInfo(
diskBlockManager.localDirs.map(_.toString),
diskBlockManager.subDirsPerLocalDir,
shuffleManager.getClass.getName)
conf.get("spark.shuffle.manager", "sort").toLowerCase)
Copy link
Contributor

Choose a reason for hiding this comment

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

looks OK, but why not add a field in ShuffleManager itself that sets this? So you can just do shuffleManager.name or something here

@lianhuiwang
Copy link
Contributor Author

@andrewor14 Now I add shortShuffleMgrName to ShuffleManager for getting its short Name. How do you think? Thanks.

@SparkQA
Copy link

SparkQA commented Dec 4, 2015

Test build #47197 has finished for PR 10131 at commit c67cdca.

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

@@ -60,6 +60,9 @@ private[spark] trait ShuffleManager {
*/
def shuffleBlockResolver: ShuffleBlockResolver

/** Return short name for the ShuffleManager */
def shortShuffleMgrName: String
Copy link
Contributor

Choose a reason for hiding this comment

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

I would make these vals since we don't ever expect them to change within a shuffle manager

@andrewor14
Copy link
Contributor

Minor comment but this looks good otherwise.

@lianhuiwang
Copy link
Contributor Author

@andrewor14 thanks. I think now it's ok.

@SparkQA
Copy link

SparkQA commented Dec 15, 2015

Test build #47710 has finished for PR 10131 at commit 2259fba.

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

@SparkQA
Copy link

SparkQA commented Dec 15, 2015

Test build #47711 has finished for PR 10131 at commit 8bb4bce.

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

@SparkQA
Copy link

SparkQA commented Dec 15, 2015

Test build #47716 has finished for PR 10131 at commit 22e0e91.

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

@@ -28,6 +28,10 @@ import org.apache.spark.{TaskContext, ShuffleDependency}
* boolean isDriver as parameters.
*/
private[spark] trait ShuffleManager {

/** Return short name for the ShuffleManager */
val shortShuffleMgrName: String
Copy link
Contributor

Choose a reason for hiding this comment

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

just call this shortName

@andrewor14
Copy link
Contributor

LGTM, merging into master. I'll fix the comment on merge.

@asfgit asfgit closed this in 369127f Dec 16, 2015
@lianhuiwang
Copy link
Contributor Author

@andrewor14 OK, 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.

3 participants