Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,19 @@ public boolean init() {
*
* @return true if more iterations can be performed. False if this is not the case.
*/
/**
* Whether every input row set is done and has no rows left: the transform has read all its input.
* A transform removes a row set it read to the end, so no row sets left means the same.
*/
private static boolean isAllInputRead(List<IRowSet> rowSets) {
for (IRowSet rowSet : rowSets) {
if (!rowSet.isDone() || rowSet.size() > 0) {
return false;
}
}
return true;
}

public boolean oneIteration() throws HopException {

this.exceptionsRaisedCounter = 0;
Expand Down Expand Up @@ -369,6 +382,21 @@ public boolean oneIteration() throws HopException {
return false;
}
}

// All input arrived and was read, but the transform can still have work: a reader
// going through the file a row named, a mapping, the rows a Table output still holds.
// Like a transform without input, it is called until it says it is done. Otherwise it
// never sees the end of its input, and the single-threaded engine, which runs one
// iteration, disposes it with that work undone.
//
if (!transformDone && isAllInputRead(combi.transform.getInputRowSets())) {
while (!transformDone && !pipeline.isStopped()) {
transformDone = !combi.transform.processRow();
if (combi.transform.getErrors() > 0) {
return false;
}
}
}
}

// Signal the transform that a batch of rows has passed for this iteration (sort rows and
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->
<pipeline>
<info>
<name>0006-kafka-consumer-table-output-subpipeline</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description>Every batch of 0006-kafka-consumer-table-output goes through Table output; the rows after it go back to the consumer</description>
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2026/11/16 12:00:00.000</created_date>
<modified_user>-</modified_user>
<modified_date>2026/11/16 12:00:00.000</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Injector</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Out record</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Injector</name>
<type>Injector</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<name>key</name>
<type>String</type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>message</name>
<type>String</type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>topic</name>
<type>String</type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>partition</name>
<type>Integer</type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>offset</name>
<type>Integer</type>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>timestamp</name>
<type>Integer</type>
<length>-1</length>
<precision>-1</precision>
</field>
</fields>
<attributes/>
<GUI>
<xloc>96</xloc>
<yloc>96</yloc>
</GUI>
</transform>
<transform>
<name>Table output</name>
<type>TableOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>h2-kafka</connection>
<fields>
<field>
<column_name>message</column_name>
<stream_name>message</stream_name>
</field>
</fields>
<return_field/>
<ignore_errors>N</ignore_errors>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_keys>N</return_keys>
<schema/>
<specify_fields>Y</specify_fields>
<table>kafka_table_output</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>288</xloc>
<yloc>96</yloc>
</GUI>
</transform>
<transform>
<name>Out record</name>
<type>Dummy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>480</xloc>
<yloc>96</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>
Loading
Loading