You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2022/09/14 14:20:20 UTC
[hop] branch master updated: HOP-4191 - Fix for "Get file names" bug on Beam
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 2871c5d352 HOP-4191 - Fix for "Get file names" bug on Beam
new a5c474c900 Merge pull request #1674 from fbarthez/HOP-4191
2871c5d352 is described below
commit 2871c5d35278e558da0d4ac7dcf0a618196e9e04
Author: Fabian Peters <fa...@mercadu.de>
AuthorDate: Mon Sep 5 20:56:01 2022 +0200
HOP-4191 - Fix for "Get file names" bug on Beam
Adds a recursive call to processRow() so that the method is called again until an output row has been generated for each matched file.
Tested with the local runner and the Beam-Direct runner.
---
.../apache/hop/pipeline/transforms/getfilenames/GetFileNames.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/plugins/transforms/getfilenames/src/main/java/org/apache/hop/pipeline/transforms/getfilenames/GetFileNames.java b/plugins/transforms/getfilenames/src/main/java/org/apache/hop/pipeline/transforms/getfilenames/GetFileNames.java
index a1f65eb564..c40bceca02 100644
--- a/plugins/transforms/getfilenames/src/main/java/org/apache/hop/pipeline/transforms/getfilenames/GetFileNames.java
+++ b/plugins/transforms/getfilenames/src/main/java/org/apache/hop/pipeline/transforms/getfilenames/GetFileNames.java
@@ -288,6 +288,11 @@ public class GetFileNames extends BaseTransform<GetFileNamesMeta, GetFileNamesDa
data.filenr++;
+ // recurse until an output row has been created for each matched file
+ if (data.filenr < data.filessize) {
+ return processRow();
+ }
+
if (checkFeedback(getLinesInput()) && log.isBasic()) {
logBasic(BaseMessages.getString(PKG, "GetFileNames.Log.NrLine", "" + getLinesInput()));
}