Skip to content

Commit

Permalink
Remove unused timeout from HttpClientProperties and ResourceManager (#…
Browse files Browse the repository at this point in the history
…395)

* Miscellaneous minor improvements

* Remove timeout from ResourceManager and separate timeout from HttpClientProperties

---------

Co-authored-by: ohad bitton <32278684+ohadbitt@users.noreply.github.com>
  • Loading branch information
yihezkel and ohadbitt authored Nov 12, 2024
1 parent 84218c1 commit ab29102
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
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

0 comments on commit ab29102

Please sign in to comment.