[Improve][Connector-V2][starrocks-source] Support to specify warehouse for starrocks sink#10294
[Improve][Connector-V2][starrocks-source] Support to specify warehouse for starrocks sink#10294LiJie20190102 wants to merge 1 commit into
Conversation
…for starrocks sink
|
Hi @LiJie20190102, thanks for the focused StarRocks improvement. I reviewed this PR locally on branch What This PR Solves
Simple example: if the StarRocks cluster has 1. Code Change Review1.1 Core Logic AnalysisThe runtime path is: Before: headerMap.put("format", sinkConfig.getLoadFormat().name().toUpperCase());
headerMap.put(
"Authorization",
getBasicAuthHeader(sinkConfig.getUsername(), sinkConfig.getPassword()));
return headerMap;After: headerMap.put(
"Authorization",
getBasicAuthHeader(sinkConfig.getUsername(), sinkConfig.getPassword()));
Optional.ofNullable(sinkConfig.getWarehouseName())
.ifPresent(warehouse -> headerMap.put("warehouse", warehouse));
return headerMap;Key findings:
1.2 Compatibility ImpactJudgment: fully compatible. No public Java API, default value, protocol, or serialization format changes. If 1.3 Performance / Side EffectsThe impact is negligible: one optional string read and one HTTP header entry when configured. Retry, label idempotency, checkpoint behavior, resource release, and existing StarRocks flush logic are unchanged. 1.4 Error Handling And LogsThe PR does not add new error handling. If StarRocks rejects an invalid warehouse, the existing Stream Load response handling will throw Issue 1: The PR conflicts with the current
Issue 2: The added docs rows contain trailing whitespace
2. Code QualityThe Java implementation is small and consistent with the existing option/config/header pattern. The test config adds 3. ArchitectureThis is a precise, maintainable change. It keeps the SeaTunnel-facing option readable while mapping to the StarRocks Stream Load header at the boundary where HTTP requests are built. 4. Issue Summary
5. Merge DecisionConclusion: can merge after fixesBlocking item:
Recommended non-blocking item:
Overall, the code-level change looks correct. After the docs conflict is resolved and formatting is cleaned up, this should be mergeable. A small header-construction regression test would be a nice extra safeguard. |
Support to specify warehouse for starrocks sink
Purpose of this pull request
Reference StarRocks/starrocks-connector-for-apache-flink#423
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
incompatible-changes.mdto describe the incompatibility caused by this PR.