Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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. For be able to attach to a local process, follow the instruction here.

Front-end Development using IntelliJ

Setup

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

Run/Debug Unit Tests

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

Remote Debugging

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

Backend Development using CLion

Setup

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

Local Debugging

  1. Go to Run --> Attach to Local Processes.
    Image Added
    Image Added
  2. Set a breakpoint.
    Image Added
  3. Execute a command in Impala shell.
    Image Added
  4. Start debugging.
    Image Added

This document is to help Impala front-end development using IntelliJ 

Info
titleIntelliJ Vs. Eclipse

There is no winner. If you are not sure which IDE is more suitable for you, please read the link and compare pros and cons: https://www.quora.com/Which-is-better-for-Java-development-Eclipse-or-IntelliJ-IDEA

Prerequisites

Setup

...

Image Removed

...

Remote Debugging

  1. Choose "Run-Edit Configurations".
    Image Removed
  2. Press the + button. Scroll down the list menu and choose "Remote".
    Image Removed
  3. Fill in some required information such as Name, Host and Port. Use port 30000 for the first impalad, port 30001 for the second impalad.
    Image Removed
  4. Press debug icon on the top of the right side.
    Image Removed
  5. Connected the Impala fronet end successfully!
    Image Removed
  6. Let's set a breakpoint.
    Image Removed
  7. Execute a query like this:
    Image Removed
  8. Enjoy debugging!Image Removed