Filed under: Hive

Trying to build Hive

I had a problem setting up Hive using ant 1.6.5. The problem seemed similar to when I was trying to build Hadoop with an old version of ant. I pointed it to my local 1.8.1 version of ant.

Using the old version:
ant package
Buildfile: build.xml

BUILD FAILED
/home/user/hive/hive/build.xml:52: Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the nested "matches" element.
Total time: 0 seconds

Using the new version:
${ANT_HOME}/bin/ant package

A new problem occurred with the error output being
Buildfile: /home/user/hive/build.xml


install-hadoopcore-internal:

build_shims:
     [echo] Compiling shims against hadoop 0.17.2.1 (/home/user/hive/build/hadoopcore/hadoop-0.17.2.1)
    [javac] /home/user/hive/shims/build.xml:48: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 5 source files to /home/user/hive/build/shims/classes
    [javac] /home/user/hive/shims/src/0.17/java/org/apache/hadoop/hive/shims/Hadoop17Shims.java:105: method does not override a method from its superclass
    [javac]   @Override
    [javac]    ^
    [javac] /home/user/hive/shims/src/0.17/java/org/apache/hadoop/hive/shims/Hadoop17Shims.java:118: method does not override a method from its superclass
    [javac]   @Override
    [javac]    ^
    [javac] /home/user/hive/shims/src/0.17/java/org/apache/hadoop/hive/shims/Hadoop17Shims.java:131: method does not override a method from its superclass
    [javac]   @Override
    [javac]    ^
    [javac] 3 errors

BUILD FAILED
/home/user/hive/build.xml:162: The following error occurred while executing this line:

/home/user/hive/build.xml:105: The following error occurred while executing this line:
/home/user/hive/shims/build.xml:57: The following error occurred while executing this line:
/home/user/hive/shims/build.xml:48: Compile failed; see the compiler error output for details.

Total time: 8 seconds

It looked to be a problem with the version of java I was using. I set my JAVA_HOME path to point to a new version of java. 
export JAVA_HOME="/usr/global/jdk/jdk1.6.0_20/"

 And I reran my previous command
${ANT_HOME}/bin/ant package
BUILD SUCCESSFUL
Total time: 2 minutes 51 seconds

Now the Hive build was a great success =)

1 of 1


Posterous theme by Cory Watilo