Skip to main content

HBase sink connector

The HBase sink connector pulls the messages from Pulsar topics and persists the messages to HBase tables

Configuration

The configuration of the HBase sink connector has the following properties.

Property

NameTypeDefaultRequiredDescription
hbaseConfigResourcesStringNonefalseHBase system configuration hbase-site.xml file.
zookeeperQuorumStringNonetrueHBase system configuration about hbase.zookeeper.quorum value.
zookeeperClientPortString2181falseHBase system configuration about hbase.zookeeper.property.clientPort value.
zookeeperZnodeParentString/hbasefalseHBase system configuration about zookeeper.znode.parent value.
tableNameNoneStringtrueHBase table, the value is namespace:tableName.
rowKeyNameStringNonetrueHBase table rowkey name.
familyNameStringNonetrueHBase table column family name.
qualifierNamesStringNonetrueHBase table column qualifier names.
batchTimeMsLong1000lfalseHBase table operation timeout in milliseconds.
batchSizeint200falseBatch size of updates made to the HBase table.

Example

Before using the HBase sink connector, you need to create a configuration file through one of the following methods.

  • JSON


    {
    "hbaseConfigResources": "hbase-site.xml",
    "zookeeperQuorum": "localhost",
    "zookeeperClientPort": "2181",
    "zookeeperZnodeParent": "/hbase",
    "tableName": "pulsar_hbase",
    "rowKeyName": "rowKey",
    "familyName": "info",
    "qualifierNames": [ 'name', 'address', 'age']
    }

  • YAML


    configs:
    hbaseConfigResources: "hbase-site.xml"
    zookeeperQuorum: "localhost"
    zookeeperClientPort: "2181"
    zookeeperZnodeParent: "/hbase"
    tableName: "pulsar_hbase"
    rowKeyName: "rowKey"
    familyName: "info"
    qualifierNames: [ 'name', 'address', 'age']