Skip to content

Commit a33da4e

Browse files
author
dapeng
committed
hbase结果表文档更新
1 parent c5859aa commit a33da4e

File tree

1 file changed

+42
-10
lines changed

1 file changed

+42
-10
lines changed

docs/plugin/hbaseSink.md

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,51 @@ hbase2.0
4141

4242
## 5.样例:
4343
```
44-
CREATE TABLE MyResult(
45-
cf:info VARCHAR,
46-
cf:name VARCHAR,
47-
cf:channel varchar
44+
CREATE TABLE MyTable(
45+
name varchar,
46+
channel varchar,
47+
age int
4848
)WITH(
49-
type ='hbase',
50-
zookeeperQuorum ='xx:2181',
51-
zookeeperParent ='/hbase',
52-
tableName ='workerinfo01',
53-
rowKey ='channel'
49+
type ='kafka10',
50+
bootstrapServers ='172.16.8.107:9092',
51+
zookeeperQuorum ='172.16.8.107:2181/kafka',
52+
offsetReset ='latest',
53+
topic ='mqTest01',
54+
timezone='Asia/Shanghai',
55+
updateMode ='append',
56+
enableKeyPartitions ='false',
57+
topicIsPattern ='false',
58+
parallelism ='1'
59+
);
60+
61+
CREATE TABLE MyResult(
62+
cf:name varchar ,
63+
cf:channel varchar
64+
)WITH(
65+
type ='hbase',
66+
zookeeperQuorum ='172.16.10.104:2181,172.16.10.224:2181,172.16.10.252:2181',
67+
zookeeperParent ='/hbase',
68+
tableName ='myresult',
69+
partitionedJoin ='false',
70+
parallelism ='1',
71+
rowKey='name,channel'
5472
);
73+
74+
insert
75+
into
76+
MyResult
77+
select
78+
channel,
79+
name
80+
from
81+
MyTable a
5582
```
5683

5784
## 6.hbase数据
5885
### 数据内容说明
59-
### 数据内容示例
86+
hbase的rowkey 构建规则:以描述的rowkey字段值作为key,多个字段以'-'连接
87+
### 数据内容示例
88+
hbase(main):007:0> scan 'myresult'
89+
ROW COLUMN+CELL
90+
roc-daishu column=cf:channel, timestamp=1589183971724, value=daishu
91+
roc-daishu column=cf:name, timestamp=1589183971724, value=roc

0 commit comments

Comments
 (0)