AMBARI-26309: Ambari server takes up about an hour to start #3950
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Issue details see: AMBARI-26309
There are several changes in this PR, as following.
Upgrade eclipselink to 4.0.5.
This change mainly solves the problem of long-time hanging when starting ambari-server.
This issue does exists in eclipselink 2.7.14, issue details see: Slow startup because of low entropy for PRNG eclipse-ee4j/eclipselink#2075
And this issue was fixed in eclipselink 4.0.5, details see: [4.0] Fix #2075 Slow startup because of low entropy for PRNG (#2318) eclipse-ee4j/eclipselink#2335
Upgrade to JPA 3.x
eclipselink 4.x follows JPA 3.x specification.
And an important change in JPA 3 is the change in package names, from javax.persistence to jakarta.persistence.
So, I have added the jakarta.persistence-api-3.1.0 to ambari project, and update package name from javax.persistence to jakarta.persistence.
Upgrade guice to 7.0.0
The reason: guice didnot add support for jakarta.inject until version 7.0.0, issue details see: jakarta.inject support google/guice#1383, and Guice 7.0.0 changes see: https://github.com/google/guice/wiki/Guice700#:~:text=JEE%20Jakarta%20Transition,7.0%20are%20identical
How was this patch tested?
I have already manually tested it, amabri-server can start and run normally.
Please review Ambari Contributing Guide before opening a pull request.