THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
Prerequisites
- Download IntelliJ and CLion. You can request for an open source license for CLion.
- Bootstrap the system for Impala development. See this link.
- Always source $IMPALA_HOME/bin/impala-config.sh prior to launching IntelliJ or CLion.
- To be able to attach to a local process, follow the instruction here.
Front-end Development using IntelliJ
Setup
- Launch IntelliJ and click "Open".
- Select the $IMPALA_HOME/fe directory.
Run/Debug Unit Tests
- Go to Run --> Edit Configurations.
- Select Defaults --> JUnit
- Add LD_LIBRARY_PATH with the value of $IMPALA_HOME/be/build/latest/service.
- Run all JUnit tests.
Remote Debugging
- Go to Run --> Edit Configurations.
- Click on the + sign and select Remote.
- Add impalad-debug configuration to debug impalad with a port number of 30000.
- Add catalog-debug configuration to debug catalog with a port number of 30030.
- Set a breakpoint.
- Run impalad-debug.
- Execute a command in Impala shell.
- Start debugging.
Backend Development using CLion
Setup
- Launch CLion and click "Open".
- Select $IMPALA_HOME directory.
Local Debugging
- 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. - Set a breakpoint.
- Execute a command in Impala shell.
- Start debugging.
Impala Shell Development using CLion
Setup
- Go to File --> Settings.
- Go to Build, Execution, Deployment --> Python Interpreter.
- Add an existing virtual env environment.
- Select the python interpreter in $IMPALA_HOME/infra/python/env/bin/python
Local Debugging
- Go to Run --> Attach to Local Processes.
- Set a breakpoint.
- Execute a command in Impala shell.
- Start debugging.
Using clang-format in IntelliJ and CLion
You can use the ClangFormatIJ plugin to run clang-format in IntelliJ and CLion