You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Prerequisites

  1. Download IntelliJ and CLion. You can request for an open source license for CLion.
  2. Bootstrap the system for Impala development. See this link.
  3. Always source $IMPALA_HOME/bin/impala-config.sh prior to launching IntelliJ or CLion.
  4. To be able to attach to a local process, follow the instruction here.

Front-end Development using IntelliJ

Setup

  1. Launch IntelliJ and click "Open".
  2. Select the $IMPALA_HOME/fe directory.

Run/Debug Unit Tests

  1. Go to Run --> Edit Configurations.
  2. Select Defaults --> JUnit
  3. Add LD_LIBRARY_PATH with the value of $IMPALA_HOME/be/latest/service.
  4. Run all JUnit tests.

Remote Debugging

  1. Go to Run --> Edit Configurations.
  2. Click on the + sign and select Remote.
  3. Add impalad-debug configuration to debug impalad with a port number of 30000.
  4. Add catalog-debug configuration to debug catalog with a port number of 30030.
  5. Set a breakpoint.
  6. Run impalad-debug.
  7. Execute a command in Impala shell.
  8. Start debugging.

Backend Development using CLion

Setup

  1. Launch CLion and click "Open".
  2. Select $IMPALA_HOME directory.

Local Debugging

  1. Go to Run --> Attach to Local Processes.


    If you see an error "ptrace: Operation not permitted" then follow the instructions here to allow ptracing of non-child processes.
  2. Set a breakpoint.
  3. Execute a command in Impala shell.
  4. Start debugging.

 

Impala Shell Development using CLion

Setup

  1. Go to File --> Settings.
  2. Go to Build, Execution, Deployment --> Python Interpreter.
  3. Add an existing virtual env environment.
  4. Select the python interpreter in $IMPALA_HOME/infra/python/env/bin/python

Local Debugging

  1. Go to Run --> Attach to Local Processes.

  2. Set a breakpoint.
  3. Execute a command in Impala shell.
  4. Start debugging.

Using clang-format in IntelliJ and CLion

You can use the ClangFormatIJ plugin to run clang-format in IntelliJ and CLion

  • No labels