msmygit opened a new pull request, #53:
URL: https://github.com/apache/flink-connector-cassandra/pull/53
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Thank you for contributing to the Apache Flink Cassandra connector.
Please follow the Flink contribution guide:
https://flink.apache.org/how-to-contribute/contribute-code/
Use a title in the form "[FLINK-XXXX][Connectors/Cassandra] Description"
and link the corresponding Jira issue below.
Trivial hotfixes, such as typos or syntax errors, need no Jira issue.
Use a title in the form "[hotfix] Description".
-->
## Purpose of the change
<!-- Link the Jira issue (if any) and explain the problem this change
addresses. -->
Upgrade Cassandra Java Driver to `4.19.4`, see
[FLINK-41444](https://issues.apache.org/jira/browse/FLINK-41444).
## Brief change log
<!-- Summarize the changes that reviewers should focus on. -->
- Connection API: `ClusterBuilder` is replaced by `CassandraSessionBuilder
(buildSession(CqlSessionBuilder))`, and `setClusterBuilder` by
`setSessionBuilder`. The SQL option `cluster-builder-class` is now
`session-builder-class`.
- POJO mapping: the connector maps `@Entity` / `@CqlName` classes itself
at runtime, since the 4.x driver mapper only works through an annotation
processor. `MapperOptions` and `SimpleMapperOptions` are replaced by
`CassandraMapperOptions`.
- Local datacenter: new `local-datacenter` SQL option and
`CassandraSinkBuilder.setLocalDatacenter`. When unset, the datacenter is
inferred from the hosts, so existing `setHost` jobs and SQL tables keep working.
- Driver options: SQL options prefixed with driver. are passed straight to
the driver configuration.
- Astra: new `secure-connect-bundle` SQL option; when set, hosts, port and
local datacenter are ignored.
- `java.util.Date`: still works for timestamp columns through a codec the
connector registers.
- Partition key: the source's token-range queries now keep partition-key
column order and quote case-sensitive names.
- Docs: both the English and `content.zh` pages are updated, with new
sections on connecting, driver configuration, POJO mapping, cloud databases and
migrating from driverĀ 3.
### Things to know
- Tuple reads change type: `CassandraInputFormat` now returns `Instant`,
`java.time.LocalDate` and `LocalTime` for temporal columns, because the 3.x
types no longer exist. This is in the migration section of the docs.
- Mapper limitation: a nested `@Entity` property maps to a UDT, but
collections of entities are rejected at startup with a clear error.
## Verifying this change
<!-- Describe the tests or manual checks performed and their results. -->
Ran the CI build locally; `mvn clean verify` passes on both JDK 11 and JDK
17: 135 unit tests and 41 integration tests against a 2-node Cassandra 4.1.12,
plus checkstyle, spotless, RAT, enforcer, japicmp and ArchUnit.
## Impact and documentation
<!--
Describe any changes to dependencies, public APIs, or connector behavior.
For user-facing changes, explain how the documentation has been updated.
If neither applies, state "Not applicable".
-->
---
##### Was generative AI tooling used to co-author this PR?
<!--
If generative AI tooling has been used in the process of authoring this PR,
please
change the checkbox below to `[X]` and replace the placeholder in the
"Generated-by"
line with the tool name and version. Otherwise remove the "Generated-by"
line.
See the ASF Generative Tooling Guidance for details:
https://www.apache.org/legal/generative-tooling.html
You are responsible for the quality and correctness of every change in this
PR
regardless of the tooling used. Low-effort AI-generated PRs will be closed.
See
https://flink.apache.org/how-to-contribute/contribute-code/#ai-assisted-contributions
for the full guidance.
-->
- [x] Yes (please specify the tool below)
Generated-by: Claude Code (Claude Fable 5.2)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]