IBM流HBase集成
streamsx.hbase的Python项目详细描述
概述
提供访问HBase的功能。例如,连接到Hortonworks(HDP)。 这个包将com.ibm.streamsx.hbase工具包公开为python方法。
样品
一个简单的streams应用程序,扫描hbase表并打印 扫描的行:
from streamsx.topology.topology import * from streamsx.topology.schema import CommonSchema, StreamSchema from streamsx.topology.context import submit import streamsx.hbase as hbase topo = Topology('hbase_scan_sample') scanned_rows = hbase.scan(topo, table_name='sample', max_versions=1 , init_delay=2) scanned_rows.print() cfg = {} cfg[streamsx.topology.context.ConfigParams.SSL_VERIFY] = False submit ('DISTRIBUTED', topo, cfg)