Support Questions

Find answers, ask questions, and share your expertise

How to build hive source code from hortonworks github repo

avatar
Rising Star

I have downloaded the source code for hive version 0.13.0.2.1.2.0-402 and when I am trying to build it with the command

mvn clean package -DskipTests

its not getting build and throwing the following error:

[ERROR] Failed to execute goal on project hive-shims-0.23: Could not resolve dependencies for project org.apache.hive.shims:hive-shims-0.23:jar:0.13.0: The following artifacts could not be resolved: org.apache.hadoop:hadoop-common:jar:2.4.1-SNAPSHOT, org.apache.hadoop:hadoop-hdfs:jar:2.4.1-SNAPSHOT, org.apache.hadoop:hadoop-hdfs:jar:tests:2.4.1-SNAPSHOT, org.apache.hadoop:hadoop-mapreduce-client-core:jar:2.4.1-SNAPSHOT, org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:tests:2.4.1-SNAPSHOT, org.apache.hadoop:hadoop-yarn-api:jar:2.4.1-SNAPSHOT, org.apache.hadoop:hadoop-yarn-common:jar:2.4.1-SNAPSHOT, org.apache.hadoop:hadoop-yarn-client:jar:2.4.1-SNAPSHOT, org.apache.hadoop:hadoop-yarn-server-tests:jar:tests:2.4.1-SNAPSHOT: Could not find artifact org.apache.hadoop:hadoop-common:jar:2.4.1-SNAPSHOT in conjars (http://conjars.org/repo) -> [Help 1]

My first question is how to get this build successful?

second one is why there is SNAPSHOT coming in one of the releases of hive?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@sachin gupta you need to include hadoop jars when you build it. Pass the parameter below with your build statement

-Phadoop-2

whole command would look like

mvn clean install -DskipTests -Phadoop-2

Why are you building 0.13 release?

Please refer to the docs here https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ

View solution in original post

7 REPLIES 7

avatar
Master Mentor

@sachin gupta you need to include hadoop jars when you build it. Pass the parameter below with your build statement

-Phadoop-2

whole command would look like

mvn clean install -DskipTests -Phadoop-2

Why are you building 0.13 release?

Please refer to the docs here https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ

avatar
Rising Star

after specifying the hadoop2 option still getting the same error.

avatar
Master Mentor

@sachin gupta where did you download the source from exactly? Why version 0.13?

avatar
Rising Star

download link for hive source code https://github.com/hortonworks/hive-release/tree/HDP-2.1.2.0

0.13 we are using for our development and we are facing some issue so I want to do remote debugging for that.

avatar
Master Mentor

HDP 2.1 is an old release, it is in deprecated status, it will be dropped when HDP 2.4 is released in a few months. I recommend to upgrade to 2.3 using express upgrade. For the actual issues you're having, I suggest you open a thread here. @sachin gupta

avatar
Master Mentor

@sachin gupta there's also this set of instructions following your source code link https://cwiki.apache.org/confluence/display/Hive/GettingStarted

avatar
Rising Star

that is fine.

So can I get any help here for building this old release ??