This is an automated email from the ASF dual-hosted git repository.

turcsanyi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new b27422f1c6 NIFI-14453 - Finalize WriteStream in PutBigQuery
b27422f1c6 is described below

commit b27422f1c6c28a55cacc9d60a90c2f52a7e566ef
Author: Pierre Villard <[email protected]>
AuthorDate: Wed Apr 9 16:05:38 2025 +0200

    NIFI-14453 - Finalize WriteStream in PutBigQuery
    
    This closes #9862.
    
    Signed-off-by: Peter Turcsanyi <[email protected]>
---
 .../java/org/apache/nifi/processors/gcp/bigquery/PutBigQuery.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/nifi-extension-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/bigquery/PutBigQuery.java
 
b/nifi-extension-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/bigquery/PutBigQuery.java
index 458332d6f3..e7e9ebd649 100644
--- 
a/nifi-extension-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/bigquery/PutBigQuery.java
+++ 
b/nifi-extension-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/bigquery/PutBigQuery.java
@@ -313,6 +313,9 @@ public class PutBigQuery extends AbstractBigQueryProcessor {
         // Close the connection to the server.
         streamWriter.close();
 
+        // finalize the stream
+        writeClient.finalizeWriteStream(streamName);
+
         // Verify that no error occurred in the stream.
         if (error.get() != null) {
             getLogger().error("Stream processing failed", error.get());
@@ -322,7 +325,6 @@ public class PutBigQuery extends AbstractBigQueryProcessor {
             error.set(null); // set error to null for next execution
         } else {
             if (isBatch()) {
-                writeClient.finalizeWriteStream(streamName);
 
                 BatchCommitWriteStreamsRequest commitRequest =
                     BatchCommitWriteStreamsRequest.newBuilder()

Reply via email to