Database Reference
In-Depth Information
I alter the Linux PATH variable so the Maven executable can be found from the command line; the type command
shows that it is located under /usr/local/apache-maven/bin/mvn.
export PATH=/usr/local/apache-maven/bin:$PATH
[root@hc2nn tmp]# type mvn
mvn is /usr/local/apache-maven/bin/mvn
I check the Maven version to ensure that Maven is running without fault:
[root@hc2nn tmp]# mvn -version
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T08:58:10+12:00)
Now, I set up some variables for the tests to define various Hadoop component paths:
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64
export HADOOP_HOME=/usr/lib/hadoop
export HADOOP_CONF_DIR=/etc/hadoop/conf
export ZOOKEEPER_HOME=/usr/lib/zookeeper
export PIG_HOME=/usr/lib/pig
export HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce
I have Hadoop and Pig installed for this example, but if you wanted to determine which other components were
available for installation—say, Sqoop—you could use the yum list function, like this:
[root@hc2nn bigtop-tests]# yum list available | grep sqoop
hue-sqoop.x86_64 2.5.1.5-1.el6 Bigtop
sqoop.noarch 1.99.2.5-1.el6 Bigtop
sqoop-client.noarch 1.99.2.5-1.el6 Bigtop
sqoop-server.noarch 1.99.2.5-1.el6 Bigtop
To run the tests, I first install the test artifacts using the Maven (mvn) install command as root:
cd /home/hadoop/bigtop/bigtop/bigtop-tests/test-artifacts/
mvn -f pom.xml install
I look for the success banner to indicate that there are no errors:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:26 min
[INFO] Finished at: 2014-08-30T08:44:38+12:00
[INFO] Final Memory: 20M/129M
[INFO] ------------------------------------------------------------------------
 
Search WWH ::




Custom Search