apache/pulsar · error · IllegalArgumentException
Unable to convert digest type ${digestType}
Error message
Unable to convert digest type ${digestType} What it means
When building an OffloadIndexBlock from LedgerMetadata, the builder converts the ledger digest type (BookKeeper DigestType) to the protocol-level DigestType for serialization. An unrecognized enum value hits the default branch and throws IllegalArgumentException('Unable to convert digest type ...'), meaning the offload code does not support that digest type.
Source
Thrown at tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/OffloadIndexBlockImpl.java:261
@Override
public long getLength() {
return this.length;
}
@Override
public DigestType getDigestType() {
switch (this.digestType) {
case HMAC:
return DigestType.MAC;
case CRC32:
return DigestType.CRC32;
case CRC32C:
return DigestType.CRC32C;
case DUMMY:
return DigestType.DUMMY;
default:
throw new IllegalArgumentException("Unable to convert digest type " + digestType);
}
}
@Override
public long getCtime() {
return this.ctime;
}
@Override
public boolean isClosed() {
return this.state == State.CLOSED;
}
@Override
public Map<String, byte[]> getCustomMetadata() {
return this.customMetadata;
}
View on GitHub (pinned to 820761864e)
Solutions
- Reconfigure the ledger digest type to a supported value (CRC32, CRC32C, or DUMMY) and write new ledgers, then offload those
- Upgrade the Pulsar/BookKeeper jcloud offload module to a version supporting the digest type in use
- Prevent offload for unsupported-digest ledgers (e.g. exclude them from offload policies)
- Check bookkeeper digests enabled on the cluster and align with the offload module's supported set
Example fix
// before: offloading a MAC-digest ledger broker.conf: managedLedgerMaxEntriesPerLedger=... digestType=MAC // after: use a supported digest for offloadable ledgers digestType=CRC32C
Defensive patterns
Strategy: validation
Validate before calling
DigestType dt = ledgerMetadata.getDigestType();
Set<DigestType> supported = Set.of(DigestType.CRC32, DigestType.CRC32C, DigestType.DUMMY);
if (!supported.contains(dt)) {
throw new IllegalArgumentException("Digest type not offloadable: " + dt);
} Try / catch
try {
OffloadIndexBlock idx = builder.withLedgerMetadata(meta, ctime).build();
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Unable to convert digest type")) {
// exclude this ledger from offload or change digest type
} else { throw e; }
} Prevention
- Configure broker/bookkeeper digestType to CRC32/CRC32C/DUMMY where offload is used
- Align digest support when upgrading BookKeeper while keeping the jcloud offload module
- Filter unsupported-digest ledgers out of offload policies
- Verify digest config in bookkeeper.conf before enabling tiered storage
When it happens
Trigger: Offloading a ledger whose LedgerMetadata digest type is not CRC32, CRC32C, or DUMMY — e.g. MAC/HMAC digest ledgers or a newer BookKeeper digest type added after this offload implementation was written.
Common situations: Brokers configured with digestType=MAC (or a newer digest) attempting tiered storage offload; upgrading BookKeeper to add a digest type while the jcloud offload module is older; misconfigured bookkeeper.conf digest type.
Related errors
- The '${offloaderName}' offloader does not provide an offload
- V5 does not support non-persistent:// topics: + topic
- unknown auth provider: %s
- Go instance current not support EFFECTIVELY_ONCE processing
- Message retries not yet supported in python
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/ab89fdc0a0c143e5.
Report an issue: GitHub.