← All tasks
javaalibaba/canal #3126Not a task: already works

使用hbase-adapter同步抛`IllegalAccessError`异常

envgap__alibaba__canal-3126

01 / FAILURE SIGNATURE

As reported upstream

2020-10-29 15:03:00.428 [Thread-11] ERROR c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator Error sync but ACK!
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
bb1b6b98629685d5e578f74cf46f0615ae248bc7
Manifest
client-adapter/pom.xml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

alibaba/canal #3126 · read the original issue
- [x] I have searched the [issues](https://github.com/alibaba/canal/issues) of this repository and believe that this is not a duplicate.

- [x] I have checked the [FAQ](https://github.com/alibaba/canal/wiki/FAQ) of this repository and believe that this is not a duplicate.



### environment



* canal 1.1.5-snapshot

* mysql 5.7

* hbase hbase-1.2.0-cdh5.13.3



### Issue Description

使用hbase-adapter 时抛出异常



### Steps to reproduce

```yml

# 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 #tcp kafka rocketMQ rabbitMQ

  flatMessage: true

  zookeeperHosts:

  syncBatchSize: 100

  retries: 0

  timeout:

  accessKey:

  secretKey:

  consumerProperties:

    # canal tcp consumer

    canal.tcp.server.host: 127.0.0.1:11111

    canal.tcp.zookeeper.hosts:

    canal.tcp.batch.size: 500

    canal.tcp.username:

    canal.tcp.password:

    # kafka consumer

    kafka.bootstrap.servers: 127.0.0.1:9092

    kafka.enable.auto.commit: false

    kafka.auto.commit.interval.ms: 1000

    kafka.auto.offset.reset: latest

    kafka.request.timeout.ms: 40000

    kafka.session.timeout.ms: 30000

    kafka.isolation.level: read_committed

    kafka.max.poll.records: 1000

    # rocketMQ consumer

    rocketmq.namespace:

    rocketmq.namesrv.addr: 127.0.0.1:9876

    rocketmq.batch.size: 1000

    rocketmq.enable.message.trace: false

    rocketmq.customized.trace.topic:

    rocketmq.access.channel:

    rocketmq.subscribe.filter:

    # rabbitMQ consumer

    rabbitmq.host:

    rabbitmq.virtual.host:

    rabbitmq.username:

    rabbitmq.password:

    rabbitmq.resource.ownerId:



  canalAdapters:

  - instance: example # canal instance Name or mq topic name

    groups:

    - groupId: g1

      outerAdapters:

      - name: logger

      - name: hbase

        properties:

          hbase.zookeeper.quorum: 127.0.0.1

          hbase.zookeeper.property.clientPort: 2181

          zookeeper.znode.parent: /hbase

```



```yml

# hbase-adapter.yml

dataSourceKey: defaultDS            # 对应application.yml中的datasourceConfigs下的配置

destination: example                # 对应 canal destination/MQ topic 名称

groupId: g1

hbaseMapping:                       # mysql--HBase的单表映射配置

  mode: STRING                      # HBase中的存储类型, 默认统一存为String, 可选: #PHOENIX  #NATIVE   #STRING

  # NATIVE: 以java类型为主, PHOENIX: 将类型转换为Phoenix对应的类型

  database: retl                   # 数据库名/schema名

  table: xdual                     # 表名

  hbaseTable: canal_test           # HBase表名

  family: CF                        # 默认统一Column Family名称

  uppercaseQualifier: true          # 字段名转大写, 默认为true

  commitBatch: 3000                 # 批量提交的大小, ETL中用到

  rowKey: id                  # 复合字段rowKey不能和columns中的rowKey并存

```

当数据发生更改时,hbase-adapter 必定抛出异常

### Expected behaviour



### Actual behaviour





If there is an exception, please attach the exception trace:



```java

2020-10-29 15:03:00.428 [Thread-11] ERROR c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator Error sync but ACK!

```
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]