tags:

views:

128

answers:

1

I have checked-out a project from SourceForge named HadoopDB. It uses some class in another project named Hive. I have used Eclipse Java build path setting to link source to the Hive project root folder, but classes in the HadooDB project have some error as:

The import org.**.**.classname can't be resolved

Should I link the Hive root folder into HadoopDB source tab or any other folder?

A: 

Link sources to another project is not enough to solve classes, unless you are actually compiling those sources.

A safer way to link to sources would be to define another Java project, which would link to Hive sources and compile them, then declare your HadoopDB as depending on the Hive project.

That way, HadoopDB compilation would refer to Hive .class files produced by the compilation of the Hive Java project.


A simpler way would be to find the Hive jars, and and those in the classpath dependency of your HadoopDB project.


Now I take a closer look to the HadoopDB setup, it says:

  • Modify the Hive build path to link to the HadoopDB project and
  • HadoopDB's build path to include both the Hive project and jar files located in HADOOP_HOME

It does not says "link the sources".
It says "link the projects".

alt text

VonC
Thanks for your reply. Actually, HadoopDB use the code in Hive, HadoopDB patch the Hive project, so Hive also use the code in hadoopDB. The guideline in the project main page advise link source to each other, but it seems can't work.
cppguy
@cppguy: I just might interpret those guidelines slightly differently: see my completed answer.
VonC