开发者社区> 问答> 正文

Sync HBase,Adapter启动日志无报错,logger模式可正常打印DML,但hbase模

环境信息

canal version 1.1.3 mysql version 5.7 hbase version 2.0.2

问题描述

application.yml内容

server: port: 8081 spring: jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8 default-property-inclusion: non_null

canal.conf: mode: tcp # kafka rocketMQ

canalServerHost: 172.25.159.17:11111

zookeeperHosts: master1.spark.data-hz.com:2181

mqServers: 127.0.0.1:9092 #or rocketmq

flatMessage: true

batchSize: 500 syncBatchSize: 1000 retries: 0 timeout: accessKey: secretKey: srcDataSources: defaultDS: url: jdbc:mysql://**************.mysql.rds.aliyuncs.com:3306/metrics?useUnicode=true username: *********** password: *********** canalAdapters: - instance: testbinlog # canal instance Name or mq topic name groups: - groupId: g1 outerAdapters:

- name: logger

- name: hbase
  properties:
    hbase.zookeeper.quorum: master1.spark.data-hz.com,master2.spark.data-hz.com
    hbase.zookeeper.property.clientPort: 2181
    zookeeper.znode.parent: /hbase-unsecure

mytest_person2.yml文件内容

dataSourceKey: defaultDS destination: testbinlog groupId: g1 hbaseMapping: mode: STRING #NATIVE #PHOENIX database: metrics # 数据库名 table: test_bin_log # 数据库表名 hbaseTable: METRICS:TESTBINLOG # HBase表名 family: CF # 默认统一Family名称 uppercaseQualifier: true # 字段名转大写, 默认为true commitBatch: 3000 # 批量提交的大小 #rowKey: id,type # 复合字段rowKey不能和columns中的rowKey重复 columns: # 数据库字段:HBase对应字段 id: ROWKEY name: CF:NAME

原提问者GitHub用户jinguangyu

展开
收起
数据大拿 2023-05-04 18:21:13 129 0
1 条回答
写回答
取消 提交回答
  • 将mytest_person2.yml文件中groupId: g1的g1删掉就OK了

    原回答者GitHub用户jinguangyu

    2023-05-05 10:50:46
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_赖思超_PostgreSQL10_hash索引的WAL日志修改版final 立即下载
Kubernetes下日志实时采集、存储与计算实践 立即下载
日志数据采集与分析对接 立即下载