File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 11# 项目介绍
22自定义的spring-boot的hbase starter,为hbase的query和更新等操作提供简易的api并集成spring-boot的auto configuration
3+ # 打包
4+ 修改相关的maven私服地址
5+ ``` shell
6+ gradle clean install uploadArchives
7+ ```
38# 使用方式
9+ ## 依赖
10+ ``` shell
11+ compile " jthink:spring-boot-starter-hbase:0.0.1"
12+ ```
413## 集成
514在spring-boot项目的application.properties文件中加入spring.data.hbase.quorum配置项,并赋予正确的值
615## 使用
716### query
8-
17+ 1 . 将上述配置项赋予正确的值
18+ 2 . dto定义
919``` java
1020public class PeopleDto {
1121
@@ -32,6 +42,7 @@ public class PeopleDto {
3242 }
3343}
3444```
45+ 3 . RowMapper定义
3546``` java
3647import com.jthink.skyeye.data.hbase.api.RowMapper ;
3748import org.apache.hadoop.hbase.client.Result ;
@@ -54,6 +65,7 @@ public class PeopleRowMapper implements RowMapper<PeopleDto> {
5465 }
5566}
5667```
68+ 4 . query操作
5769``` java
5870import com.jthink.skyeye.data.hbase.api.HbaseTemplate ;
5971import org.apache.hadoop.hbase.client.Scan ;
@@ -82,6 +94,8 @@ public class QueryService {
8294}
8395```
8496### update等
97+ 1 . 将上述配置项赋予正确的值
98+ 2 . update、delete、put操作
8599``` java
86100import com.jthink.skyeye.data.hbase.api.HbaseTemplate ;
87101import org.apache.hadoop.hbase.client.Delete ;
@@ -126,4 +140,4 @@ public class QueryService {
126140```
127141
128142### 其他
129- 不可以满足需求的可以使用hbaseTemplate暴露出来的getConnection()方法
143+ 不可以满足需求的可以使用hbaseTemplate暴露出来的getConnection()方法
You can’t perform that action at this time.
0 commit comments