You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by pw...@apache.org on 2023/09/13 07:35:07 UTC

[hudi] 34/37: [MINOR] Avoiding warn log for succeeding in first attempt (#9686)

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

pwason pushed a commit to branch release-0.14.0
in repository https://gitbox.apache.org/repos/asf/hudi.git

commit 88f744da58cc518f0e490d97eafd4e3ba4e993ec
Author: Sivabalan Narayanan <n....@gmail.com>
AuthorDate: Tue Sep 12 02:57:42 2023 -0400

    [MINOR] Avoiding warn log for succeeding in first attempt (#9686)
    
    
    ---------
    
    Co-authored-by: Danny Chan <yu...@gmail.com>
---
 .../src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala
index 6d0ce7d16bf..7828cc7ee5a 100644
--- a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala
+++ b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala
@@ -130,7 +130,9 @@ object HoodieSparkSqlWriter {
     while (counter <= maxRetry && !succeeded) {
       try {
         toReturn = writeInternal(sqlContext, mode, optParams, sourceDf, streamingWritesParamsOpt, hoodieWriteClient)
-        log.warn(s"Succeeded with attempt no $counter")
+        if (counter > 0) {
+          log.warn(s"Succeeded with attempt no $counter")
+        }
         succeeded = true
       } catch {
         case e: HoodieWriteConflictException =>