You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by da...@apache.org on 2023/06/18 01:14:35 UTC
[hudi] branch master updated: [HUDI-6394] Fixed the issue that CreateHoodieTableCommand does not provide detailed exception stack trace (#8996)
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 b3530d190e1 [HUDI-6394] Fixed the issue that CreateHoodieTableCommand does not provide detailed exception stack trace (#8996)
b3530d190e1 is described below
commit b3530d190e17729bca313504c1a79a77b06c5a63
Author: Paul Zhang <xz...@126.com>
AuthorDate: Sun Jun 18 09:14:28 2023 +0800
[HUDI-6394] Fixed the issue that CreateHoodieTableCommand does not provide detailed exception stack trace (#8996)
---
.../org/apache/spark/sql/hudi/command/CreateHoodieTableCommand.scala | 5 +++++
1 file changed, 5 insertions(+)
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 fd64f46d55e..69aed504e84 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
@@ -39,6 +39,7 @@ import org.apache.spark.sql.types.StructType
import org.apache.spark.sql.{AnalysisException, Row, SparkSession}
import org.apache.spark.{SPARK_VERSION, SparkConf}
+import java.io.{PrintWriter, StringWriter}
import scala.collection.JavaConverters._
import scala.collection.mutable
import scala.util.control.NonFatal
@@ -84,6 +85,10 @@ case class CreateHoodieTableCommand(table: CatalogTable, ignoreIfExists: Boolean
} 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)
}
Seq.empty[Row]
}