| 123456789101112131415161718192021222324252627282930 |
- # -*- coding:utf-8 -*-
- from dw_base.datax.datasources.data_source import DataSource
- # HBase Data Source
- DS_TYPE_HBASE = 'hbase'
- DS_HBASE_KEYS = [
- 'kerberos.enabled',
- 'kerberos.realm',
- 'kerberos.kdc',
- 'kerberos.krb5Conf',
- 'zookeeper.quorum',
- 'zookeeper.port'
- ]
- class HBaseDataSource(DataSource):
- def __init__(self, ds_file: str):
- super(HBaseDataSource, self).__init__(ds_file)
- self.source_type = DS_TYPE_HBASE
- self.keys = DS_HBASE_KEYS
- @staticmethod
- def generate_definition(conf: str) -> str:
- lines = [
- '[base]',
- 'conf = %s' % conf
- ]
- return '\n'.join(lines)
|