hbase0.98.1源码编译
给个源码下载地址:http://www.apache.org/dyn/closer.cgi/hbase/
编译过程:
1.需要安装(必须安装前三个,都非常好安装,直接export就好了)
Maven 3.3.1
findbugs 3.0.1
Java 1.7.0_06
Hadoop 2.2.0
HBase 0.98.1
2.生成pom
修改generate-hadoopX-poms.sh中的hbase_home="${HBASE_HOME}"
hbase_home="下载的hbase源码路径"
运行生成pom.xml.hadoop2
bash -x ./dev-support/generate-hadoopX-poms.sh 0.98.1 0.98.1-hadoop2
3.编译源码
mvn -f pom.xml.hadoop2 install -DskipTests assembly:single -Prelease
编译的过程可能会报很多的错,例如:
Connect to people.apache.org:80 [people.apache.org/140.211.11.9] failed: Connection timed out
这是因为在运行一些common或是server包里的test连接这个网站需要的,可是people.apache.org总是连接超时
我没啥好办法,可以注释掉这些test,或是多试几次,就连上了
Failed to execute goal org.apache.rat:apache-rat-plugin
Apache RAT (Release Audit Tool) 是一个用来检查软件许可证发行的准确性和高效性的工具。它的本质是:对可能出现的问题作出预测(跟没说一样)
<plugin> <!-- excludes are inherited --> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> <version>0.8</version> <configuration> <excludes> <exclude>**/*.versionsBackup</exclude> <exclude>**/*.log</exclude> <exclude>**/.*</exclude> <exclude>**/*.tgz</exclude> <exclude>**/*.orig</exclude> <exclude>**/8e8ab58dcf39412da19833fcd8f687ac</exclude> <exclude>**/a6a6562b777440fd9c34885428f5cb61.21e75333ada3d5bafb34bb918f29576c</exclude> <exclude>**/.git/**</exclude> <exclude>**/.idea/**</exclude> <exclude>**/*.iml</exclude> <exclude>**/target/**</exclude> <exclude>**/CHANGES.txt</exclude> <exclude>**/generated/**</exclude> <exclude>**/gen-*/**</exclude> <exclude>**/conf/*</exclude> <exclude>**/*.avpr</exclude> <exclude>**/*.svg</exclude> <exclude>**/META-INF/services/**</exclude> <!-- MIT: https://github.com/twbs/bootstrap/blob/master/LICENSE --> <exclude>**/bootstrap-theme.css</exclude> <exclude>**/bootstrap-theme.min.css</exclude> <!-- MIT http://jquery.org/license --> <exclude>**/jquery.min.js</exclude> <!-- vector graphics --> <exclude>**/*.vm</exclude> <!-- apache doxia generated --> <exclude>**/control</exclude> <exclude>**/conffile</exclude> <exclude>docs/*</exclude> <exclude>logs/*</exclude> <!-- auto-gen docs --> <!--It don't like freebsd license--> <exclude>**/src/main/site/resources/css/freebsd_docbook.css</exclude> <!-- exclude source control files --> <exclude>.git/**</exclude> <exclude>.svn/**</exclude> <exclude>**/.settings/**</exclude> </excludes> </configuration> </plugin>
我的解决方法是注释掉,不知道其他人有没有好的解决方法,
贴个相似的帖子:http://bupt04406.iteye.com/blog/1997376
在编译成功后,hbase-assembly/target目录下,有hbase-0.98.1-hadoop2-bin.tar.gz
解压部署到集群
cdh无需生成hadoop1或2,直接执行mvn -f pom.xml install -DskipTests assembly:single -Prelease