Note: You must make sure you add your respective zookeeper nodes to the list via the command below. The property is giraph.zkList. It takes a comma separated list with no spaces! This can be done before or after you build. If you want to edit it after the build, then you must edit the one in dga-giraph/build/dist/conf/.
$ vi distributed-graph-analytics/dga-giraph/src/main/resources/dga-config.xml
$ cd distributed-graph-analytics
$ gradle clean dist
The above command will take care of building both the giraph and graphx analytics. If you would like to build them individually, navigate to their individual project directories and run the same command.
$ gradle clean dist -Pcdhversion=cdh4
Note: Before you build DGA for CDH4 or any other version of hadoop, you must build giraph for that same version.
Add the Hadoop Version of your choice to the gradle.properties file in the dga-giraph project. Now we need to move to the dga-giraph build.gradle file. You then need to add a def for your new hadoop version to check for the property. In the dependency list, where it says cdh_version, replace it with the def name you just created.
After you do the steps above your gradle.properties might look like this.
cdh5version=2.3.0-cdh5.0.0
cdh4version=2.0.0-mr1-cdh4.7.0
hadoopversion=2.4.0
Below is a snippet of what your build.gradle might look like.
def cdh_version = project.hasProperty('cdhversion') && cdhversion == "cdh4" ? cdh4version : cdh5version
def hadoop_version = project.hasProperty('hadoopversion') ? hadoopversion : cdh5version
description = 'dga-giraph'
dependencies {
compile project(':dga-core')
compile 'org.apache.giraph:giraph-core:1.1.0-SNAPSHOT'
compile group: 'org.apache.hadoop', name: 'hadoop-client', version: hadoop_version
testCompile "org.mockito:mockito-core:1.9.5"
testCompile 'junit:junit:4.11'
testCompile 'commons-httpclient:commons-httpclient:3.0.1'
}
See: How To Deploy