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?