Deploying HBase Remote Access Problem collection (Eclipse)

Source: Internet
Author: User

Implementing remote Access HBase, you can easily debug your code with Eclipse development tools.

In order to facilitate the management of various versions of JAR packages, the code is built with Maven

First, download and install maven and the M2eclipse plugin

Next, configure MAVEN's Pom.xml file to include the following dependencies

<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>1.0.0-cdh5.4.0</version>
</dependency>

and resource Acquisition configuration information

<repositories>
<repository>
<id>cloudera-releases</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

For a version of Java, you can use the following settings (this article uses more than 1.8 versions)

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

Next, build the Eclipse project with maven (Maven Eclipse:eclipse)

The following issues were identified in the deployment:

1. No FileSystem for Scheme:hdfs

Online from common practices:
I added the following to my core-site.xml and it worked:

<Property>   <Name>Fs.File.Impl</Name> <Value>Org.Apache.Hadoop.Fs.LocalFileSystem</Value> <Description>The FileSystem ForFile:URIs. </Description></Property><Property> <Name>Fs.Hdfs.Impl</Name> <value>org. Apache. Hadoop. Hdfs. Distributedfilesystem</value> Span class= "pun" ><description>the filesystem for Hdfs:< Span class= "PLN" > Uris.</description> </property>     
But after using it, we found that Org.apache.hadoop.hdfs reflection could not find the related class, so in Maven
Add the following dependencies:

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.6.0-cdh5.4.0</version>
</dependency>

2. Found that the Hbase-site.xml file has not been read, the following steps need to be taken:
Add Hbase-site.xml to eclipse, add a method, create a folder in Eclipse, peer with SRC, and then copy the Hbase-site.xml to Conf

Right-click the project, build path-----configuter Build path-------liberary----Add Class Forder, select Conf.

3. Add the domain name of each regionserver used in the hosts of the machine used by eclipse

Deploying HBase Remote Access Problem collection (Eclipse)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.