Commit 97d355d
[SNOW-3249917] JDBC removal Step 11a (part 2): Replicate HttpUtil, swap callers (#1144)
* [SNOW-3249917] JDBC removal Step 11a (part 2): Replicate HttpUtil, swap callers to replicated REST infrastructure
Replicate JDBC's HttpUtil as JdbcHttpUtil (renamed to avoid collision with
ingest's existing net.snowflake.ingest.utils.HttpUtil). Also replicate
SnowflakeMutableProxyRoutePlanner and AttributeEnhancingHttpRequestRetryHandler
as small helper classes.
Key changes:
- JdbcHttpUtil: verbatim replication of JDBC HttpUtil with import swaps.
SFTrustManager replaced with null (ingest does not use OCSP trust manager).
SFSSLConnectionSocketFactory -> IngestSSLConnectionSocketFactory.
SystemUtil.convertSystemPropertyToIntValue inlined.
SessionUtil.isNewRetryStrategyRequest inlined as static method.
Deprecated S3 proxy wrapper methods omitted (S3HttpUtil callable directly).
- RestRequest: all FQN net.snowflake.client.core.HttpUtil references replaced
with JdbcHttpUtil. SessionUtil.isNewRetryStrategyRequest replaced with
JdbcHttpUtil.isNewRetryStrategyRequest.
- TelemetryClient: HttpUtil.executeGeneralRequest and HttpUtil.getSocketTimeout
replaced with JdbcHttpUtil equivalents. SnowflakeSQLException import swapped
to ingest's replicated version.
- SnowflakeGCSClient: HttpUtil.getHttpClient, getHttpClientWithoutDecompression,
getSocketTimeout replaced with JdbcHttpUtil equivalents. Added toIngestKey
adapter to convert JDBC's HttpClientSettingsKey during transition.
- SnowflakeAzureClient: setSessionlessProxyForAzure import swapped from JDBC
HttpUtil to JdbcHttpUtil.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add SFTrustManager and dependencies to avoid temporary OCSP gap
Replicate SFTrustManager (1689 lines) and its dependencies so JdbcHttpUtil
uses the real OCSP trust manager from the start, rather than temporarily
stubbing it to null.
New files: SFTrustManager, Constants, FileCacheManager, HexUtil,
OCSPTelemetryData.
Updated: JdbcHttpUtil (use real SFTrustManager), FileUtil (add methods
needed by FileCacheManager), IngestSSLConnectionSocketFactory, S3HttpUtil,
StorageClientUtil.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add bcutil-jdk18on as direct dependency for SFTrustManager
SFTrustManager uses BouncyCastle's bcutil (ASN1, OCSP types). It was
a transitive dependency but maven-dependency-plugin:analyze-only requires
it to be declared explicitly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 363bc93 commit 97d355d
18 files changed
Lines changed: 3814 additions & 52 deletions
File tree
- .plans
- src/main/java/net/snowflake/ingest
- connection/telemetry
- streaming/internal/fileTransferAgent
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
253 | 255 | | |
254 | 256 | | |
255 | 257 | | |
256 | | - | |
| 258 | + | |
257 | 259 | | |
258 | 260 | | |
259 | 261 | | |
| |||
274 | 276 | | |
275 | 277 | | |
276 | 278 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
281 | 283 | | |
282 | 284 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
289 | 293 | | |
290 | 294 | | |
291 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
985 | 985 | | |
986 | 986 | | |
987 | 987 | | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
988 | 992 | | |
989 | 993 | | |
990 | 994 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
0 commit comments