apache/cassandra · error · IORuntimeException

Unsupported record type field

Error message

Unsupported record type field [${type}] - supported record types are [${SINGLE_QUERY}, ${BATCH}]

What it means

FQLQueryReader.readType reads the string-valued TYPE field from the wire record and only accepts FullQueryLogger.SINGLE_QUERY or FullQueryLogger.BATCH; anything else is rejected with this IORuntimeException. It ensures the replayer only processes record kinds it knows how to deserialize.

Solutions

  1. Confirm the file is a full-query-log produced by FullQueryLogger
  2. Re-capture the log; discard corrupted files
  3. Upgrade the tool if the log was written by a newer Cassandra with new record types
Defensive patterns

Strategy: validation

Validate before calling

if (!"single_query".equals(type) && !"batch".equals(type)) skipOrReject(type);

Try / catch

try { dump(file); } catch (IORuntimeException e) { if (e.getMessage().startsWith("Unsupported record type field")) { log.warn("skipping non-FQL file"); } else throw e; }

Prevention

When it happens

Trigger: Deserializing a record whose TYPE string is not exactly 'single_query' or 'batch' — corrupted file, a foreign log, or a manually edited wire file.

Common situations: Pointing fqltool at an arbitrary Chronicle queue file that is not a full query log; byte-level corruption of the log; parsing files from other tooling using similar wire formats.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/8eeeb7e71fc7b69d. Report an issue: GitHub.

Appendix: source

Thrown at tools/fqltool/src/org/apache/cassandra/fqltool/FQLQueryReader.java:136

    }

    private void verifyVersion(WireIn wireIn)
    {
        int version = wireIn.read(VERSION).int16();

        if (version > CURRENT_VERSION)
        {
            throw new IORuntimeException("Unsupported record version [" + version
                                         + "] - highest supported version is [" + CURRENT_VERSION + ']');
        }
    }

    private String readType(WireIn wireIn) throws IORuntimeException
    {
        String type = wireIn.read(TYPE).text();
        if (!SINGLE_QUERY.equals(type) && !BATCH.equals(type))
        {
            throw new IORuntimeException("Unsupported record type field [" + type
                                         + "] - supported record types are [" + SINGLE_QUERY + ", " + BATCH + ']');
        }

        return type;
    }

    public FQLQuery getQuery()
    {
        return query;
    }
}

View on GitHub (pinned to 88fd0f6a0e)