From 49a1553674ad3c140f0644a0efcd54b72a64bc28 Mon Sep 17 00:00:00 2001 From: GuoPhilipse Date: Thu, 6 Aug 2020 18:20:18 +0800 Subject: [PATCH 1/4] improve exception message --- .../apache/spark/sql/hive/execution/InsertIntoHiveTable.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala index 116217ecec0ba..7b889bac83702 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala @@ -245,7 +245,7 @@ case class InsertIntoHiveTable( if (fs.exists(partitionPath)) { if (!fs.delete(partitionPath, true)) { throw new RuntimeException( - "Cannot remove partition directory '" + partitionPath.toString) + s"Cannot remove partition directory ${partitionPath.toString}") } } } @@ -311,7 +311,7 @@ case class InsertIntoHiveTable( if (fs.exists(path)) { if (!fs.delete(path, true)) { throw new RuntimeException( - "Cannot remove partition directory '" + path.toString) + s"Cannot remove partition directory ${path.toString}") } // Don't let Hive do overwrite operation since it is slower. doHiveOverwrite = false From 9370ba2512c0edd23b659957c7c81b1743ace6c3 Mon Sep 17 00:00:00 2001 From: GuoPhilipse Date: Fri, 7 Aug 2020 08:28:12 +0800 Subject: [PATCH 2/4] improve exception message --- .../apache/spark/sql/hive/execution/InsertIntoHiveTable.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala index 7b889bac83702..e774601a2bb00 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala @@ -245,7 +245,7 @@ case class InsertIntoHiveTable( if (fs.exists(partitionPath)) { if (!fs.delete(partitionPath, true)) { throw new RuntimeException( - s"Cannot remove partition directory ${partitionPath.toString}") + "Cannot remove partition directory '" + partitionPath.toString + "'") } } } @@ -311,7 +311,7 @@ case class InsertIntoHiveTable( if (fs.exists(path)) { if (!fs.delete(path, true)) { throw new RuntimeException( - s"Cannot remove partition directory ${path.toString}") + "Cannot remove partition directory '" + path.toString + "'") } // Don't let Hive do overwrite operation since it is slower. doHiveOverwrite = false From 08a58247ebeb9675abdcae4358bfd46f84da450a Mon Sep 17 00:00:00 2001 From: GuoPhilipse Date: Fri, 7 Aug 2020 10:43:30 +0800 Subject: [PATCH 3/4] improve exception message --- .../apache/spark/sql/hive/execution/InsertIntoHiveTable.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala index e774601a2bb00..3c3f31ac2994a 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala @@ -245,7 +245,7 @@ case class InsertIntoHiveTable( if (fs.exists(partitionPath)) { if (!fs.delete(partitionPath, true)) { throw new RuntimeException( - "Cannot remove partition directory '" + partitionPath.toString + "'") + s"Cannot remove partition directory '$partitionPath'") } } } @@ -311,7 +311,7 @@ case class InsertIntoHiveTable( if (fs.exists(path)) { if (!fs.delete(path, true)) { throw new RuntimeException( - "Cannot remove partition directory '" + path.toString + "'") + s"Cannot remove partition directory '$path'") } // Don't let Hive do overwrite operation since it is slower. doHiveOverwrite = false From 962f0bcb05b140a8d27577f674a8029d3028d634 Mon Sep 17 00:00:00 2001 From: GuoPhilipse Date: Fri, 7 Aug 2020 12:46:22 +0800 Subject: [PATCH 4/4] trigger rebuild