HBASE-15312 Update the dependences of pom for mini cluster in HBase Book (Liu Shaohui)

This commit is contained in:
stack 2016-02-24 09:31:10 -08:00
parent 30cec72f9a
commit 2a306437aa

View File

@ -268,37 +268,55 @@ Check the versions to be sure they are appropriate.
[source,xml] [source,xml]
---- ----
<properties>
<hbase.version>2.0.0-SNAPSHOT</hbase.version>
<hadoop.version>2.7.1</hadoop.version>
</properties>
<dependency> <dependencies>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
<version>${hbase.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
<version>${hbase.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-hadoop-compat</artifactId>
<version>${hbase.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId> <groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId> <artifactId>hadoop-common</artifactId>
<version>2.0.0</version> <version>${hadoop.version}</version>
<type>test-jar</type> <type>test-jar</type>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<dependency>
<groupId>org.apache.hbase</groupId> <groupId>org.apache.hbase</groupId>
<artifactId>hbase</artifactId> <artifactId>hbase-hadoop2-compat</artifactId>
<version>0.98.3</version> <version>${hbase.version}</version>
<type>test-jar</type> <type>test-jar</type>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<dependency>
<groupId>org.apache.hadoop</groupId> <groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId> <artifactId>hadoop-hdfs</artifactId>
<version>2.0.0</version> <version>${hadoop.version}</version>
<type>test-jar</type> <type>test-jar</type>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
---- ----
This code represents an integration test for the MyDAO insert shown in <<unit.tests,unit.tests>>. This code represents an integration test for the MyDAO insert shown in <<unit.tests,unit.tests>>.
@ -309,7 +327,8 @@ This code represents an integration test for the MyDAO insert shown in <<unit.te
public class MyHBaseIntegrationTest { public class MyHBaseIntegrationTest {
private static HBaseTestingUtility utility; private static HBaseTestingUtility utility;
byte[] CF = "CF".getBytes(); byte[] CF = "CF".getBytes();
byte[] QUALIFIER = "CQ-1".getBytes(); byte[] CQ1 = "CQ-1".getBytes();
byte[] CQ2 = "CQ-2".getBytes();
@Before @Before
public void setup() throws Exception { public void setup() throws Exception {
@ -319,8 +338,7 @@ public class MyHBaseIntegrationTest {
@Test @Test
public void testInsert() throws Exception { public void testInsert() throws Exception {
HTableInterface table = utility.createTable(Bytes.toBytes("MyTest"), HTableInterface table = utility.createTable(Bytes.toBytes("MyTest"), CF);
Bytes.toBytes("CF"));
HBaseTestObj obj = new HBaseTestObj(); HBaseTestObj obj = new HBaseTestObj();
obj.setRowKey("ROWKEY-1"); obj.setRowKey("ROWKEY-1");
obj.setData1("DATA-1"); obj.setData1("DATA-1");