HBase Ganos API基于Ali-Hbase Client客户工具包与GeoTools工具包对数据库进行交互操作,本文介绍导入相关工具包的操作方法。
通过以下代码在Maven工程中配置pom.xml文件,导入相关的工具包。
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<geomesa.version>2.1.0</geomesa.version>
<scala.abi.version>2.11</scala.abi.version>
<gt.version>18.0</gt.version>
<hbase.version>1.1.2</hbase.version>
<zookeeper.version>3.4.9</zookeeper.version>
</properties>
<dependencies>
<dependency>
<groupId>org.locationtech.geomesa</groupId>
<artifactId>geomesa-hbase-datastore_2.11</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.aliyun.hbase</groupId>
<artifactId>alihbase-client</artifactId>
<version>${hbase.version}</version>
<exclusions>
<exclusion>
<artifactId>com.google.guava</artifactId>
<groupId>guava</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.aliyun.hbase</groupId>
<artifactId>alihbase-server</artifactId>
<version>${hbase.version}</version>
</dependency>
<dependency>
<groupId>com.aliyun.hbase</groupId>
<artifactId>alihbase-common</artifactId>
<version>${hbase.version}</version>
</dependency>
<dependency>
<groupId>com.aliyun.hbase</groupId>
<artifactId>alihbase-protocol</artifactId>
<version>${hbase.version}</version>
</dependency>
</dependencies>
进入命令行工具,定位到Maven工程根目录,运行下面命令编译项目。
mvn clean install
成功编译后在target目录下生成Class文件和Jar包,证明环境搭建成功。