錯誤1:
ERROR client.RemoteDriver: Failed to start SparkContext: java.lang.IllegalArgumentException: Executor memory 456340275 must be at least 471859200.
Please increase executor memory using the --executor-memory option or spark.executor.memory in Spark configuration
解決方法:搜索 spark.executor.memory 進行配置到可使用的范圍大小,如下圖:

錯誤2:
Caused by: java.lang.IllegalArgumentException:
Executor memory 456340275 must be at least 471859200.
Please increase executor memory using the --executor-memory option or spark.executor.memory in Spark configuration
解決方法:
spark.executor.memory(Spark 執行程序最大 Java 堆棧大小)的值過小,把 spark.executor.memory 設置大於 報錯信息中規定的 at least 471859200。

錯誤3:
使用 yarn HA時,運行 hive on yarn 的任務無法得出結果時,並且出現以下錯誤
Caused by:javax.servlet.ServletException: Could not determine the proxy server for redirection
解決辦法:禁用 YARN HA,即ResourceManager只使用一個主節點,其實一般yarn HA仍然能運行 hive on yarn 的任務並且能得出正常結果,但是還是會報出同樣錯誤

錯誤4:
YARN HA(node1、node2均部署了ResourceManager)的情況下,執行 hive on spark 的程序,雖然能得出正常執行成功得出結果,
但是對應該程序的日志信息仍然報錯:無法確定用於重定向的代理服務器 Could not determine the proxy server for redirection。
select * from test_tb;
select count(*) from test_tb;
insert into test_tb values(2,'ushionagisa');

解決辦法:
腳本中定義任務提交的命令:
Default Hive database:hdfs://nameservice1/user/hive/warehouse
spark.master:spark://master:7077
/root/spark/bin/spark-sql --master spark://node1:7077 --executor-memory 1g --total-executor-cores 2 --conf spark.sql.warehouse.dir=hdfs://nameservice1/user/hive/warehouse
