This is an automated email from the ASF dual-hosted git repository.
liuxun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino-playground.git
The following commit(s) were added to refs/heads/main by this push:
new fa1b97b [#100] fix spark sql client insert data failed (#101)
fa1b97b is described below
commit fa1b97b6ee08555aece3d033344359f045489bc5
Author: FANNG <[email protected]>
AuthorDate: Wed Nov 6 17:53:51 2024 +0800
[#100] fix spark sql client insert data failed (#101)
After #88 , spark sql client couldn't insert data, The spark
configuration in #88 is not enough, should add hive metastore uri if
setting `spark.sql.hive.metastore.jars` to `path`. I'm not sure the root
cause of problem, there're some thread level session cache in
Spark/Hive, this PR optimize the configuration just affect hive_catalog.
---
init/spark/spark-defaults.conf | 4 ++--
playground.sh | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/init/spark/spark-defaults.conf b/init/spark/spark-defaults.conf
index 446f865..50012a3 100644
--- a/init/spark/spark-defaults.conf
+++ b/init/spark/spark-defaults.conf
@@ -27,5 +27,5 @@ spark.sql.catalog.catalog_rest.type rest
spark.sql.catalog.catalog_rest.uri http://gravitino:9001/iceberg/
spark.locality.wait.node 0
spark.sql.warehouse.dir hdfs://hive:9000/user/hive/warehouse
-spark.sql.hive.metastore.jars path
-spark.sql.hive.metastore.jars.path file:///opt/spark/jars/*
+spark.sql.catalog.catalog_hive.spark.sql.hive.metastore.jars path
+spark.sql.catalog.catalog_hive.spark.sql.hive.metastore.jars.path
file:///opt/spark/jars/*
diff --git a/playground.sh b/playground.sh
index 84b2c07..5577727 100755
--- a/playground.sh
+++ b/playground.sh
@@ -17,6 +17,9 @@
# specific language governing permissions and limitations
# under the License.
#
+
+set -x
+
playground_dir="$(dirname "${BASH_SOURCE-$0}")"
playground_dir="$(
cd "${playground_dir}" >/dev/null