Alibaba MaxCompute (ODPS)¶
Status: Experimental. The streamfusion-odps-flink1.18 adapter targets Flink 1.18.1
and JDK 17. The reactor builds a separate shaded MaxCompute connector from the pinned
Flink 1.18.1 port, including the released Java Storage SDK 0.61.2-public.
The pinned revision and removal criteria are in vendor/maxcompute-flink-1.18/UPSTREAM.md.
Upstream Flink 1.18 port
Bounded file-cached Tunnel writes acknowledge each committed partition session to the writers that submitted it. End-of-input events account for peers without data, so a task can finish while other partition sessions commit. Commit retries reopen the original session and reuse its block list. If the connector opens a replacement session, it waits for replay from every writer that submitted the original one.
Build the standalone adapter with mvn -Pflink-1.18,odps -pl streamfusion-odps -am package -DskipTests
or include it in an optimized Flink 1.18 archive.
Archive build instructions
Install the adapter, maxcompute-connector-1.0.1-1.18-streamfusion-shaded.jar and matching StreamFusion
loader and core in Flink's lib directory. Keep one MaxCompute connector JAR in that
directory. The adapter uses the shaded SDK classes in the connector JAR and the native
library in core.
Enable StreamFusion as usual and continue using 'connector' = 'maxcompute' or the
MaxCompute catalog in SQL.
-Dstreamfusion.odps.enabled=false selects stock MaxCompute source and sink perimeters.
The emulator tests run catalog-backed batch and streaming SQL with per-statement
OPTIONS hints, partition pruning, and native Arrow reads and writes.
The optimized macOS arm64 archive was loaded by the official Flink 1.18.1 distribution with the separate MaxCompute connector JAR. Projected Arrow reads fed both Storage and coordinated Tunnel append jobs on emulator 1.2.0. Both plans kept Arrow between the MaxCompute operators, and both tables returned the expected rows.
SQL source¶
The adapter reuses the stock table source's partition selection and column projection, FLIP-27 split enumeration and serializers. Its reader receives Arrow batches from the SDK. The projected column list reaches MaxCompute's read-session API. A focused emulator test selects one field from a three-field table and checks both the physical Arrow schema and the SQL result. In batch SQL, the admitted Arrow reader supplies its own Flink source transformation, avoiding setup of the stock scan and row-conversion schema. For a partition-only or metadata-only query, the adapter requests one extra data column because the SDK interprets an empty data projection as all columns. It prefers a fixed-width scalar and discards the extra vector before the Rust handoff when the query needs a payload read. A bounded row-offset scan projecting only bucket metadata gets the exact row count and bucket values from its assigned split and skips the payload request. It emits Arrow batches up to the local limit and resumes at the saved offset. If the Flink SQL table omits all data columns, the planner looks up the extra column in the MaxCompute table schema. The adapter wraps the SDK's Arrow buffers as retained foreign allocations, passes them through the Arrow C Data Interface, and ties SDK reader lifetime to the last retained buffer. The split offset advances after a batch is emitted. A checkpoint test serializes the split after emitting one row and restores it with a larger SDK batch size. It verifies that the reader returns each remaining row exactly once. A row-range payload request starts at the saved offset. Byte-size splits skip the completed prefix in Arrow batches. The Storage API supplies character columns as Arrow UTF-8 and the C Data bridge validates their bytes on import. The batch planner uses this contract to keep eligible expressions and ordered limits in Arrow between MaxCompute operators. MaxCompute Storage API type mappings
Flink's unordered LIMIT hint caps each bounded Arrow split. A row-offset payload
request uses the capped range, including after a checkpoint restore.
Byte-size splits stop consuming the response at the cap and trim the last Arrow
batch if needed. Indexed bucket splits use the same Arrow batch trim and restore
by split index. Flink applies the final limit across splits. Ordered limits
keep their full scan so the sort sees every candidate.
scan.disk-spill.enabled keeps projected data in the SDK's Arrow IPC spill files.
The emulator tests force spill with a memory capacity of zero and verify stock
and native SQL results. They also hold a value buffer through Rust while the
split finishes, then check that closing the retained batch removes the spill
workspace. A byte-size split's background reader can spill rows beyond a
pushed limit before the consumer reaches the cap.
Reader teardown releases prefetched batches that Flink has yet to emit. A
delivered batch remains readable and keeps the SDK buffers alive until its
consumer releases it.
The reader fills the bucket_id and bucket_time Arrow vectors after trimming rows
for a restored offset or a local limit. Their buffers are sized for the emitted batch
and the timestamp writer is reused for the whole batch.
The published emulator covers bounded snapshot reads, including stock parity for bucket
metadata, partition pruning and the upstream source options suite. Projected snapshots of
partitioned primary-key tables also match after a committed replacement and delete. The
fixture exercises byte-size splits in batch SQL and row-offset splits in streaming SQL.
Both native jobs keep Arrow from the source through the append sink.
A released-SDK loopback fixture exercises bounded bucket scans in batch and
streaming SQL. It verifies that the projected data column and pruned partition
reach the session request, and that the split index and bucket metadata stay
distinct through the Arrow append sink. A serialized checkpoint fixture
restores an indexed bucket split with different Arrow batch boundaries and
keeps both bucket metadata values aligned with the surviving rows.
Physical bucket planning still needs live MaxCompute qualification.
Continuous transactional-table scans can reuse the released connector's
version discovery, bucket assignment and checkpoint serializers with the Arrow
reader. Loopback SQL tests cover reading from a snapshot version and starting
with a full snapshot before following changes. Both verify identical inserts,
update-before, update-after and deletes and check projection and partition
pruning across discovery windows. The recovery fixture starts from either a
version or a timestamp, checkpoints the first window, publishes the next
window, and fails a task on its delete. Stock and native Flink restore the
checkpoint and deliver the delete once. The first window's rows appear once.
After a timestamp start, subsequent requests use the resolved version and
retain the data projection and partition filter. Live Storage CDC still needs
qualification.
Continuous scans require a transactional primary-key table. For an unkeyed
append table, the released connector uses a bounded snapshot even when the
SQL requests a continuous start mode. On a primary-key Delta table,
continuous append mode requests APPEND windows from Storage. The loopback
SQL fixture verifies that two projected, partition-pruned windows deliver
only inserts. The released connector declares an update-capable changelog
to Flink for all continuous scans, including append mode.
Bounded incremental reads accept the connector's version and timestamp windows
for append and CDC. The Storage request keeps projection and partition pruning.
An unmodified scan or filter-only batch Calc forwards CDC row kinds. A dedicated
batch Calc follows Flink's insert-row convention when it builds new projected
rows. The existing Calc retains its serialized operator descriptor. The uncached
Tunnel INSERT writer applies the same insert-only check as the released
writer before routing batches. Local tests verify the fixed-window Arrow
responses and the exact timestamp bounds in the Storage API request. Live
version and timestamp windows still need service qualification.
The opt-in scan.partition.latest mode uses the released enumerator's
partition discovery and version windows with the Arrow reader. Before
acknowledging a switch, the reader closes the old fetcher and drops unread
batches. SQL parity tests publish a new partition through the emulator
catalog, verify the projected CDC session for that partition, and checkpoint
after the switch. The initial read can wait until the first regular discovery
tick when the startup scan begins before the reader is ready. After an injected
task failure, stock and native Flink
recover the new partition's version cursor and emit the retried change once.
Both leave the retired partition closed and omit its late writes. Live CDC
and Delta materialized views still need service qualification. Continuous scans
with connector metadata or pushed watermarks use the stock path.
A loopback fixture using the released Java SDK verifies that a projected incremental
read keeps both supported operation-column layouts aligned with their rows when an
indexed split resumes with different Arrow batch boundaries and a local row cap.
The fixture checks the projection in the session request and the payload and change-kind
buffer addresses after the Rust handoff.
An emulator snapshot fixture drives the latest-partition reader's epoch events.
It verifies that switching wakes an idle reader, releases old prefetched batches,
and resumes the new split from its saved position. The stock
connector rejects lookup joins. Unsupported watermark expressions and physical layouts use the
stock connector.
Bounded reads support periodic and on-event watermark pushdown for verified timestamp expressions.
The emulator fixture compares stock and native tumbling-window results with two-phase
aggregation and an ODPS append sink. The native plan keeps Arrow batches through the window
shuffle. The source checkpoint fixture verifies that a restored offset or local limit excludes
discarded rows from the watermark candidate.
With scan.watermark.emit.strategy=on-event, the reader evaluates candidates once per SDK
batch and slices at advances so Flink sees the watermark before any later row. Runs of rows
that do not advance it stay together within the SDK batch. A watermark that advances on every
row produces one-row Arrow batches. Each emitted slice advances the split's checkpoint offset.
The late-data test matches stock Flink when the strategy is set in the table options or an SQL
OPTIONS hint. The native reader reuses Flink's configured alignment group, drift and update
interval. A paused split fetcher waits for Flink's wake-up signal. Any buffered Arrow slice stays
in the reader and resumes at the same checkpoint offset. Tight alignment on Flink 1.18.1
can stall bounded jobs with skewed splits in both stock and native execution. Flink tracks the
finished-subtask limitation in FLINK-35157.
SQL sink¶
Coordinated writes use the released connector's column type checks during planning.
Partition grouping requires at least one dynamic partition column.
The original SQL connector lacks Flink's SupportsOverwrite ability. Stock Flink
and StreamFusion reject INSERT OVERWRITE before writing to either a whole table
or a static partition.
Use 'sink.coordinator.enable' = 'false' to select the Storage API. The adapter supplies
Arrow batches to the released connector's real-time writer. It uses the SDK's buffers, retries,
flush, and session lifecycle. It generates an Arrow operation column for primary-key writes.
Batch append sends mixed-partition Arrow batches to that writer for server-side routing.
The streaming SQL fixture holds an unbounded input idle between two records
and reads each result back from the pinned emulator before the job ends. It exercises
timer and checkpoint flushes with the Storage writer and checkpoint commits
with coordinated Tunnel Arrow append.
The planner drops Flink's generated partition-grouping sort for Storage append,
Tunnel append and full-row batch upsert. These writers group Arrow batches where
needed. Explicit SQL ordering, ordered limits and partition exchanges are preserved.
The emulator checks persisted partition results for Storage, coordinated Tunnel,
grouped Tunnel, cached Tunnel and standalone Tunnel in batch SQL.
The release-build run passed all 112 adapter cases and the same 26 pinned
upstream partition and writer-mode cases in stock and native mode.
The Storage writer applies insert.arrow-writer.batch-size to the rows in each
Arrow write. Tunnel INSERT and cached Tunnel INSERT also use the setting with
their released writer's flush threshold. A batch within the limit is sent
directly. Larger ones are sliced within Arrow and kept in order.
The bucket router reads key vector values using the stock connector's ODPS hash rules and
groups Arrow batches by writer. A fixed partition uses one cached destination
per bucket, computed by the released selector. The dynamic shuffle uses the
released connector's assignment coordinator and updates at checkpoint boundaries.
It reuses partition names for repeated Arrow values within a batch.
When a batch has one destination,
the router forwards the original vectors. When every destination occupies one
consecutive range, the router sends retained Arrow slices. Rows scattered across
destinations are gathered in Rust, preserving order within each destination.
Flink's upsert materializer, when required, uses native keyed state and
Arrow exchanges. Generated ARRAY, ROW and MAP values use Arrow child buffers at the writer.
Tests verify append-only writes and full-row primary-key mutations. The real-time Arrow path supports fixed partitions and dynamic STRING, CHAR, VARCHAR and signed integer partitions with the released table-wide Storage stream. The batch carries each partition value alongside its operation on primary-key writes. String defaults for null and empty keys respect the SQL column width. When string normalization rewrites a vector, unchanged values copy directly between Arrow buffers. The real-time writer rejects null integer keys before sending the batch, matching the released writer's failure when its string default reaches an integer column. Non-null integer keys retain their Arrow width.
Loopback tests compare the released writer and the native writer for fixed and dynamic partition routing, dynamic shuffle, empty partition defaults, null overwrites, deletes and per-key ordering. The stock parity control keeps the partition normalizer at input parallelism. The published connector can otherwise reorder mutations before routing. The Arrow route normalizes without an intermediate row shuffle. Upstream ordering fix
Coordinated full-row primary-key upserts use checkpointed Arrow Storage batches when a
streaming partition has one writer. This includes a sink with 'sink.parallelism' = '1' and
grouped dynamic partitions. Flink's committer reopens each staged session after the
checkpoint completes and retries a lost commit response against that session.
A full-row Arrow upsert requires the warehouse keys and non-null columns in the Flink
declaration. Omitted nullable non-key columns receive null vectors. Replacing a row
clears the old values in those columns, as the released coordinated writer does.
Emulator readback matches the stock writer for omitted string and array columns
with one and two bounded writers and a file-cached streaming writer.
The release build passed 13 focused adapter cases and the same 19 pinned
upstream array, partition and upsert cases in stock and StreamFusion.
All 16 expected native job graph checks passed.
In batch SQL, the one-writer sink groups keys within each Arrow batch. With
sink.group-partition.enable, the Arrow partition shuffle gives each partition
to one writer. A bounded CDC fixture sends interleaved changes through both routes.
Stock and native readback match for grouped uncached writes and one-writer
writes with or without caching. Native grouped cached writes commit with both
writers active and with one idle. The released stock grouped cache reached the
45-second job timeout in both layouts while waiting for end-of-input
checkpoint acknowledgment. Upstream cached checkpoint fix
The release build passed 117 adapter cases and all 16 pinned upstream partition
and upsert cases in each mode. Submitted graphs verified the native writer in
the three upstream streaming full-row upsert cases.
Batch SQL also supports multiple bucket writers for the same partition. The job coordinator allocates one Storage session per partition and the writers upload their own Arrow streams into it. Only stream IDs and attempt versions cross the final blocking exchange. The committer publishes the selected streams together at bounded end of input. The native bucket router replaces the stock partition-grouping sort, and the writer groups partition keys within the Arrow batches it receives. The emulator tests confirm two streams per static or dynamic partition, successful recovery of a failed writer attempt, and a lost commit response.
Streaming SQL supports multiple bucket writers for unpartitioned tables, static partitions
and dynamic partitions with Flink's exactly-once or at-least-once checkpoint mode.
For a known target the coordinator reserves the next session before Flink starts
the barrier. For a dynamic
partition the writer requests a session on first use in each epoch. Flink's coordination
RPC can return the shared session ID while the checkpoint holds operator events.
Subsequent batches reuse the open Arrow stream. The coordinator caches successful
partition creation to avoid repeating catalog calls for recently used partitions.
Ungrouped upserts enforce sink.dynamic-partition.limit when they open a new dynamic
partition session. The limit defaults to 100 distinct partitions per bounded batch or
streaming checkpoint epoch. Grouped writes use the released connector's grouping
semantics. The emulator tests cover rejection before publication and successful
reuse at the configured limit.
The pinned SQL upsert keeps its coordinated writer when
sink.standalone.enable or insert.streaming-tunnel.enable is set.
The released SQL upsert also accepts sink.commit.async.enable,
sink.partition.assigner.class, and upsert.write.bucket.num without
applying them to its write path. Setting any of these options keeps eligible
cached and uncached upserts on the Arrow path.
Non-default upsert.writer.max-retries selects the released coordinated writer.
The released writer uses max(1, retries + 1) as the multiplier for
sink.read.timeout when setting its Tunnel operation deadline.
Each writer seals its Arrow streams and sends commit metadata before forwarding the barrier. The committer waits for every writer to move beyond the epoch and then publishes each partition using its shared session. Only checkpoint markers and stream metadata enter Flink state. In at-least-once mode, the committer can receive a later manifest while waiting for another writer's checkpoint barrier. The durable snapshot uses the checkpoint's epoch and leaves later manifests to Flink's replay. Tests cover a writer ending early, overlapping checkpoints, delayed session replies, lost commit responses, and writer recovery after earlier checkpoints have published data. Java SDK Storage sessions
With unaligned checkpoints, Flink captures in-flight Arrow IPC on the bucket shuffle. The single committer still receives an aligned barrier on the manifest exchange, so it can publish all the streams for each partition together. Restoring channel state across this bucket edge requires the original parallelism on both sides. Use an aligned savepoint when changing that parallelism. The emulator fixture waits for the injected Storage session delay and selects a retained checkpoint containing channel data. It restores the checkpoint into a new job and checks the resumed source offset and all rows. Unaligned checkpoints in Flink 1.18
Unpartitioned, static and dynamic partition INSERT use the Arrow Tunnel writer when
eligible, including when insert.arrow-writer.enable is omitted. Set
'insert.arrow-writer.enable' = 'false' to select the released Tunnel record writer.
An omitted Arrow option also keeps the record writer when the table configures a
non-default insert.writer.buffer-size.
Coordinated INSERT accepts shared upsert.partial-column.* table options
and keeps eligible appends in Arrow. The released INSERT writer ignores those
options. Partial-column upserts use the released Tunnel writer.
When the Flink declaration omits warehouse data columns, the Arrow writer
supplies null vectors for those columns and retains the supplied column buffers.
Coordinated, standalone and grouped modes retain
the released connector's session, block and checkpoint lifecycle. Grouped mode sends each
partition's Arrow batch to its assigned writer in one shuffle. The writer reads the partition
from the first batch position. The Tunnel router reuses destinations for repeated Arrow keys
within each batch, including interleaved batches with dozens of partitions.
Coordinated Tunnel append and checkpointed Storage upsert
read STRING, VARCHAR, CHAR, TINYINT, SMALLINT, INT and BIGINT partition keys directly from
Arrow vectors. Integers are formatted as signed decimal values. Null keys use the configured
partition default. The Arrow file-cache path preserves the released coordinator,
executor, file rolling and retry protocol. Its spill payload is framed Arrow IPC. The grouped
and ungrouped emulator fixtures each recover after an injected upload error and verify
their partitions and spill cleanup. A coordinated non-cached SQL fixture sends 10,032
rows in Arrow batches while the emulator delays the Tunnel session reply. It verifies the
injected delay, every output row and the columnar job plan.
Checkpointed Storage upserts also support 'sink.file-cached.enable' = 'true'. Each
writer streams Arrow IPC into one task-local file at a time in sink.file-cached.tmp.dirs.
It rolls the file at sink.file-cached.rolling.max-size and drains remaining data before the
current checkpoint or bounded input can finish. The writer uploads files in arrival order
to its Storage streams. Setting sink.file-cached.flush.always to false buffers writes in a
segment of the configured size. A synchronous upload retry reuses the SDK's buffered Arrow bytes and
stream offset. The completed checkpoint stores the staging manifest. Flink replays input
from its checkpoint if a task loses its local spill. The adapter deletes those files
after upload or task teardown. Tests cover grouped partitions, shared batch and streaming
sessions, rolled files, deletes, upload retries after a lost acknowledgment, and recovery
from both aligned and unaligned checkpoints.
Top-level NOT NULL ERROR and DROP and Flink 1.18's TRIM_PAD length policy apply to batches before routing. TRIM_PAD rewrites affected CHAR, VARCHAR, BINARY and VARBINARY vectors. Streaming Tunnel's record packs, explicitly selected record writers, coordinated primary-key Tunnel upserts outside the checkpointed Storage route, and partial-column mutations use stock execution. The released streaming Tunnel session accepts record packs. The same idle-input test verifies its checkpoint flush with both planner configurations. The real-time writer has the same at-least-once delivery as the released real-time path. SDK IPC serialization, compression and transport allocate their output buffers. The Arrow handoff retains compatible arrays. Physical conversion and bucket gathering allocate only the vectors or outputs they change.
Emulator verification¶
With Docker and JDK 17, python3 bin/odps-suite.py ports the pinned upstream emulator
integration test sources by rewriting shaded SDK imports. It checks all 214 pinned JUnit
invocation identities in both stock Flink and StreamFusion and records native MaxCompute
nodes in successful jobs.
The MaxCompute merge gate runs the stock upstream suite, native upstream suite,
and adapter suite in separate Flink 1.18.1 and JDK 17 jobs. Each upstream job
checks the same pinned invocation fingerprint. The native job also checks the
submitted Arrow plans. The jobs share the test-native libraries and an offline
Maven cache primed for the MaxCompute and upstream-test profiles.
Upstream upsert tests that inject a Tunnel-specific fault retain the Tunnel sink for the
duration of that case. Native source acceleration can still run. The separate Storage
tests exercise the Arrow sink and its fault rules. Each mode uses a separate loopback-only,
digest-pinned emulator.
The runner reuses a local image when its ID matches the pinned emulator release. If Docker cannot reach the registry and the image is missing, download the official Linux amd64 archive. Pinned emulator release
Run the same suite with the archive path.
python3 bin/odps-suite.py --emulator-archive /path/to/maxcompute-emulator-1.2.0-linux-amd64.tar.gz
The runner validates the release archive checksum and uses the verified local image ID for both modes. This replaces the registry pull for the emulator. The suite still resolves Maven dependencies and the pinned upstream test sources normally.
The harness validates the submitted job separately for 63 upstream SQL invocations. These cover projected reads, the codec and writer-mode matrices, arrays and type boundaries, partition writes, and primary-key mutations. Arrow round trips, including the upstream SQL cases that leave the Arrow writer option unset, must use both native ODPS operators in the INSERT job and keep Arrow between them. The Streaming Tunnel record-pack cases must show the native scan and stock sink in the INSERT job. The primary-key cases check the streaming update and delete job, including the released partial-column writers.
With the default Tunnel Arrow writer, the 38 upstream writer-mode, codec, array and type-boundary invocations passed in stock and StreamFusion on Flink 1.18.1. The adapter also checks persisted results for batch and streaming SQL with explicit record selection, a non-default record buffer and omitted scalar and nested warehouse fields. All 63 native job graph checks passed, including eight successful upstream static and dynamic partition invocations.
After deferring stock scan setup, the release build passed the same 32 pinned source, partition, upsert and SQL boundary invocations in stock and native mode. All 29 expected native job graph checks passed.
The focused archive-backed run passed the same 66 invocations across eight upstream classes in stock Flink and StreamFusion. Native runs recorded 88 source nodes and 52 sink nodes. All 57 graph checks passed. Two mutation controls removed the native scan from a compressed INSERT and the native sink from a streaming upsert. The verifier rejected each changed graph while the other jobs in that invocation still had native operators.
A repeat of the pinned suite ran all 214 invocations across 21 classes in each mode.
Stock Flink and StreamFusion both passed 210, with identical invocation identities and
failures. Each passed all 24 concurrent-writer cases, 12 recovery cases and 84 injected
write-fault cases. Two EmulatorYieldMitigationITCase invocations and two
EmulatorYieldRecoveryITCase invocations timed out while waiting for an upload-session
acknowledgment through the released DataStream record writer. The released artifact
predates the upstream mailbox mitigation.
The native run at 37767f61a recorded 278 native MaxCompute source nodes and 171 native
sink nodes in successful submitted jobs. The harness retains the original assertions
and returns failure for this matrix.
The release-build native rerun with default Tunnel Arrow matched all 214 pinned invocation identities and passed 210 with zero skips. All 24 concurrent writer, 12 recovery and 84 injected-fault cases passed. Only the same four released writer mailbox cases failed. Successful jobs contained 238 native MaxCompute source nodes and 218 sink nodes. The final adapter suite passed all 122 cases, including the record-buffer selection and omitted-column checks.
A dedicated vendor Flink 1.18.1 build from the same upstream source passed all 214 invocations against the pinned emulator, with zero skips and the same invocation fingerprint. It also passed 198 offline tests and five packaged-JAR consumer tests. These runs preceded the in-tree Flink 1.18.1 build.
The in-tree build passed 16 focused invocations on Flink 1.18.1 and emulator 1.2.0. The selection included all four mailbox mitigation and recovery cases, projected Arrow source-to-sink round trips, buffer ownership, and unchanged readback after whole-table or static-partition overwrite rejection.
A 20-minute local repeat at 3bbe85689 ended during the stock write-fault class.
JUnit finalized 117 invocations across 17 classes with 113 passes and the same
four mailbox failures. The unfinished write-fault class recorded 74 successful
fixture readbacks. The repeat did not complete the stock and native comparison.
A focused native run at the same source revision passed 20 invocations,
including all six upstream SQL source-option cases, the aligned window queries,
checkpoint and offset probes, and unaligned and at-least-once upsert cases. The
successful jobs included 21 native MaxCompute source nodes and 25 native sink
nodes.
The archive-backed native run at 8a3335bea finished in 22 minutes and 36 seconds.
It matched all 214 pinned invocation identities across 21 upstream classes.
It passed 210 upstream cases and all 59 adapter tests. All 24 concurrent-writer,
12 recovery, and 84 injected write-fault cases passed. Successful jobs contained
306 native MaxCompute source nodes and 209 native sink nodes. All 27 per-case
native graph checks passed.
The same four released DataStream mailbox cases failed while waiting for a
bootstrap acknowledgment. A thread dump during the chained burst showed all
three writer subtasks sleeping inside the released InsertFunction.processElement.
That run also exposed a timing assumption in the adapter's unaligned recovery fixture.
The first checkpoint could finish before the injected session delay fired. The fixture
now waits for the fault and selects a retained checkpoint with actual channel state.
All 36 adapter tests passed separately at 895720b32, including cached and uncached
restores, the planner-validation checks, and the delayed Tunnel Arrow burst. An earlier
packaged run also passed five file-cached Storage cases.
The shared at-least-once writer passed the 42-case adapter suite. Flink's checkpoint log showed checkpoint 2 starting before checkpoint 1 completed and a restart from checkpoint 3 after an injected Storage failure. The native job verified every row. The released stock coordinator reached the 45-second job wait limit in the 1,024-row-per-partition comparison at a 250 ms checkpoint interval and again with 24 rows per partition at three seconds. A static-only control with two concurrent checkpoints reached its 30-second limit in stock Flink. Native readback passed in all three probes. Stock parity for these jobs remains unverified.
Emulator 1.2.0 lacks the Storage API behavior needed to verify CDC and physical bucket splits.
A direct incremental read-session request from the released Java SDK against a
transactional table returned UnsupportedOperation with unsupported session type.
Partitioned real-time upsert also requires service validation. A direct probe
with the released Java SDK opened both table-wide and explicitly partition-scoped
real-time sessions. Both rejected the Arrow upsert at flush with
overwrite/upsert requires static partitions. The SDK uses the default
session ID for real-time writes. The emulator creates that session on the first
stream request and requires a session-level partition for primary-key mutations.
The released SDK's stream creation request carries the stream ID, version, and
delivery mode. Its withPartition value stays in the Arrow writer. See the
pinned emulator release.
The loopback fixture forwards stream setup and teardown to this emulator. It verifies
the Arrow requests and returns acknowledgments locally. Persisted partitioned mutations
through the real-time endpoint still need live qualification.
Emulator 1.2.0 rejects DDL with TINYINT, SMALLINT, INT, BIGINT, CHAR or VARCHAR partition columns. A catalog fixture supplies typed metadata to the released SDK while the emulator handles the actual writes and commits. Stock and native SQL readback matched for grouped Tunnel append across all six types and for checkpointed Storage upsert with BIGINT. These tests check repeated and distinct keys, signed values, and null keys that resolve to the same partition as the explicit default value. A real-time Storage loopback fixture verifies signed 8-, 16-, 32-, and 64-bit Arrow keys for append, BIGINT primary-key routing, and rejection of null BIGINT keys. Real-time append with CHAR and VARCHAR defaults also passed persisted readback using STRING-backed partitions. Both readback cases detect writes to the wrong partition when default clipping is disabled. The release build passed all 107 adapter cases. Typed partition behavior on MaxCompute still needs live service validation. The coordinated-write release-build test run passed the same 32 pinned upstream partition, writer-mode and upsert cases in both stock and native mode. The submitted-job inspection verified native routing expectations in 11 of those upstream cases. The proposed emulator 1.2.1 release covers ACID version-window reads. Its release preparation still lists timestamp windows and physical split planning outside that coverage. Emulator 1.2.1 release preparation
Live-service qualification¶
OdpsLiveSqlIT runs stock and native Flink 1.18.1 against a disposable
MaxCompute test project. It checks projected append through Storage and Tunnel,
including grouped Tunnel writes to composite partitions with signed integer
and VARCHAR keys. MaxCompute partition column types
The suite also checks physical bucket metadata, bounded CDC windows by version
and timestamp, continuous startup from both kinds of offsets, latest-partition switches on
primary-key Delta tables and Delta Live Materialized Views, and persisted
partitioned real-time upserts. The timestamp window uses the MaxCompute clock and checks
that a later committed row only appears in the continuous scan. Append and
upsert jobs also check the Flink job graph for native ODPS operators and Arrow
continuity.
Each invocation creates uniquely named tables or views with a one-day lifecycle
and drops them at teardown.
The CDC and materialized-view cases require the corresponding MaxCompute
features in the test project.
Alibaba Cloud CDC guide
Alibaba Cloud Delta Live MV quickstart
Provide MAXCOMPUTE_PROJECT, MAXCOMPUTE_ENDPOINT, ODPS_ACCESS_ID and
ODPS_ACCESS_KEY in the test process environment. Set ODPS_SECURITY_TOKEN
for temporary credentials. MAXCOMPUTE_SCHEMA defaults to default.
MAXCOMPUTE_TUNNEL_ENDPOINT and ODPS_REGION_ID are optional.
The Flink SQL configuration carries the credential provider class name.
The provider reads the credential values from the environment.
mvn -Pflink-1.18,odps,bench -pl streamfusion-odps -am test \
-Dtest=OdpsLiveSqlIT -Dsurefire.failIfNoSpecifiedTests=false \
-Dmaxcompute.e2e.allow-write=true
The full run reports 16 invocations in
streamfusion-odps/target/surefire-reports/TEST-tech.streamfusion.odps.OdpsLiveSqlIT.xml.
For an append-first run, use -Dtest=OdpsLiveSqlIT#projectedAppendRoundTrip for its four
stock/native Storage and Tunnel cases. Record the tested commit and invocation outcomes
when sharing results from the test project.
Local verification checked the opt-in and passed all four append cases against the pinned emulator. Both real-time upsert cases reached the Storage API and received the emulator's static-partition error. The live cases still need a service run.
The Arrow schema binding profile records the read and write allocation diagnostic.