idea 選中Edit Congigurations 添加remote如下圖
圖中debug方式為listen (本地不通線上,線上通本地)
遠程 hive 客戶端修改{HIVE_HOME}/bin/ext/debug.sh
將HIVE_MAIN_CLIENT_DEBUG_OPTS、 HIVE_CHILD_CLIENT_DEBUG_OPTS修改為如圖
之后 idea點擊debug按鈕等待遠程連接,遠程hive客戶端啟動
{HIVE_HOME}/bin/hive --debug
報錯如下
WARNING: Use "yarn jar" to launch YARN applications.
Conflicting collector combinations in option list; please refer to the release notes for the combinations allowed
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
原因是jvm沖突。將參數去掉-XX:+UseParallelGC
重來一遍就ok了