作为一个 IT 农,是不是或多或少有些强迫症,比如用软件就用最新的~
HBase 从 2010-06-04 的 hbase-0.20.5 版本,到目前最新的 2018-07-18 的 2.1.0,不管是工作中用还是自学用,都不建议用老版本,也不建议用新版本。那到底用哪个版本最合适呢?
官网告诉你这些:
HBase 和 JDK 兼容性
HBase Version | JDK 7 | JDK 8 | JDK 9 | JDK 10 |
---|---|---|---|---|
2.0 | Not Supported | yes | Not Supported | Not Supported |
1.3 | yes | yes | Not Supported | Not Supported |
1.2 | yes | yes | Not Supported | Not Supported |
从该表可以看出,JDK建议用 JDK7 或者 JDK8。但用 JDK7 时,HBase2.0 不支持。当然也没事,因为大多数企业生产环境,还是 1.x 版本。
HBase 和 Hadoop 兼容性
Hadoop version support matrix
- "S" = supported
- "X" = not supported
- "NT" = Not tested
HBase-1.2.x | HBase-1.3.x | HBase-1.5.x | HBase-2.0.x | HBase-2.1.x | |
---|---|---|---|---|---|
Hadoop-2.4.x | S | S | X | X | X |
Hadoop-2.5.x | S | S | X | X | X |
Hadoop-2.6.0 | X | X | X | X | X |
Hadoop-2.6.1+ | S | S | X | S | X |
Hadoop-2.7.0 | X | X | X | X | X |
Hadoop-2.7.1+ | S | S | S | S | S |
Hadoop-2.8.[0-1] | X | X | X | X | X |
Hadoop-2.8.2 | NT | NT | NT | NT | NT |
Hadoop-2.8.3+ | NT | NT | NT | S | S |
Hadoop-2.9.0 | X | X | X | X | X |
Hadoop-2.9.1+ | NT | NT | NT | NT | NT |
Hadoop-3.0.x | X | X | X | X | X |
Hadoop-3.1.0 | X | X | X | X | X |
从该表可以看出,学习 HBase,兼容各个版本的 Hadoop 版本还是2.7.1+ 系列,所以 2.8.x、2.9.x、3.x并不是最好的选择。
Hadoop 和 JDK 兼容性
Version 2.7 and later of Apache Hadoop requires Java 7. It is built and tested on both OpenJDK and Oracle (HotSpot)'s JDK/JRE.
Earlier versions (2.6 and earlier) support Java 6.
Here are the known JDKs in use or which have been tested:
Version | Status | Reported By |
oracle 1.7.0_15 | Good | Cloudera |
oracle 1.7.0_21 | Good (4) | Hortonworks |
oracle 1.7.0_45 | Good | Pivotal |
openjdk 1.7.0_09-icedtea | Good (5) | Hortonworks |
oracle 1.6.0_16 | Avoid (1) | Cloudera |
oracle 1.6.0_18 | Avoid | Many |
oracle 1.6.0_19 | Avoid | Many |
oracle 1.6.0_20 | Good (2) | LinkedIn, Cloudera |
oracle 1.6.0_21 | Good (2) | Yahoo!, Cloudera |
oracle 1.6.0_24 | Good | Cloudera |
oracle 1.6.0_26 | Good(2) | Hortonworks, Cloudera |
oracle 1.6.0_28 | Good | |
oracle 1.6.0_31 | Good(3, 4) | Cloudera, Hortonworks |
从该表可以看出,Hadoop 版本所依赖 JDK 环境,7 版本已经过测试,8 目前在官网无体现。所以还是选择 JDK7为好,而且是 JDK7 的中间版本,并不是最新版本。
总结
综上,建议安装:
JDK:Java SE Runtime Environment 7u45(当然其它 7版本 系列也可尝试,问题应该不大,下载地址:http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html)
Hadoop:2.7.1+(下载地址:https://archive.apache.org/dist/hadoop/common/)
HBase:1.x 系列(下载地址:http://archive.apache.org/dist/hbase/)