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

feat(csharp/src/Drivers/Apache/Spark): add request_timeout_ms option to allow longer HTTP request length #2218

Merged

Conversation

birschick-bq
Copy link
Contributor

@birschick-bq birschick-bq commented Oct 4, 2024

Adds a new connection option to allow longer HTTP request length

Property Description Default
adbc.spark.http_request_timeout_ms Sets the timeout (in milliseconds) when making requests to the Spark server (type: http). Set the value higher than the default if you notice errors due to network timeouts. 30000

@github-actions github-actions bot added this to the ADBC Libraries 15 milestone Oct 4, 2024
@birschick-bq birschick-bq reopened this Oct 4, 2024
@birschick-bq birschick-bq marked this pull request as draft October 4, 2024 17:37
@birschick-bq
Copy link
Contributor Author

Need to add unit tests for the range of values.

@birschick-bq birschick-bq marked this pull request as ready for review October 4, 2024 20:51
@@ -75,6 +75,8 @@ internal async Task OpenAsync()

protected internal HiveServer2TlsOption TlsOptions { get; set; } = HiveServer2TlsOption.Empty;

protected internal int RequestTimeout { get; set; } = 30000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly pedantic, but should this specify that it is an HTTP timeout since we may support other ways of connecting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated properties and options to indicate its use with the HTTP type connection.

@@ -32,6 +32,7 @@ public static class SparkParameters
public const string Type = "adbc.spark.type";
public const string DataTypeConv = "adbc.spark.data_type_conv";
public const string TLSOptions = "adbc.spark.tls_options";
public const string RequestTimeoutMilliseconds = "adbc.spark.request_timeout_ms";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline with the property name, I wonder if the setting name should also specify this is for HTTP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated properties and options to indicate its use with the HTTP type connection.

@@ -51,5 +51,8 @@ public class ApacheTestConfiguration : TestConfiguration
[JsonPropertyName("polltime_milliseconds"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string PollTimeMilliseconds { get; set; } = string.Empty;

[JsonPropertyName("request_timeout_ms"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here -- for the JSON property and C# property name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated properties and options to indicate its use with the HTTP type connection.

Copy link
Contributor

@CurtHagenlocher CurtHagenlocher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@CurtHagenlocher CurtHagenlocher merged commit 5f1f675 into apache:main Oct 9, 2024
6 checks passed
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.

3 participants