Skip to content
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

Open
wants to merge 1 commit into
base: stage
Choose a base branch
from

Conversation

oblodgett
Copy link
Member

No description provided.

@oblodgett oblodgett requested a review from cmpich January 24, 2025 19:46
@@ -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,

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,

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) {

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) {

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) {

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) {

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) {

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())) {

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())) {

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())) {

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants