問(wèn)題描述
用的是cdh6,在hue是上編輯了一個(gè)Hive sql,其中包含了漢字疹味。在hive編輯頁(yè)面執(zhí)行正常仙粱,通過(guò)工作流執(zhí)行hive節(jié)點(diǎn)時(shí)會(huì)出現(xiàn)中文亂碼房交。
解決方案
在hive節(jié)點(diǎn)設(shè)置里添加如下參數(shù)
yarn.app.mapreduce.am.admin-command-opts -Dfile.encoding=UTF-8
如圖:
詳解
yarn.app.mapreduce.am.admin-command-opts是在設(shè)置MapReduce Application Master的JVM的參數(shù)。
參考(在以下鏈接中搜索yarn.app.mapreduce.am.admin-command-opts):
-
https://blog.csdn.net/weixin_43370502/article/details/100541863
(這個(gè)是重點(diǎn)) - http://oozie.apache.org/docs/5.2.0/AG_Install.html
- https://mapr.com/docs/archive/mapr40x/mapred-default.xml_28869430.html
- https://hadoop.apache.org/docs/r2.7.2/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml