You can use the Java Debug Wire Protocol to debug Kyuubi with your favorite IDE tool, e.g. IntelliJ IDEA.

Debugging Server

We can configure the JDWP agent in KYUUBI_JAVA_OPTS for debugging.

For example,

  1. KYUUBI_JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 \
  2. bin/kyuubi start

In the IDE, you set the corresponding parameters(host&port) in debug configurations, for example,

Debugging Kyuubi - 图1

Debugging Engine

We can configure the Kyuubi properties to enable debugging engine.

  1. kyuubi.engine.flink.java.options -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005

Trino Engine

  1. kyuubi.engine.trino.java.options -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005

Hive Engine

  1. kyuubi.engine.hive.java.options -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005

Debugging Apps

Spark Engine

  • Spark Driver
  1. spark.driver.extraJavaOptions -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
  • Spark Executor
  1. spark.executor.extraJavaOptions -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
  • Flink Processes
  1. env.java.opts -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
  • Flink JobManager
  1. env.java.opts.jobmanager -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
  • Flink TaskManager
  1. env.java.opts.taskmanager -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
  • Flink HistoryServer
  1. env.java.opts.historyserver -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
  • Flink Client
  1. env.java.opts.client -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005