问答 写了个demo,kafka三个字段,往hbase里写时,这个id对应rowkey。怎么写rowkey的值呢

写了个demo,kafka三个字段,往hbase里写时,这个id对应rowkey。怎么写rowkey的值呢

   匿名用户    发布于 2023-08-31 17:47 最新回复 2023-08-31 17:49  来自于   群内解答  205  1

http://dtstack-static.oss-cn-hangzhou.aliyuncs.com/2021bbs/files_user166259/question/beca23d1165fd6444f6d2f6ff590d242..jpg

1条回答
群内解答
回复于 2023-08-31 17:49

 {
"job": {
"content": [
{
"reader": {
"table" : {
"tableName": "test_source"
},
"name": "hbase2reader",
"parameter": {
"hbaseConfig": {
"hbase.zookeeper.property.clientPort": "2181",
"hbase.cluster.distributed": "true",
"hbase.zookeeper.quorum": "localhost",
"zookeeper.znode.parent": "/hbase-unsecure"
},
"changeLog": "sb5",
"encoding": "utf-8",
"column": [
{
"name": "rowkey",
"type": "string"
},
{
"name": "info:_int_",
"type": "int"
},
{
"name": "info:_string_",
"type": "string"
},
{
"name": "detail:_double_",
"type": "double"
},
{
"name": "detail:_long_",
"type": "BIGINT"
},
{
"name": "detail:_boolean_",
"type": "boolean"
},
{
"name": "detail:_bigdecimal_",
"type": "decimal"
},
{
"name": "detail:_short_",
"type": "SMALLINT"
},
{
"name": "detail:_float_",
"type": "float"
},
{
"name": "detail:_timestamp_",
"type": "timestamp(3)"
},
{
"name": "detail:_bytes_",
"type": "bytes"
},
{
"name": "detail:_time_",
"type": "time"
}
],
"startRowkey": "",
"endRowkey": "",
"isBinaryRowkey": true
}
},
"writer": {
"table" : {
"tableName": "test_sink"
},
"name": "hbase2writer",
"parameter": {
"hbaseConfig": {
"hbase.zookeeper.property.clientPort": "2181",
"hbase.cluster.distributed": "true",
"hbase.zookeeper.quorum": "localhost",
"zookeeper.znode.parent": "/hbase-unsecure"
},
"nullMode" : "null",
"walFlag": false,
"writeBufferSize" : 1,
"changeLog": "tb1",
"rowkeyExpress" : "$(rowkey)",
"versionColumnValue" : "1",
"column": [
{
"name": "rowkey",
"type": "string"
},
{
"name": "info:_int_",
"type": "int"
},
{
"name": "info:_string_",
"type": "string"
},
{
"name": "detail:_double_",
"type": "double"
},
{
"name": "detail:_long_",
"type": "BIGINT"
},
{
"name": "detail:_boolean_",
"type": "boolean"
},
{
"name": "detail:_bigdecimal_",
"type": "decimal"
},
{
"name": "detail:_short_",
"type": "SMALLINT"
},
{
"name": "detail:_float_",
"type": "float"
},
{
"name": "detail:_timestamp_",
"type": "timestamp(3)"
},
{
"name": "detail:_bytes_",
"type": "bytes"
},
{
"name": "detail:_time_",
"type": "time"
}
]
}
}
}
],
"setting": {
"speed": {
"channel": 1,
"bytes": 0
},
"errorLimit": {
"record": 100
},
"restore": {
"maxRowNumForCheckpoint": 0,
"isRestore": false,
"isStream": false,
"restoreColumnName": "",
"restoreColumnIndex": 0
},
"log": {
"isLogger": false,
"level": "debug",
"path": "",
"pattern": ""
}
}
}
}

0 0
社区公告
  • 大数据领域最专业的产品&技术交流社区,专注于探讨与分享大数据领域有趣又火热的信息,专业又专注的数据人园地

最新活动更多
微信扫码获取数字化转型资料
钉钉扫码加入技术交流群