IBM Streams HBASE integration
Project description
Overview
Provides functions to access files on HBASE. For example, connect to Hortonworks (HDP). This package exposes the com.ibm.streamsx.hbase toolkit as Python methods.
Sample
A simple hello world example of a Streams application writing string messages to a file to HBASE. Scan for created file on HBASE and read the content:
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('test_hbase_scan') if self.hbase_toolkit_location is not None: tk.add_toolkit(topo, self.hbase_toolkit_location) if (hbase.generate_hbase_site_xml(topo)): tester = Tester(topo) scanned_rows = hbase.scan(topo, table_name=_get_table_name(), max_versions=1 , init_delay=2) scanned_rows.print() tester.tuple_count(scanned_rows, 2, exact=False) cfg = {} job_config = streamsx.topology.context.JobConfig(tracing='info') job_config.add(cfg) cfg[streamsx.topology.context.ConfigParams.SSL_VERIFY] = False # Run the test tester.test(self.test_ctxtype, cfg, always_collect_logs=True) else: print("hbase_site_xml file doesn't exist")
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streamsx.hbase-1.0.0.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for streamsx.hbase-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca7fb925a83715decb02a5d59cb32560fb569410613409e11ae18844565b590a |
|
MD5 | 6b5d2452ef2cac1543c9484ea5074128 |
|
BLAKE2b-256 | e1e71b903eb60bd369f6ba55db6e1c0459b4c18ce896366f5193039fbcaca9bd |