Skip to content

6.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 29 Nov 02:41
· 1 commit to master since this release

Addax 6.4.0

Addax 6.4.0 is a minor release: it adds Apache IoTDB reader and writer plugins for both the tree and the table model, a per-record merge write mode for the MongoDB writer, and stops JDBC driver overrides from leaking between the reader and writer of one job. It also cuts several plugin libraries down by shipping only what the code loads — the AWS SDK modules instead of the 297 MB bundle, the Phoenix Query Server thin client instead of the 144 MB thick one, and a single-platform DuckDB native jar — caps the Doris writer's batch by bytes, and lets the stream reader run on jlink-trimmed JREs.

The version is 6.4.0 rather than 6.3.1 on purpose: this release contains new features and backward-incompatible changes, which is a minor bump under the versioning scheme.

⚠️ Breaking changes

1. The addax-rdbms driver API is explicit; overrides no longer leak between plugins

The effective JDBC driver used to be written back onto the shared DataBaseType enum constant, so a reader and a writer of the same database type in one job saw each other's override. A mysqlreader configured with the Connector/J 5.1 driver made the mysqlwriter load that class from its own classloader and fail with ClassNotFoundException when the jar was only in the reader's libs; when both sides set different drivers, the plugin whose Job.init ran last silently won. URL suffixes were computed per plugin at init time as well, so the driver a task actually used and the URL computed for it could disagree.

The resolved driver now lives in the configuration under the internal Key.DRIVER_CLASS item and is threaded explicitly through the DBUtil connection, validation, privilege, column and split helpers and through DataBaseType's JDBC URL suffix methods. DataBaseType's driver field is final again and setDriverClassName is removed. Reader and writer job, task, preCheck, DDL, preSql/postSql, autoPk and split paths pass their own driver, and Doris/StarRocks pass their built-in MySQL driver explicitly.

  • Migration: the addax-rdbms Java API changed — DBUtil's connection, validation, privilege, column and split helpers now take a driverClassName argument, and DataBaseType.setDriverClassName was removed together with the mutable driver field. Plugins outside this repository that link against these classes must be recompiled and pass their own resolved driver. Job configuration files are unchanged.

2. hbase20xsqlreader and hbase20xsqlwriter ship the thin Phoenix client only

Both plugins used to depend on phoenix-client-hbase-2.1, a 144 MB shaded HBase/Hadoop bundle that does not even contain org.apache.phoenix.queryserver.client.Driver, so the reader could never open a connection as shipped. They now depend on phoenix-queryserver-client 6.0.0 (about 6 MB, self-contained).

  • Migration: thin mode is the default and works out of the box. A thick URL (jdbc:phoenix:<quorum>) now requires adding phoenix-client-hbase-2.1-<version>.jar to the plugin's libs/ directory; without it the writer fails with an explicit message naming the missing jar. The writer templates were also corrected (queryServerAddress for the reader, jdbcUrl for the writer), and thin-mode Kerberos now uses the driver's own SPNEGO properties instead of UGI.

3. DuckDB bundles only the build host's native library

duckdb_jdbc is published as a 77 MB fat jar carrying the native libraries for Linux amd64/arm64, macOS arm64 and Windows amd64, and every DuckDB plugin shipped a copy. The dependency is now resolved by the classifier of the build host (linux_amd64 by default, with OS-activated profiles for macOS, Windows and Linux arm64, overridable with -Dduckdb.jdbc.classifier), so each plugin's libs drop to about 25 MB.

  • Migration: the official release archive is built on Linux x86_64, so its DuckDB plugins only run there. On another platform, swap duckdb_jdbc-<version>-linux_amd64.jar in plugin/{reader,writer}/duckdb*/libs/ for the jar of the matching classifier (or build the distribution on that platform).

✨ Features

