-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
[Feature] [Task Plugin] Support emr serverless spark #16126
base: dev
Are you sure you want to change the base?
[Feature] [Task Plugin] Support emr serverless spark #16126
Conversation
aliyunServerlessSparkClient = new Client(config); | ||
} | ||
|
||
public boolean checkConnect(String accessKeyId, String accessKeySecret, String regionId) { |
Check notice
Code scanning / CodeQL
Useless parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently Aliyun EMR Serverless Spark service does not have a specific API to test connection.
aliyunServerlessSparkClient = new Client(config); | ||
} | ||
|
||
public boolean checkConnect(String accessKeyId, String accessKeySecret, String regionId) { |
Check notice
Code scanning / CodeQL
Useless parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
aliyunServerlessSparkClient = new Client(config); | ||
} | ||
|
||
public boolean checkConnect(String accessKeyId, String accessKeySecret, String regionId) { |
Check notice
Code scanning / CodeQL
Useless parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
...org/apache/dolphinscheduler/plugin/task/aliyunserverlessspark/AliyunServerlessSparkTask.java
Fixed
Show fixed
Hide fixed
...org/apache/dolphinscheduler/plugin/task/aliyunserverlessspark/AliyunServerlessSparkTask.java
Fixed
Show fixed
Hide fixed
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #16126 +/- ##
============================================
+ Coverage 40.71% 40.81% +0.10%
- Complexity 5246 5273 +27
============================================
Files 1385 1397 +12
Lines 46109 46324 +215
Branches 4923 4931 +8
============================================
+ Hits 18771 18908 +137
- Misses 25412 25482 +70
- Partials 1926 1934 +8 ☔ View full report in Codecov by Sentry. |
Signed-off-by: EricGao888 <[email protected]>
33cc954
to
c107f11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gernerally LGTM. Just some questions.
} catch (Exception e) { | ||
log.info("spark client failed to connect to the server"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to print stack trace to the logs for better debug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I missed this one, will fix it.
|
||
protected Client buildAliyunServerlessSparkClient(String accessKeyId, String accessKeySecret, | ||
String regionId) throws Exception { | ||
String endpoint = String.format("emr-serverless-spark.%s.aliyuncs.com", regionId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have seen this string in some other places, maybe a constant is more suitable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will fix it.
throws Exception { | ||
|
||
checkNotNull(accessKeyId, accessKeySecret, regionId); | ||
String endpoint = String.format("emr-serverless-spark.%s.aliyuncs.com", regionId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, maybe we should make endpoint
as a config since users may use endpoint in other formats (etc., in VPC).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Will make it configurable.
Please retry analysis of this Pull-Request directly on SonarCloud |
Purpose of the pull request
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
If your pull request contain incompatible change, you should also add it to
docs/docs/en/guide/upgrede/incompatible.md