全部产品

环境搭建

更新时间:2019-02-27 10:55:46

HBase Ganos API基于Ali-Hbase Client客户工具包与GeoTools工具包对数据库进行交互操作,因此需要在maven中配置pom.xml文件导入相关工具包,具体如下:

  1. <properties>
  2. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  3. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  4. <geomesa.version>2.1.0</geomesa.version>
  5. <scala.abi.version>2.11</scala.abi.version>
  6. <gt.version>18.0</gt.version>
  7. <hbase.version>1.1.2</hbase.version>
  8. <zookeeper.version>3.4.9</zookeeper.version>
  9. </properties>
  10. <dependencies>
  11. <dependency>
  12. <groupId>org.locationtech.geomesa</groupId>
  13. <artifactId>geomesa-hbase-datastore_2.11</artifactId>
  14. <version>2.0.2</version>
  15. </dependency>
  16. <dependency>
  17. <groupId>com.aliyun.hbase</groupId>
  18. <artifactId>alihbase-client</artifactId>
  19. <version>${hbase.version}</version>
  20. <exclusions>
  21. <exclusion>
  22. <artifactId>com.google.guava</artifactId>
  23. <groupId>guava</groupId>
  24. </exclusion>
  25. </exclusions>
  26. </dependency>
  27. <dependency>
  28. <groupId>com.aliyun.hbase</groupId>
  29. <artifactId>alihbase-server</artifactId>
  30. <version>${hbase.version}</version>
  31. </dependency>
  32. <dependency>
  33. <groupId>com.aliyun.hbase</groupId>
  34. <artifactId>alihbase-common</artifactId>
  35. <version>${hbase.version}</version>
  36. </dependency>
  37. <dependency>
  38. <groupId>com.aliyun.hbase</groupId>
  39. <artifactId>alihbase-protocol</artifactId>
  40. <version>${hbase.version}</version>
  41. </dependency>
  42. </dependencies>

进入命令行工具,定位到maven工程根目录,运行下面命令编译项目:

  1. mvn clean install

成功编译后会在target目录下生成编译好的class文件与jar包,证明环境搭建成功。