Skip to content

HBase11x SQL Writer

HBase11x SQL Writer plugin implements writing data to HBase 1.x via Phoenix SQL interface.

Configuration Example

This plugin is used to write data to HBase 1.x via Phoenix. This plugin is based on RDBMS Writer, so you can refer to all configuration items of RDBMS Writer.

json
{
  "job": {
    "content": {
      "reader": {
        "name": "txtfilereader",
        "parameter": {
          "path": "/tmp/normal.txt",
          "charset": "UTF-8",
          "column": [
            {
              "index": 0,
              "type": "String"
            },
            {
              "index": 1,
              "type": "string"
            },
            {
              "index": 2,
              "type": "string"
            },
            {
              "index": 3,
              "type": "string"
            }
          ],
          "fieldDelimiter": ","
        }
      },
      "writer": {
        "name": "hbase11xsqlwriter",
        "parameter": {
          "batchSize": "256",
          "column": [
            "UID",
            "TS",
            "EVENTID",
            "CONTENT"
          ],
          "haveKerberos": "true",
          "kerberosPrincipal": "hive@EXAMPLE.COM",
          "kerberosKeytabFilePath": "/tmp/hive.headless.keytab",
          "hbaseConfig": {
            "hbase.zookeeper.quorum": "node1,node2,node3:2181",
            "zookeeper.znode.parent": "/hbase-secure"
          },
          "nullMode": "skip",
          "table": "TEST_TBL"
        }
      }
    },
    "setting": {
      "speed": {
        "channel": 5,
        "bytes": -1
      }
    }
  }
}