From 8719a233f648a9025ae425c8619cebd9790063bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=99=93=E9=9D=92?= <86282370+izhuxiaoqing@users.noreply.github.com> Date: Thu, 18 Nov 2021 11:40:18 +0800 Subject: [PATCH] Update ex-ug-FAQ.md --- docs-2.0/nebula-exchange/ex-ug-FAQ.md | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs-2.0/nebula-exchange/ex-ug-FAQ.md b/docs-2.0/nebula-exchange/ex-ug-FAQ.md index 54604fa67a1..df3c93c9be4 100644 --- a/docs-2.0/nebula-exchange/ex-ug-FAQ.md +++ b/docs-2.0/nebula-exchange/ex-ug-FAQ.md @@ -82,6 +82,40 @@ Check that the Nebula Graph service port is configured correctly. Check whether the version of Exchange is the same as that of Nebula Graph. For more information, see [Limitations](../nebula-exchange/about-exchange/ex-ug-limitations.md). +### How to correct the messy code when importing Hive data into Nebula Graph? + +It may happen if the property value of the data in Hive contains Chinese characters. The solution is to add the following options before the JAR package path in the import command: + +```bash +--conf spark.driver.extraJavaOptions=-Dfile.encoding=utf-8 +--conf spark.executor.extraJavaOptions=-Dfile.encoding=utf-8 +``` + +Namely: + +```bash +/bin/spark-submit --master "local" \ +--conf spark.driver.extraJavaOptions=-Dfile.encoding=utf-8 \ +--conf spark.executor.extraJavaOptions=-Dfile.encoding=utf-8 \ +--class com.vesoft.nebula.exchange.Exchange \ + -c +``` + +In YARN, use the following command: + +```bash +/bin/spark-submit \ +--class com.vesoft.nebula.exchange.Exchange \ +--master yarn-cluster \ +--files \ +--conf spark.driver.extraClassPath=./ \ +--conf spark.executor.extraClassPath=./ \ +--conf spark.driver.extraJavaOptions=-Dfile.encoding=utf-8 \ +--conf spark.executor.extraJavaOptions=-Dfile.encoding=utf-8 \ + \ +-c application.conf +``` + ## Configuration ### Which configuration fields will affect import performance?