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

Remove unused timeout from HttpClientProperties and ResourceManager #395

Merged
merged 4 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public static class HttpClientPropertiesBuilder {
private boolean keepAlive;
private Integer maxKeepAliveTime = 120;
private Integer maxConnectionsTotal = 40;
private Duration timeout = Duration.ofMinutes(10);
private Class<? extends HttpClientProvider> provider = null;
private ProxyOptions proxy = null;

Expand Down Expand Up @@ -180,17 +179,6 @@ public HttpClientPropertiesBuilder provider(Class<? extends HttpClientProvider>
return this;
}

/**
* Sets a response timeout to use by default on the client's requests.
*
* @param timeout the requested response timeout
* @return the builder instance
*/
public HttpClientPropertiesBuilder timeout(Duration timeout) {
this.timeout = timeout;
return this;
}

/**
* Sets a proxy server to use for the client.
*
Expand All @@ -206,5 +194,4 @@ public HttpClientProperties build() {
return new HttpClientProperties(this);
}
}

}
4 changes: 3 additions & 1 deletion data/src/test/resources/simplelogger.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
# Default logging detail level for all instances of SimpleLogger.
# Must be one of ("trace", "debug", "info", "warn", or "error").
# If not specified, defaults to "info".
org.slf4j.simpleLogger.log.com.microsoft.azure.kusto=debug
org.slf4j.simpleLogger.log.com.microsoft.azure.kusto=debug
#org.slf4j.simpleLogger.showDateTime=true
#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class ResourceManager implements Closeable, IngestionResourceManager {
private static final long REFRESH_INGESTION_RESOURCES_PERIOD = TimeUnit.HOURS.toMillis(1);
private static final long REFRESH_INGESTION_RESOURCES_PERIOD_ON_FAILURE = TimeUnit.MINUTES.toMillis(1);
private static final long REFRESH_RESULT_POLL_TIMEOUT_MILLIS = TimeUnit.SECONDS.toMillis(15);
public static final int UPLOAD_TIMEOUT_MINUTES = 10;
private final Client client;
private final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private Timer refreshTasksTimer;
Expand All @@ -74,7 +73,7 @@ public ResourceManager(Client client, long defaultRefreshTime, long refreshTimeO
this.client = client;
// Using ctor with client so that the dependency is used
this.httpClient = httpClient == null
? HttpClientFactory.create(HttpClientProperties.builder().timeout(Duration.ofMinutes(UPLOAD_TIMEOUT_MINUTES)).build())
? HttpClientFactory.create(HttpClientProperties.builder().build())
: httpClient;

// Refresh tasks
Expand Down
4 changes: 3 additions & 1 deletion ingest/src/test/resources/simplelogger.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
# Default logging detail level for all instances of SimpleLogger.
# Must be one of ("trace", "debug", "info", "warn", or "error").
# If not specified, defaults to "info".
org.slf4j.simpleLogger.log.com.microsoft.azure.kusto=debug
org.slf4j.simpleLogger.log.com.microsoft.azure.kusto=debug
#org.slf4j.simpleLogger.showDateTime=true
#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
Loading