apache/beam · error · UnsupportedOperationException

Unsupported partitioner. Only Random and Murmur3 are…

Error message

Unsupported partitioner. Only Random and Murmur3 are supported

What it means

SplitGenerator.getRangeMin() maps the Cassandra ring partitioner to the smallest token value of its token space. Only RandomPartitioner (min 0) and Murmur3Partitioner (min -2^63) are supported; any other partitioner causes an UnsupportedOperationException.

Solutions

  1. Check the cluster partitioner (nodetool describecluster or cqlsh: SELECT partitioner FROM system.local).
  2. Reconfigure the Cassandra cluster to Murmur3Partitioner (the default) — note this requires full data reload/rebuild.
  3. If a different partitioner must be used, fork/extend SplitGenerator to supply correct min/max token bounds for it.

Example fix

// cluster.yaml (before)
partitioner: org.apache.cassandra.dht.ByteOrderedPartitioner
// after
partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Defensive patterns

Strategy: validation

Validate before calling

String partitioner = session.execute("SELECT partitioner FROM system.local").one().getString("partitioner");
if (!partitioner.endsWith("RandomPartitioner") && !partitioner.endsWith("Murmur3Partitioner")) {
  throw new IllegalArgumentException("Unsupported partitioner: " + partitioner);
}

Try / catch

try { pipeline.run().waitUntilFinish(); } catch (UnsupportedOperationException | RuntimeException e) { /* inspect partitioner */ }

Prevention

When it happens

Trigger: Calling Beam CassandraIO against a cluster whose system.peers partitioner string does not end with 'RandomPartitioner' or 'Murmur3Partitioner' (e.g. ByteOrderedPartitioner) — getRangeMin throws during split generation.

Common situations: Cassandra clusters configured with ByteOrderedPartitioner or a custom/dummy partitioner (sometimes set mistakenly during cluster setup); connecting to non-Cassandra ring-compatible databases.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/dd3d4bdfdf397a7c. Report an issue: GitHub.

Appendix: source

Thrown at sdks/java/io/cassandra/src/main/java/org/apache/beam/sdk/io/cassandra/SplitGenerator.java:48

  private final String partitioner;
  private final BigInteger rangeMin;
  private final BigInteger rangeMax;
  private final BigInteger rangeSize;

  SplitGenerator(String partitioner) {
    rangeMin = getRangeMin(partitioner);
    rangeMax = getRangeMax(partitioner);
    rangeSize = getRangeSize(partitioner);
    this.partitioner = partitioner;
  }

  static BigInteger getRangeMin(String partitioner) {
    if (partitioner.endsWith("RandomPartitioner")) {
      return BigInteger.ZERO;
    } else if (partitioner.endsWith("Murmur3Partitioner")) {
      return BigInteger.valueOf(2).pow(63).negate();
    } else {
      throw new UnsupportedOperationException(
          "Unsupported partitioner. " + "Only Random and Murmur3 are supported");
    }
  }

  static BigInteger getRangeMax(String partitioner) {
    if (partitioner.endsWith("RandomPartitioner")) {
      return BigInteger.valueOf(2).pow(127).subtract(BigInteger.ONE);
    } else if (partitioner.endsWith("Murmur3Partitioner")) {
      return BigInteger.valueOf(2).pow(63).subtract(BigInteger.ONE);
    } else {
      throw new UnsupportedOperationException(
          "Unsupported partitioner. " + "Only Random and Murmur3 are supported");
    }
  }

  static BigInteger getRangeSize(String partitioner) {
    return getRangeMax(partitioner).subtract(getRangeMin(partitioner)).add(BigInteger.ONE);
  }

View on GitHub (pinned to 12126d8942)