-
Notifications
You must be signed in to change notification settings - Fork 154
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
[#864] feat(server): Introduce Jersey to strengthen REST API #939
Conversation
# Conflicts: # coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorServer.java
|
Codecov Report
@@ Coverage Diff @@
## master #939 +/- ##
============================================
- Coverage 58.54% 54.28% -4.26%
- Complexity 1611 2500 +889
============================================
Files 195 357 +162
Lines 11035 18153 +7118
Branches 966 1758 +792
============================================
+ Hits 6460 9855 +3395
- Misses 4195 7683 +3488
- Partials 380 615 +235
... and 164 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I'm kind of busy these days. Let me review this tomorrow. |
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.
Generally lgtm.
common/src/main/java/org/apache/uniffle/common/web/JettyServer.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/apache/uniffle/common/web/resource/PrometheusMetricResource.java
Outdated
Show resolved
Hide resolved
Is it possible to upgrade Jersey to at least 1.9+? Otherwise, new code may introduce lambda, and that would be crushed in runtime... |
I will try it. |
…ory leak (apache#773)" This reverts commit 89c2b92.
…apache#773) 1. To avoid memory leak by caching of proxy user UGI. Fix: apache#772 The Hadoop filesystem instance will be created too many time in cache, which will cause the shuffle server memory leak. As we know, the filesystem cache's key is built by the scheme、authority and UGI. The scheme and authority are not changed every time. But for UGI, if we invoke the createProxyUser, it will always create a new one, that means the every invoking `Filesystem.get()`, it will be cached due to different key. No. 1. Existing UTs 2. Added tests
…ory leak (apache#773)" This reverts commit 42d9b0a.
… leak (apache#773) (apache#824) 1. To avoid memory leak by caching of proxy user UGI. Fix: apache#772 The Hadoop filesystem instance will be created too many time in cache, which will cause the shuffle server memory leak. As we know, the filesystem cache's key is built by the scheme、authority and UGI. The scheme and authority are not changed every time. But for UGI, if we invoke the createProxyUser, it will always create a new one, that means the every invoking `Filesystem.get()`, it will be cached due to different key. No. 1. Existing UTs 2. Added tests
…ion when rss.storage.type without MEMORY. (apache#887)" This reverts commit 4423b43.
Already changed to use |
I also tried to solve it, but I introduced the hbase-shaded-jackson-jaxrs-json-provider package, you can not write the JsonConverter conversion class, I have resolved the conflict in #960, you see my way is okay? |
I tried to register resource in the same way as you before, but I found that I couldn’t get HttpServletRequest or HttpServletRequest, have you tested it and it’s ok? |
Hi @xianjingfeng and @slfan1989 this and #963 which one should be merged first? And by the way, seems like these two PRs both have PR failrures. |
It doesn't matter which one is merged first. But #963 should not contain the content that introduces jersey.
The failrure of this pr because of flaky test. |
@advancedxy @xianjingfeng From my personal point of view, this pr should be merged first. #963 is still under discussion, and yl09099 is currently working on the documentation. It might take some time before we can merge it. |
This PR should be merged first |
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.
Generally lgtm, left two minor comments
common/src/main/java/org/apache/uniffle/common/web/resource/PrometheusMetricResource.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/apache/uniffle/common/web/JerseyAutoDiscoverable.java
Show resolved
Hide resolved
@xianjingfeng This looks good to me now. I modified some content of the PR summary. Please amend/update accordingly if there are anything missing or left. Then I think we can squash and merge this PR. |
SGTM. Thanks for your work |
Merged. Thanks all. |
What changes were proposed in this pull request?
Introduce Jersey to strengthen REST API.
To use a new version of Jersey and being compatible with Hadoop 2.x, we have to use a shaded version of Jersery.
However Uniffle doesn't do binary release currently, we choose to introduce hbase's one as a temporary solution.
todo: release a shaded Jersey package for Uniffle's internal use or migrate to Graddle.
Why are the changes needed?
Fix: #864
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Added UT.