Start hive with –debug Option, and Hive will listener on a port. It is 8000 in this example.
hive --debug
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/hadoop-2.6.0-cdh5.7.5/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/spark-1.6.1-bin-hadoop2.6/lib/spark-assembly-1.5.0-hadoop2.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Listening for transport dt_socket at address: 8000
Open Hive project using Intellj idea. Open window [Run] and click [Edit Configurations]. Input the Host and Port of remote jvm.