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

TASK-6981 - Should not use same Solr timeout for reading and for indexing #2512

Open
wants to merge 6 commits into
base: release-3.x.x
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
search: update according to java-common-libs changes, and recover the…
… deleled methods to mark them as deprecated for backward-compatibility, #TASK-6981
jtarraga committed Sep 30, 2024
commit c8a00b04b60c34c67976ef3b36d01a429d3c80f9
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@
import java.util.Collections;
import java.util.List;

import static org.opencb.opencga.core.config.Configuration.reportUnusedField;

/**
* Created by wasim on 09/11/16.
*/
@@ -88,6 +90,17 @@ public String toString() {
return sb.toString();
}

@Deprecated
public String getHost() {
return null;
}

@Deprecated
public SearchConfiguration setHost(String host) {
reportUnusedField("search.configuration#host", host);
return this;
}

public List<String> getHosts() {
return hosts;
}
@@ -169,6 +182,16 @@ public SearchConfiguration setWriteTimeout(int writeTimeout) {
return this;
}

@Deprecated
public int getRows() {
return 0;
}

@Deprecated
public SearchConfiguration setRows(int rows) {
reportUnusedField("search.configuration#rows", rows);
return this;
}
public int getInsertBatchSize() {
return insertBatchSize;
}
Original file line number Diff line number Diff line change
@@ -693,11 +693,6 @@ public SolrClient getSolrClient() {
return solrManager.getSolrClient();
}

public VariantSearchManager setSolrClient(SolrClient solrClient) {
this.solrManager.setSolrClient(solrClient);
return this;
}

public SolrQueryParser getSolrQueryParser() {
return solrQueryParser;
}
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@
import org.opencb.commons.datastore.core.ObjectMap;
import org.opencb.commons.datastore.core.Query;
import org.opencb.commons.datastore.core.QueryOptions;
import org.opencb.commons.datastore.solr.SolrManager;
import org.opencb.opencga.core.api.ParamConstants;
import org.opencb.opencga.storage.core.variant.query.VariantQueryResult;
import org.opencb.opencga.storage.core.StoragePipelineResult;
@@ -92,8 +93,8 @@ public void before() throws Exception {
// new Exception().printStackTrace();
// return invocation.callRealMethod();
// }).when(solrClient).query(anyString(), any());
// Configure variant storage engine by using the current solrClient
solr.configure(this.variantStorageEngine);
variantStorageEngine.getVariantSearchManager().setSolrClient(solrClient);
for (VariantQueryExecutor variantQueryExecutor : variantStorageEngine.getVariantQueryExecutors()) {
if (variantQueryExecutor instanceof SearchIndexVariantQueryExecutor) {
this.variantQueryExecutor = ((SearchIndexVariantQueryExecutor) variantQueryExecutor);
Original file line number Diff line number Diff line change
@@ -116,8 +116,8 @@ public VariantSearchManager configure(VariantStorageEngine variantStorageEngine)
variantStorageEngine.getConfiguration().getSearch().setMode("core");
variantStorageEngine.getConfiguration().getSearch().setActive(true);
VariantSearchManager variantSearchManager = variantStorageEngine.getVariantSearchManager();
// Configure variant search manger by using the current solrClient
variantSearchManager.setSolrManager(new SolrManager(solrClient, "localhost", "core"));
variantSearchManager.setSolrClient(solrClient);
return variantSearchManager;
}