-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Java11 Prerequisites #4340
Merged
Merged
Java11 Prerequisites #4340
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,9 @@ shadowJar { | |
relocate 'org.abego.treelayout', 'datahub.shaded.treelayout' | ||
relocate 'org.slf4j', 'datahub.shaded.slf4j' | ||
relocate 'javax.annotation', 'datahub.shaded.javax.annotation' | ||
relocate 'com.github.benmanes.caffeine', 'datahub.shaded.com.github.benmanes.caffeine' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These were added due to the bump in pegasus version here. |
||
relocate 'org.checkerframework', 'datahub.shaded.org.checkerframework' | ||
relocate 'com.google.errorprone', 'datahub.shaded.com.google.errorprone' | ||
finalizedBy checkShadowJar | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
/** | ||
* In memory ranker that re-ranks results returned by the search backend | ||
*/ | ||
public abstract class SearchRanker { | ||
public abstract class SearchRanker<U extends Comparable<? super U>> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compiles with java 11 |
||
|
||
/** | ||
* List of feature extractors to use to fetch features for each entity returned by search backend | ||
|
@@ -26,15 +26,15 @@ public abstract class SearchRanker { | |
/** | ||
* Return a comparable score for each entity returned by search backend. The ranker will rank based on this score | ||
*/ | ||
public abstract Comparable<?> score(SearchEntity searchEntity); | ||
public abstract U score(SearchEntity searchEntity); | ||
|
||
/** | ||
* Rank the input list of entities | ||
*/ | ||
public List<SearchEntity> rank(List<SearchEntity> originalList) { | ||
return Streams.zip(originalList.stream(), fetchFeatures(originalList).stream(), this::updateFeatures) | ||
.map(entity -> new ScoredEntity(entity, score(entity))) | ||
.sorted(Comparator.<ScoredEntity, Comparable>comparing(ScoredEntity::getScore).reversed()) | ||
.map(entity -> new ScoredEntity<>(entity, score(entity))) | ||
.sorted(Comparator.<ScoredEntity<U>, U>comparing(ScoredEntity::getScore).reversed()) | ||
.map(ScoredEntity::getEntity) | ||
.collect(Collectors.toList()); | ||
} | ||
|
@@ -62,9 +62,9 @@ private SearchEntity updateFeatures(SearchEntity originalEntity, Features featur | |
} | ||
|
||
@Value | ||
protected static class ScoredEntity { | ||
protected static class ScoredEntity<U extends Comparable<? super U>> { | ||
SearchEntity entity; | ||
// Takes in any comparable object. Ranker uses it to order it in a descending manner | ||
Comparable<?> score; | ||
U score; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
This was bumped to support gradle 6, the old version did not support it. Decided to conservatively increase this version to what appeared to be the latest stable 29.x without moving to the very latest 30.x. Didn't want to move too fast here.