pentaho/pentaho-kettle · error · KettleException

It doesn't make sense to have a partitioned, clustered step…

Error message

It doesn't make sense to have a partitioned, clustered step with less partitions (" + nrPartitions + ") than that there are slave servers (" + nrSlaves + ")

What it means

When a step is both partitioned and clustered, the TransSplitter constructor dynamically expands the partition schema across slave servers and requires at least as many partitions as slave servers (nrPartitions < nrSlaves throws). Fewer partitions than slaves would leave some slaves idle, so Kettle refuses the configuration.

Solutions

  1. Add partition IDs so there are at least as many partitions as slave servers.
  2. Keep 'dynamic' partitioning enabled so the schema expands to the current slave count.
  3. Reduce the number of slave servers in the cluster schema to match (or be below) the partition count.

Example fix

// before
schema.addPartitionID("P1"); schema.addPartitionID("P2"); // 3 slaves
// after
schema.expandPartitionsDynamically(nrSlaves, transMeta);
Defensive patterns

Strategy: validation

Validate before calling

int nrSlaves = clusterSchema.getSlaveServers().size();
int nrPartitions = partitionSchema.getPartitionIDs().size();
if (nrPartitions < nrSlaves) partitionSchema.expandPartitionsDynamically(nrSlaves, transMeta);

Prevention

When it happens

Trigger: Constructing a TransSplitter (via execute/executeClustered) where a clustered step uses a partition schema with fewer partition IDs than the number of slave servers in the cluster schema — e.g. 2 partitions on a 3-slave cluster.

Common situations: Reusing a partition schema designed for a smaller cluster when adding slave servers; defining partitions manually instead of letting expandPartitionsDynamically size them to the cluster.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/1c0999491852acea. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/cluster/TransSplitter.java:1529

      // Also, all cloned steps re-match with the cloned schema name afterwards...
      //
      PartitionSchema partitionSchema = (PartitionSchema) stepPartitioningMeta.getPartitionSchema().clone();

      int nrSlaves = clusterSchema.findNrSlaves();
      if ( nrSlaves == 0 ) {
        continue; // no slaves: ignore this situation too
      }

      // Change the partitioning layout dynamically if the user requested this...
      //
      if ( partitionSchema.isDynamicallyDefined() ) {
        partitionSchema.expandPartitionsDynamically( nrSlaves, originalTransformation );
      }

      int nrPartitions = partitionSchema.getPartitionIDs().size();

      if ( nrPartitions < nrSlaves ) {
        throw new KettleException(
          "It doesn't make sense to have a partitioned, clustered step with less partitions ("
            + nrPartitions + ") than that there are slave servers (" + nrSlaves + ")" );
      }

      int slaveServerNr = 0;
      List<SlaveServer> slaveServers = clusterSchema.getSlaveServers();

      for ( int p = 0; p < nrPartitions; p++ ) {
        String partitionId = partitionSchema.getPartitionIDs().get( p );

        SlaveServer slaveServer = slaveServers.get( slaveServerNr );

        // Skip the master...
        //
        if ( slaveServer.isMaster() ) {
          slaveServerNr++;
          if ( slaveServerNr >= slaveServers.size() ) {
            slaveServerNr = 0; // re-start

View on GitHub (pinned to f3058517a1)