{"record":{"id":"9870a25a83f71562","repo":"pentaho/pentaho-kettle","slug":"unable-to-find-partition-using-rowset-data-slave","errorCode":null,"errorMessage":"Unable to find partition using rowset data, slave=\" + outputRowSet.getRemoteSlaveServerName() + \", partition schema=\" + nextStepPartitioningMeta.getPartitionSchema().getName() + \", copy=\" + outputRowSet.getDestinationStepCopy()","messagePattern":"Unable to find partition using rowset data, slave=\" \\+ outputRowSet\\.getRemoteSlaveServerName\\(\\) \\+ \", partition schema=\" \\+ nextStepPartitioningMeta\\.getPartitionSchema\\(\\)\\.getName\\(\\) \\+ \", copy=\" \\+ outputRowSet\\.getDestinationStepCopy\\(\\)","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/step/BaseStep.java","lineNumber":1427,"sourceCode":"        // The slave-step-copy distribution is passed onto the slave transformation\n        //\n        SlaveStepCopyPartitionDistribution distribution = transMeta.getSlaveStepCopyPartitionDistribution();\n\n        String nextPartitionSchemaName =\n          TransSplitter.createPartitionSchemaNameFromTarget( nextStepPartitioningMeta\n            .getPartitionSchema().getName() );\n\n        for ( RowSet outputRowSet : outputRowSets ) {\n          try {\n            // Look at the pre-determined distribution, decided at \"transformation split\" time.\n            //\n            int partNr =\n              distribution.getPartition(\n                outputRowSet.getRemoteSlaveServerName(), nextPartitionSchemaName, outputRowSet\n                  .getDestinationStepCopy() );\n\n            if ( partNr < 0 ) {\n              throw new KettleStepException( \"Unable to find partition using rowset data, slave=\"\n                + outputRowSet.getRemoteSlaveServerName() + \", partition schema=\"\n                + nextStepPartitioningMeta.getPartitionSchema().getName() + \", copy=\"\n                + outputRowSet.getDestinationStepCopy() );\n            }\n            partitionNrRowSetList[ partNr ] = outputRowSet;\n          } catch ( NullPointerException e ) {\n            throw ( e );\n          }\n        }\n      }\n\n      // OK, now get the target partition based on the partition nr...\n      // This should be very fast\n      //\n      if ( partitionNr < partitionNrRowSetList.length ) {\n        selectedRowSet = partitionNrRowSetList[ partitionNr ];\n      } else {\n        String rowsets = \"\";","sourceCodeStart":1409,"sourceCodeEnd":1445,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/step/BaseStep.java#L1409-L1445","documentation":"In clustered (partitioned) transformation output handling, BaseStep looks up which target rowset matches (slave server name, partition schema name, destination step copy) using the cluster distribution. If distribution.getPartition(...) returns a negative number, no registered partition matches the given combination, and a KettleStepException is thrown. It signals an inconsistency between the rowset's remote slave/partition-schema metadata and the distribution's registered partition schema.","triggerScenarios":"Running a clustered transformation where an output RowSet has a remoteSlaveServerName/partitionSchemaName/copy combination not registered in the ClusterSchema's distribution, causing getPartition() to return -1.","commonSituations":"Clustered/trans deployments where slave servers were renamed or removed; partition schema on the step does not match the schema defined for the cluster; mismatched master/slave configuration after re-exporting the transformation.","solutions":["Verify the step's partitioning schema name exactly matches a partition schema registered in the cluster schema's PartitionSchemas list.","Re-check slave server definitions/names in the cluster schema; rename mismatches or re-add slaves.","Re-export/re-apply the transformation to slaves so the distribution metadata is consistent.","Add a null/negative guard or wrap with try-catch KettleStepException and log slave/schema/copy for diagnosis."],"exampleFix":"// before: assuming schema names match\n// ClusterSchema has 'p-schema-A' but step uses 'p-schema-a'\nstepMeta.setPartitioningMeta(createPartitioning(\"p-schema-A\"));\n\n// after: use the exact schema name from the cluster definition\nstepMeta.setPartitioningMeta(createPartitioning(clusterSchema.getPartitionSchemas().get(0).getName()));","handlingStrategy":"validation","validationCode":"// Verify partition schema is registered in the cluster distribution before execution\nboolean found = clusterSchema.getPartitionSchemas().stream()\n  .anyMatch(ps -> ps.getName().equals(stepPartitionSchemaName));\nif (!found) throw new IllegalStateException(\"Partition schema not in cluster distribution\");","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (e.getMessage().startsWith(\"Unable to find partition using rowset data\")) {\n    logError(\"Cluster schema/slave mismatch: \" + e.getMessage(), e);\n  } else { throw e; }\n}","preventionTips":["Keep partition schema names in cluster schema and step metadata identical","Re-export clustered transformations after any slave changes","Validate slave server list before each clustered run"],"tags":["partitioning","cluster","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}