There is no such artifact with the groupId & artifactId org.apache.hbase:hbase for Apache HBase. I assume would be the same for CDH.

You need the test jar from hbase-server if you want the HBaseTestingUtility class.

On 1/5/18 10:23 AM, Debraj Manna wrote:
Cross posting from


    - stackoverflow
    
<https://stackoverflow.com/questions/48114833/not-able-to-use-hbasetestingutility-with-cdh-5-7>
    - cloudera forum
    
<http://community.cloudera.com/t5/Batch-Processing-and-Workflow/Not-able-to-use-HBaseTestingUtility-with-CDH-5-7/m-p/63344#M3466>


I am trying to use HBaseTestingUtility with CDH 5.7 as mentioned in the
below blog and github

    -
    
http://blog.cloudera.com/blog/2013/09/how-to-test-hbase-applications-using-popular-tools/
    - https://github.com/sitaula/HBaseTest

I have modified my pom.xml for CDH 5.7 like below

<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
     <modelVersion>4.0.0</modelVersion>
     <groupId>HBaseTest</groupId>
     <artifactId>Test</artifactId>
     <version>0.0.1-SNAPSHOT</version>
     <name>Test Project</name>
     <repositories>
         <repository>
             <id>cloudera</id>
             
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
         </repository>
     </repositories>
     <properties>
         <hadoop.version>2.6.0-cdh5.7.1</hadoop.version>
         <hbase.version>1.2.0-cdh5.7.0</hbase.version>
     </properties>
     <dependencies>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-core</artifactId>
             <version>2.6.0-mr1-cdh5.7.0.2</version>
         </dependency>
         <dependency>
             <groupId>org.apache.hbase</groupId>
             <artifactId>hbase</artifactId>
             <version>${hbase.version}</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.11</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-common</artifactId>
             <version>${hadoop.version}</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-all</artifactId>
             <version>1.9.5</version>
         </dependency>
         <dependency>
             <groupId>org.apache.mrunit</groupId>
             <artifactId>mrunit</artifactId>
             <version>0.9.0-incubating</version>
             <classifier>hadoop2</classifier>
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-common</artifactId>
             <version>${hadoop.version}</version>
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.hbase</groupId>
             <artifactId>hbase</artifactId>
             <version>${hbase.version}</version>
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-hdfs</artifactId>
             <version>${hadoop.version}</version>
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-hdfs</artifactId>
             <version>${hadoop.version}</version>
             <scope>test</scope>
         </dependency>
     </dependencies></project>

But on trying to do mvn clean install it is failing with the below error

[ERROR] Failed to execute goal on project Test: Could not resolve
dependencies for project HBaseTest:Test:jar:0.0.1-SNAPSHOT: The
following artifacts could not be resolved:
org.apache.hbase:hbase:jar:1.2.0-cdh5.7.0,
org.apache.hbase:hbase:jar:tests:1.2.0-cdh5.7.0: Failure to find
org.apache.hbase:hbase:jar:1.2.0-cdh5.7.0

Can someone let me know what is going wrong?

Reply via email to