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-rdbmsJava API changed —DBUtil's connection, validation, privilege, column and split helpers now take adriverClassNameargument, andDataBaseType.setDriverClassNamewas 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 addingphoenix-client-hbase-2.1-<version>.jarto the plugin'slibs/directory; without it the writer fails with an explicit message naming the missing jar. The writer templates were also corrected (queryServerAddressfor the reader,jdbcUrlfor 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.jarinplugin/{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.
sqlDialectselectstreeortable; it is inferred fromsql_dialect=tablein the JDBC URL when unset, andappendDialectmakes the table mode explicit in the URL. - Tree model. The reader takes
deviceandmeasurements(or*),where,fetchSizeand an optionalbeginDateTime/endDateTime/splitIntervaltime-range split that produces one task per range; the implicit IoTDB time column is moved totimeColumnPosition(default 0), and an aggregate query that does not return a time column keeps its natural column order. The writer takesmeasurements, optionalcolumnType(BOOLEAN,INT32,INT64,FLOAT,DOUBLE,TEXT,TIMESTAMP,BLOB),timeColumnPositionandbatchSize(default 1000), and writes through the nativeSessionAPI 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
tableandcolumn(*supported), the writer takestableandcolumn(no wildcard) and binds through JDBC batches typed from the target metadata, retrying a failed batch row by row. - Common.
connection.querySqlaccepts a single statement or a list (one task per statement); a configuredquerySqlwins over the time-range split with a warning.preSql/postSqlrun inJob.prepare/Job.postand accept the${table}and${device}placeholders. The JDBC driver is loaded explicitly becauseiotdb-jdbchas noMETA-INF/services/java.sql.Driverentry, soDriverManagercannot 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-docsrepository 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,INSERTorUPDATEreplaces the document named by the key with an upsert;DorDELETEdeletes 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.1andNumberDecimal("0.1")produce two documents because MongoDB compares them unequal, while1,1Land1.0still fold to one and NaN keys are written instead of crashing. - An unrecognized
writeModenow fails the task withILLEGAL_VALUEinstead of falling back to insert, and mode names are matched case-insensitively.
🐛 Fixes
Data correctness and reliability
lib-rdbms(#1747): the legacy top-leveldriverwas read only by the genericrdbmsreader/rdbmswriter, so identical job files behaved differently depending on the plugin name. Driver resolution now happens once inDBUtil,connection.driverstays canonical, and the top-level key is migrated into it with a deprecation warning. Derived plugins honor it, and the generic writer also acceptsconnection.driveralone instead of failing the required-value check. Therdbmswritertemplate movesdriverunderconnection.plugin-doriswriter(#1738):batchSizeonly counted rows, so records carrying very large fields could buffer unbounded data and exhaust the JVM heap. The writer now readsbatchByteSize(default 32 MB, the same key the RDBMS writers use) and flushes when either limit is reached; the template'sbatchSizedrops from 102400 to 2048 and addsbatchByteSize: 33554432. Existing job files keep working unchanged.plugin-streamreader: the task RNG usedRandomGenerator.of("Xoroshiro128PlusPlus"), which needs thejdk.randommodule; jlink-trimmed JREs such aseclipse-temurin:21-jre-alpineomit it, so the reader aborted with "No implementation of the random number generator algorithm".SplittableRandomlives injava.baseand is used instead; generated data is otherwise unchanged.
Packaging
plugin-s3writer:hadoop-awsdeclaresaws-java-sdk-bundle, a 297 MB jar holding every AWS SDK v1 service, whileS3AFileSystemloads only core, s3, sts and kms. The bundle is excluded andaws-java-sdk-s3/aws-java-sdk-stsare 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-awsships again withaws-java-sdk-bundleexcluded and the same AWS SDK modules included, so ans3a://warehouse works out of the box without copying jars;jackson-dataformat-cboris excluded andcommons-textadded for the metrics2 path. The plugin's libs drop from about 392 MB to about 100 MB. The job template now defaults tofile:///tmp/iceberginstead of ans3a://warehouse with MinIO credentials that could not run on a default installation.- The AWS SDK baseline comments now state that
hadoop-aws3.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/jobinstead of the non-existentdocs/assets/jobsdirectory, 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 amysqlreaderconfigured with the deprecatedcom.mysql.jdbc.Drivershim and amysqlwriterconfigured 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 thepreSqldelete. - 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,
querySqland 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-aws3.3.6 still loads it) - Build and CI: actions/setup-java 6.2.0 → 6.3.0
⬆️ Upgrading
- Distribution:
addax-6.4.0.tar.gzandaddax-6.4.0.tar.gz.sha256sum.asc— check the checksum before unpacking. - Docker:
wgzhao/addax:6.4.0(Docker Hub) andquay.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 theDBUtilhelpers; - an
hbase20xsqljob uses a thickjdbc:phoenix:<quorum>URL — addphoenix-client-hbase-2.1-<version>.jarto the plugin'slibs/; - DuckDB is used on a platform other than Linux x86_64 — swap the native jar in the DuckDB plugin's
libs/; - a
mongodbwriterjob sets awriteModeother thaninsert,update(field)ormerge(key, opColumn)— it now fails instead of silently inserting; - an RDBMS job still puts
driverat the top level — it keeps working with a deprecation warning, butconnection.driveris the canonical key.
- an external plugin was compiled against
- Plugin documentation: https://github.com/wgzhao/addax-docs