-
Notifications
You must be signed in to change notification settings - Fork 5
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
Updated code for better caching and reruning the indexer in place #1226
base: stage
Are you sure you want to change the base?
Conversation
@@ -23,6 +23,9 @@ public interface VocabularyRESTInterface { | |||
@POST | |||
@Path("/find") | |||
@JsonView({View.FieldsAndLists.class}) | |||
SearchResponse<VocabularyTerm> find(@DefaultValue("0") @QueryParam("page") Integer page, @DefaultValue("10") @QueryParam("limit") Integer limit, HashMap<String, Object> params); | |||
SearchResponse<VocabularyTerm> find( | |||
@DefaultValue("0") @QueryParam("page") Integer page, |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck> reported by reviewdog 🐶
Line must not have trailing whitespace
SearchResponse<VocabularyTerm> find(@DefaultValue("0") @QueryParam("page") Integer page, @DefaultValue("10") @QueryParam("limit") Integer limit, HashMap<String, Object> params); | ||
SearchResponse<VocabularyTerm> find( | ||
@DefaultValue("0") @QueryParam("page") Integer page, | ||
@DefaultValue("10") @QueryParam("limit") Integer limit, |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck> reported by reviewdog 🐶
Line must not have trailing whitespace
@@ -168,6 +168,10 @@ public <D extends ESDocument> void indexDocuments(Iterable<D> docs, Class<?> vie | |||
} else { | |||
json = om.writeValueAsString(doc); | |||
} | |||
if(json.length() > 19_000_000) { |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck> reported by reviewdog 🐶
'if' is not followed by whitespace.
@@ -30,7 +30,9 @@ public void index() { | |||
log.info("Pulling All Terms Finished"); | |||
|
|||
Iterable<SearchableItemDocument> docs = goTrans.translateEntities(terms); | |||
docs.forEach(doc -> doc.setPopularity(popularityScore.get(doc.getPrimaryKey()))); | |||
for(SearchableItemDocument doc: docs) { |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck> reported by reviewdog 🐶
'for' is not followed by whitespace.
@@ -337,14 +364,15 @@ public Map<String, Map<String, Set<Allele>>> getAllAllelesCache() { | |||
} | |||
|
|||
public void fixupAllelesWithVariants(Set<Allele> allAlleles, Set<Allele> allelesWithVariants) { | |||
allelesWithVariants.forEach(allele -> { | |||
getTranscriptWithExonInfo(); | |||
for(Allele allele: allelesWithVariants) { |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck> reported by reviewdog 🐶
'for' is not followed by whitespace.
|
||
alleleSynonymMap = new HashMap<>(); | ||
|
||
for(Allele a: alleleSynonymsIter) { |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck> reported by reviewdog 🐶
'for' is not followed by whitespace.
|
||
alleleCrossReferenceMap = new HashMap<>(); | ||
|
||
for(Allele a: alleleCrossReferenceIter) { |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck> reported by reviewdog 🐶
'for' is not followed by whitespace.
for (Allele a : allelesWithVariants) { | ||
if(alleleSynonymMap.containsKey(a.getPrimaryKey())) { |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck> reported by reviewdog 🐶
'if' is not followed by whitespace.
if(alleleSynonymMap.containsKey(a.getPrimaryKey())) { | ||
a.setSynonyms(alleleSynonymMap.get(a.getPrimaryKey())); | ||
} | ||
if(alleleCrossReferenceMap.containsKey(a.getPrimaryKey())) { |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck> reported by reviewdog 🐶
'if' is not followed by whitespace.
if (a.getVariants() != null && a.getVariants().size() > 0) { | ||
for (Variant v : a.getVariants()) { | ||
if(variantSOTermMap.containsKey(v.getPrimaryKey())) { |
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.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck> reported by reviewdog 🐶
'if' is not followed by whitespace.
No description provided.