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

[DOP-23969] Fix Greenplum parallel connections warning for master=local[N] #342

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

dolfinus
Copy link
Member

@dolfinus dolfinus commented Feb 18, 2025

Change Summary

Java's Runtime.availableProcessors() return number of available processors in the system, but starting Spark session with master=local[N] applies the hard limit for the number of executor threads. So even if system has a lot of processor cores available, only some of them will be used by Spark.
This lead to showing a warning that the number of Greenplum connections is high even if Spark session was started with master=local[1] or master=local[10] (max 10 executors, so max 10 connections to GP, warning threshold is 30).

Fixed, added a bunch of unit tests, using mocks to cover different cases (master=local, master=yarn with static allocation, master=yarn with dynamic allocation).

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.33%. Comparing base (60aea9e) to head (079388d).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #342      +/-   ##
===========================================
+ Coverage    92.02%   92.33%   +0.31%     
===========================================
  Files          228      228              
  Lines         9867     9875       +8     
  Branches      1013     1013              
===========================================
+ Hits          9080     9118      +38     
+ Misses         599      566      -33     
- Partials       188      191       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dolfinus dolfinus marked this pull request as ready for review February 18, 2025 13:41
@dolfinus dolfinus merged commit fdce081 into develop Feb 18, 2025
34 checks passed
@dolfinus dolfinus deleted the feature/DOP-23969 branch February 18, 2025 15:33
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.

2 participants