hive server 2 服务端代码远程debug调试方式:
1. idea 添加debug 远程调试,如下:
2. 将idea 远程debug 参数添加到 vi hadoop_conf/hadoop-env.sh 中 HADOOP_CLIENT_OPTS 配置项中,如:
export HADOOP_CLIENT_OPTS="-Xmx5g -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9001 $HADOOP_CLIENT_OPTS"
beeline client 客户端代码远程debug调试方式:
1. 修改 vi hadoop_conf/hadoop-env.sh 中 HADOOP_CLIENT_OPTS 配置项,添加 -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 参数,端口号可自己配置,如下:
export HADOOP_CLIENT_OPTS="-Xmx5g -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 $HADOOP_CLIENT_OPTS"
2. idea中添加debug远程调试: