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

danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new c127202cdbc [MINOR] Simplify CreateHoodieTableCommand logWarning 
(#9317)
c127202cdbc is described below

commit c127202cdbcf1032c0b872e31bb725cc7bc2fd56
Author: cxzl25 <[email protected]>
AuthorDate: Mon Aug 7 11:38:37 2023 +0800

    [MINOR] Simplify CreateHoodieTableCommand logWarning (#9317)
---
 .../apache/spark/sql/hudi/command/CreateHoodieTableCommand.scala    | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 
a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/command/CreateHoodieTableCommand.scala
 
b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/command/CreateHoodieTableCommand.scala
index 69aed504e84..3b018f56e87 100644
--- 
a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/command/CreateHoodieTableCommand.scala
+++ 
b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/command/CreateHoodieTableCommand.scala
@@ -84,11 +84,7 @@ case class CreateHoodieTableCommand(table: CatalogTable, 
ignoreIfExists: Boolean
       CreateHoodieTableCommand.createTableInCatalog(sparkSession, 
hoodieCatalogTable, ignoreIfExists, queryAsProp)
     } catch {
       case NonFatal(e) =>
-        logWarning(s"Failed to create catalog table in metastore: ${e}")
-        val sw = new StringWriter
-        val pw = new PrintWriter(sw)
-        e.printStackTrace(pw)
-        logWarning(sw.toString)
+        logWarning("Failed to create catalog table in metastore", e)
     }
     Seq.empty[Row]
   }

Reply via email to