You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ep...@apache.org on 2023/05/02 19:30:13 UTC
[solr] 01/01: Fix SOLR-13605 build issues
This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch fix_SOLR-13605
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 35c48ce2784c269e22b4ffd39a5bc5ea22c6afbc
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Tue May 2 15:29:53 2023 -0400
Fix SOLR-13605 build issues
---
.../solrj/impl/ConcurrentUpdateSolrClient.java | 33 ++++++++--------------
.../solrj/impl/DelegationTokenHttpSolrClient.java | 11 --------
2 files changed, 11 insertions(+), 33 deletions(-)
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
index 212153467f1..822048d83ae 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
@@ -83,8 +83,8 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
volatile CountDownLatch lock = null; // used to block everything
final int threadCount;
boolean shutdownExecutor = false;
- int pollQueueTime = 250;
- int stallTime;
+ int pollQueueTimeMillis = 250;
+ int stallTimeMillis;
private final boolean streamDeletes;
private boolean internalHttpClient;
private final int connectionTimeout;
@@ -116,6 +116,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
this.streamDeletes = builder.streamDeletes;
this.connectionTimeout = builder.connectionTimeoutMillis;
this.soTimeout = builder.socketTimeoutMillis;
+
this.pollQueueTimeMillis = builder.pollQueueTime;
this.stallTimeMillis = Integer.getInteger("solr.cloud.client.stallTime", 15000);
@@ -157,18 +158,6 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
return this.client.getUrlParamNames();
}
- /**
- * Expert Method.
- *
- * @param queryParams set of param keys to only send via the query string
- * @deprecated use {@link ConcurrentUpdateSolrClient.Builder#withTheseParamNamesInTheUrl(Set)}
- * instead
- */
- @Deprecated
- public void setQueryParams(Set<String> queryParams) {
- this.client.setQueryParams(queryParams);
- }
-
/** Opens a connection and sends everything... */
@SuppressWarnings({"unchecked"})
class Runner implements Runnable {
@@ -240,7 +229,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
notifyQueueAndRunnersIfEmptyQueue();
try {
inPoll = true;
- update = queue.poll(pollQueueTime, TimeUnit.MILLISECONDS);
+ update = queue.poll(pollQueueTimeMillis, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
if (log.isDebugEnabled()) pollInterrupts.incrementAndGet();
continue;
@@ -307,7 +296,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
try {
while (true) {
try {
- upd = queue.poll(pollQueueTime, TimeUnit.MILLISECONDS);
+ upd = queue.poll(pollQueueTimeMillis, TimeUnit.MILLISECONDS);
break;
} catch (InterruptedException e) {
if (log.isDebugEnabled()) pollInterrupts.incrementAndGet();
@@ -584,7 +573,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
} else {
long currentStallTime =
TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - lastStallTime);
- if (currentStallTime > stallTime) {
+ if (currentStallTime > stallTimeMillis) {
throw new IOException(
"Request processing has stalled for "
+ currentStallTime
@@ -645,7 +634,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
} else {
long currentStallTime =
TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - lastStallTime);
- if (currentStallTime > stallTime) {
+ if (currentStallTime > stallTimeMillis) {
throw new IOException(
"Task queue processing has stalled for "
+ currentStallTime
@@ -740,7 +729,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
lastStallTime = System.nanoTime();
} else {
long currentStallTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - lastStallTime);
- if (currentStallTime > stallTime) {
+ if (currentStallTime > stallTimeMillis) {
throw new IOException(
"Task queue processing has stalled for "
+ currentStallTime
@@ -851,12 +840,12 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
*/
@Deprecated
public void setPollQueueTime(int pollQueueTime) {
- this.pollQueueTime = pollQueueTime;
+ this.pollQueueTimeMillis = pollQueueTime;
// make sure the stall time is larger than the polling time
// to give a chance for the queue to change
int minimalStallTime = pollQueueTime * 2;
- if (minimalStallTime > this.stallTime) {
- this.stallTime = minimalStallTime;
+ if (minimalStallTime > this.stallTimeMillis) {
+ this.stallTimeMillis = minimalStallTime;
}
}
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/DelegationTokenHttpSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/DelegationTokenHttpSolrClient.java
index 02f5ba2ece8..7e151513fa0 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/DelegationTokenHttpSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/DelegationTokenHttpSolrClient.java
@@ -47,15 +47,4 @@ public class DelegationTokenHttpSolrClient extends HttpSolrClient {
return super.createMethod(request, collection);
}
- @Deprecated
- @Override
- public void setQueryParams(Set<String> urlParamNames) {
- urlParamNames = urlParamNames == null ? Set.of(DELEGATION_TOKEN_PARAM) : urlParamNames;
- if (!urlParamNames.contains(DELEGATION_TOKEN_PARAM)) {
- urlParamNames = new HashSet<>(urlParamNames);
- urlParamNames.add(DELEGATION_TOKEN_PARAM);
- urlParamNames = Collections.unmodifiableSet(urlParamNames);
- }
- super.setQueryParams(urlParamNames);
- }
}