Skip to main content

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


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 details)

Uploaded Source

Built Distribution

streamsx.hbase-1.0.0-py2.py3-none-any.whl (12.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file streamsx.hbase-1.0.0.tar.gz.

File metadata

  • Download URL: streamsx.hbase-1.0.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for streamsx.hbase-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bb8b2b216fcd85497957b491c7f892363d7fe093c2a5f23e1e1ecaf7c41e8e55
MD5 c4492cc31720709a05db47ff94c90f64
BLAKE2b-256 e9cdf362ce1a9d46d73ec3b7c015bdda53a04b97fec6f92267225a3402af4d5b

See more details on using hashes here.

File details

Details for the file streamsx.hbase-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for streamsx.hbase-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ca7fb925a83715decb02a5d59cb32560fb569410613409e11ae18844565b590a
MD5 6b5d2452ef2cac1543c9484ea5074128
BLAKE2b-256 e1e71b903eb60bd369f6ba55db6e1c0459b4c18ce896366f5193039fbcaca9bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page