Versions Compared

Key

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

...

In particular, JAVA_HOME, IMPALA_HOME, IMPALA_HADOOP_VERSION, PYTHON_PATH, and LBLD_LIBRARY_PATH must be set properly.

...

For a good experience, it is recommended to allow Eclipse to use a good bit of memory. In your eclipse installation folder, open eclipse.ini and change the existing settings to the following recommended values:

  • -XX:MaxPermSize=512mXms512m, -Xms512m, -Xmx4gXmx4g

Eclipse Launch Script

In addition to the sourced scripts above, you must add a build path to LD_LIBRARY_PATH. Easiest is to create a script that does all this each time you start Eclipse. For example, we might create a script "ecl". (Adjust paths for your environment.)

#! /bin/bash                                                                              
export IMPALA_HOME=$HOME/Impala
source $IMPALA_HOME/bin/impala-config.sh
source $IMPALA_HOME/bin/set-classpath.sh
export LD_LIBRARY_PATH=${IMPALA_HOME}/be/build/debug/service:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
exec eclipse/java-photon/eclipse/eclipse

Java Frontend (FE)

The FE is a maven project which integrates very nicely with Eclipse. Follow these steps:

...

  1. Ensure proper ptrace settings. On Ubuntu edit /etc/sysctl.d/10-ptrace.conf and set kernel.yama.ptrace_scope = 0.
  2. Ensure appropriate .gdbinit in your home directory. It must contain at least the following two lines:

    Code Block
    handle SIGSEGV nostop noprint pass
    handle SIGPIPE nostop noprint pass


  3. In Eclipse go to Run->Debug Configurations->C/C++ Attach To Application. Use "build/debug/service/impalad" as the application and your BE project.
  4. At the bottom of this menu, click on "Select other..." to switch the "Attach to Process Launcher".
    1. The default GDB DSF launcher does not workwith Impala.
    2. Enable "Use Configuration Specific Settings" and select the Standard Attach To Process Launcher. Click OK.
  5. On the "Debug" panel of the debug configuration, select the gdb/mi debugger.
    1. As "GDB Command Set" use Standard (Linux)
    2. As "Protocol" use mi/2

      Note

      If GDB of impala toolchain cause errors,  you main try use system GDB. At "GDB debugger" use /usr/bin/gdb


  6. When you click "Debug" a menu will pop up listing the processes you can attach to. Search for "impalad" and select the one you want to debug.

You may want to enable pretty printing in gdb as described here Eclipse Setup for Impala Development.

Note: the above is for Eclipse Juno. The described 

Python Tests

To develop and debug Python in Eclipse I recommend the PyDev plugin. Follow these steps to setup Eclipse for developing/debugging most Impala Python components:

...

  • In Eclipse go to Run->Debug Configurations. Select "Python unittest".
  • Select "tests" as the project and query_test/test_explain.py as the "Main Module".
  • In the arguments tab, enable "Override PyUnit preference for this launch?". Select the the Py.test runner.
  • Remove the default "–verbosity 0" argument (if present).
  • Add an environment variable “LD_LIBRARY_PATH” (via the tab of ENVIRONMENT, then add a new environment variable by clicking on the New button) and then put the following value: “$IMPALA_HOME/toolchain/cdh_components-1009254/kudu-1.10.0-cdh6.x-SNAPSHOT/debug/lib”.
  • Debug!

Combined FE/BE Debugging

...