1. Apache IoTDB reader and writer plugins (#1746)

The generic RDBMS plugins cannot handle IoTDB's tree model, its implicit time column, or the table model added in 2.0, so a top-10 time-series database had no usable ETL path. iotdbreader and iotdbwriter support both models:

  • Dialects. sqlDialect selects tree or table; it is inferred from sql_dialect=table in the JDBC URL when unset, and appendDialect makes the table mode explicit in the URL.
  • Tree model. The reader takes device and measurements (or *), where, fetchSize and an optional beginDateTime/endDateTime/splitInterval time-range split that produces one task per range; the implicit IoTDB time column is moved to timeColumnPosition (default 0), and an aggregate query that does not return a time column keeps its natural column order. The writer takes measurements, optional columnType (BOOLEAN, INT32, INT64, FLOAT, DOUBLE, TEXT, TIMESTAMP, BLOB), timeColumnPosition and batchSize (default 1000), and writes through the native Session API with one batch per device; when a batch fails it retries the rows one by one and collects only the rows the server rejects as dirty records.
  • Table model. The reader takes table and column (* supported), the writer takes table and column (no wildcard) and binds through JDBC batches typed from the target metadata, retrying a failed batch row by row.
  • Common. connection.querySql accepts a single statement or a list (one task per statement); a configured querySql wins over the time-range split with a warning. preSql/postSql run in Job.prepare/Job.post and accept the ${table} and ${device} placeholders. The JDBC driver is loaded explicitly because iotdb-jdbc has no META-INF/services/java.sql.Driver entry, so DriverManager cannot discover it through the plugin class loader.
  • Versions. IoTDB 2.x is the supported baseline for both models; the 1.3.7+ tree model is best effort, and table mode rejects a 1.x server with a clear error.
  • The reader and writer guides live in the addax-docs repository in both languages, and the IoTDB logo and support table are updated.

2. MongoDB writer merge write mode (#1741)

The writer could only insert records or replace them through update(field), so a sync that also carries deletions had no way to remove the documents the source deleted. writeMode now accepts merge(key, opColumn):

  • A record whose op column reads A, I, U, INSERT or UPDATE replaces the document named by the key with an upsert; D or DELETE deletes it; a null, blank or unknown op is collected as a dirty record.
  • The op column is stripped before the document is written, and records naming the same key in one batch keep their last operation, so the final state does not depend on the order an unordered batch happens to run in.
  • The merge key and the op column have to be part of the configured column list in column mode. Nested keys filter on the dotted path, so sibling fields under the parent no longer make the filter miss; update(field) gets the same nested-key fix.
  • Numeric keys fold by their exact numeric value: the double 0.1 and NumberDecimal("0.1") produce two documents because MongoDB compares them unequal, while 1, 1L and 1.0 still fold to one and NaN keys are written instead of crashing.
  • An unrecognized writeMode now fails the task with ILLEGAL_VALUE instead of falling back to insert, and mode names are matched case-insensitively.

🐛 Fixes

Data correctness and reliability

  • lib-rdbms (#1747): the legacy top-level driver was read only by the generic rdbmsreader/rdbmswriter, so identical job files behaved differently depending on the plugin name. Driver resolution now happens once in DBUtil, connection.driver stays canonical, and the top-level key is migrated into it with a deprecation warning. Derived plugins honor it, and the generic writer also accepts connection.driver alone instead of failing the required-value check. The rdbmswriter template moves driver under connection.
  • plugin-doriswriter (#1738): batchSize only counted rows, so records carrying very large fields could buffer unbounded data and exhaust the JVM heap. The writer now reads batchByteSize (default 32 MB, the same key the RDBMS writers use) and flushes when either limit is reached; the template's batchSize drops from 102400 to 2048 and adds batchByteSize: 33554432. Existing job files keep working unchanged.
  • plugin-streamreader: the task RNG used RandomGenerator.of("Xoroshiro128PlusPlus"), which needs the jdk.random module; jlink-trimmed JREs such as eclipse-temurin:21-jre-alpine omit it, so the reader aborted with "No implementation of the random number generator algorithm". SplittableRandom lives in java.base and is used instead; generated data is otherwise unchanged.

Packaging

  • plugin-s3writer: hadoop-aws declares aws-java-sdk-bundle, a 297 MB jar holding every AWS SDK v1 service, while S3AFileSystem loads only core, s3, sts and kms. The bundle is excluded and aws-java-sdk-s3/aws-java-sdk-sts are shipped instead (core and kms follow transitively); the bundle's only shaded reference is resolved reflectively and skipped. The plugin's libs drop from about 378 MB to about 86 MB, with text, ORC and parquet writes verified against a moto S3 server.
  • plugin-icebergwriter: hadoop-aws ships again with aws-java-sdk-bundle excluded and the same AWS SDK modules included, so an s3a:// warehouse works out of the box without copying jars; jackson-dataformat-cbor is excluded and commons-text added for the metrics2 path. The plugin's libs drop from about 392 MB to about 100 MB. The job template now defaults to file:///tmp/iceberg instead of an s3a:// warehouse with MinIO credentials that could not run on a default installation.
  • The AWS SDK baseline comments now state that hadoop-aws 3.3.6 was built against AWS SDK v1 1.12.367 rather than implying the bumped SDK still tracks Hadoop.

Docs

  • The READMEs promote addax-admin in the intro, show the current first-run output again (the full log had been dropped for its length, while README_zh still carried a stale v4.0.13-SNAPSHOT excerpt), point at core/src/main/job instead of the non-existent docs/assets/jobs directory, and clarify that the 10-row smoke job is not a throughput benchmark.
  • The issue template lists 6.4.0 through 6.2.0 individually and folds 6.1.0 and older into one choice, so the dropdown does not grow with every patch release.

🧪 Testing

  • The end-to-end suite now has 21 cases (010–210, 260_hdfsreader_roundtrip) and all 21 pass locally against the release build with no skips.
  • New case 210_driver_isolation (part of the driver refactor) runs a mysqlreader configured with the deprecated com.mysql.jdbc.Driver shim and a mysqlwriter configured with no driver. Each plugin is loaded by its own classloader, so exactly one deprecation line from the shim proves the driver did not cross the plugin boundary; the case fails on the previous build and also checks that every row reached the target after the preSql delete.
  • The IoTDB plugins were verified against real IoTDB 1.3.7 and 2.0.12 servers (tree model round trips on both, table model on 2.x, including time-range splits, querySql and dirty-record handling). Those checks need an external server and are not part of the repository suite.
  • Every change merged since 6.3.0 had the E2E workflow green on its pull request.

📦 Dependencies

11 dependency and CI updates:

  • paimon 2.1.0 → 2.1.1, duckdb_jdbc 2.0.0.1 → 2.0.1.0, clickhouse-jdbc 0.11.1 → 0.11.2
  • netty 4.2.20.Final → 4.2.21.Final, httpcore 5.4.4 → 5.5
  • zstd-jni 1.5.7-26 → 1.5.7-29, lz4-java 1.14.0 → 1.14.1
  • kudu-client 1.18.1 → 1.18.2, ngdbc 2.30.11 → 2.30.12
  • aws-java-sdk 1.12.367 → 1.12.797 (s3writer/icebergwriter; hadoop-aws 3.3.6 still loads it)
  • Build and CI: actions/setup-java 6.2.0 → 6.3.0

⬆️ Upgrading

  • Distribution: addax-6.4.0.tar.gz and addax-6.4.0.tar.gz.sha256sum.asc — check the checksum before unpacking.
  • Docker: wgzhao/addax:6.4.0 (Docker Hub) and quay.io/wgzhao/addax:6.4.0.
  • Maven Central: com.wgzhao.addax:addax-core:6.4.0.
  • Check first if:
    • an external plugin was compiled against addax-rdbms — recompile it against 6.4.0 and pass the resolved driver to the DBUtil helpers;
    • an hbase20xsql job uses a thick jdbc:phoenix:<quorum> URL — add phoenix-client-hbase-2.1-<version>.jar to the plugin's libs/;
    • DuckDB is used on a platform other than Linux x86_64 — swap the native jar in the DuckDB plugin's libs/;
    • a mongodbwriter job sets a writeMode other than insert, update(field) or merge(key, opColumn) — it now fails instead of silently inserting;
    • an RDBMS job still puts driver at the top level — it keeps working with a deprecation warning, but connection.driver is the canonical key.
  • Plugin documentation: https://github.com/wgzhao/addax-docs