Using the HBase Delete Operator

Introduction

The TIBCO StreamBase® Delete Adapter for Apache HBase allows the system to delete rows from the HBase database. The adapter uses property values in the sbd.sbconf configuration file to set up the HBase connection. For details, see Configuration File Settings below. Multiple HBase adapters can share a single instance of the HBase connection by selecting the same HBase configuration setting.

The TIBCO StreamBase® Adapter for Apache HBase is implemented as a suite of five global Java operators, including the HBase Admin, Delete, Get, Put, and Scan operators.

This page describes the HBase Delete operator, which allows a StreamBase application to delete rows from a connected HBase database table. The operator uses property values in the project's server configuration file to set up the connection to the HBase database, as described in Configuration File Settings. Multiple HBase operators can share a single instance of an HBase connection by selecting the same HBase configuration setting ID.

Configuration File Settings

This section describes the configuration for an HBase database connection instance that you specify in your project's sbconf file. This configuration is the same for all HBase operator types.

HBase Operator Configuration

The <HBase.conf> element of a project's HOCON file, despite its name, is used to specify configuration value groups for either operators or adapters.

The HBase configuration section of the HOCON file starts with an <HBase.conf> element that contains one <HBase.conf name="hbase"> element. This element, in turn, contains one or more <setting> elements.

Each <section name="hbase"> element must contain one element in the form <setting id="HBaseConfigName"/>, where HBaseConfigName is the name you assign to a group of settings that uniquely define an individual HBase database connection. All other <setting> elements are optional.

The example configuration below shows a basic configuration to connect to an HBase server. You can have as many configurations as your application requires, but each configuration must have a unique id.

Example 1. Example <adapter-configuration> Section for HBase

name = "HBase.conf"
type = "com.tibco.ep.streambase.configuration.adapter"
version = "1.0.0"
configuration = {
          
// An adapter group type defines a collection of EventFlow adapter configurations,
// indexed by adapter type.
  AdapterGroup = {
          
// A collection of EventFlow adapter configurations, indexed by adapter type. 
// This object is required and must contain at least one configuration.
    adapters = {
          
// The root section for an EventFlow adapter configuration.
      hbase = {
          
// Section list. This array is optional and has no default value.
        sections = [
          
// A configuration for an EventFlow adapter named section.
            {
          
// Section name. The value does not have to be unique; that is, you can have multiple sections
// with the same name in the same array of sections. This property is required.
              name = "hbase"
          
// Section for setting adapter properties. All values must be strings. This object
// is optional and has no default value.
                settings = {
                  connectAtStartup = "true"
                  "hbase.client.retries.number" = "5"
                  "hbase.master" = "127.0.0.1:60000"
                  "hbase.zookeeper.property.clientPort" = "2181"
                  "hbase.zookeeper.quorum" = "127.0.0.1"
                  id = "HBase Demo"
                  "zookeeper.recovery.retry" = "5"
                  "zookeeper.session.timeout" = "5000"
            }
          }
        ]
      }
    }
  }
}


Configuration Settings

Setting Type Description
id string The value of the id setting displays in the drop-down list in the adapter's Properties view, and is used to uniquely identify this section of the configuration file.
connectAtStartup true or false If true, this operator instance connects to HBase on startup of this operator's containing module.
*** string All other values are directly sent to the HBaseConfiguration class, which is responsible for setting up a connection to the HBase server. See the Apache HBase documentation for the available client configuration options and for further information on setting up a connection to HBase.

Properties View Settings

This section describes the properties you can set for an HBase Delete operator, using the various tabs of the Properties view in StreamBase Studio.

General Tab

Name: Use this required field to specify or change the name of this instance of this component, which must be unique in the current EventFlow module. The name must contain only alphabetic characters, numbers, and underscores, and no hyphens or other special characters. The first character must be alphabetic or an underscore.

Operator: A read-only field that shows the formal name of the operator.

Class name: Shows the fully qualified class name that implements the functionality of this operator. If you need to reference this class name elsewhere in your application, you can right-click this field and select Copy from the context menu to place the full class name in the system clipboard.

Start options: This field provides a link to the Cluster Aware tab, where you configure the conditions under which this operator starts.

Enable Error Output Port: Select this check box to add an Error Port to this component. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports to learn about Error Ports.

Description: Optionally enter text to briefly describe the component's purpose and function. In the EventFlow Editor canvas, you can see the description by pressing Ctrl while the component's tooltip is displayed.

Operator Properties Tab

Property Type Description
HBase Configuration Edit Button Shortcut to the StreamBase Configuration File Editor, used for adapter configuration or converting an existing application's adapter-configurations.xml file to HOCON format.
HBase Config drop-down list The name of the HBase configuration to use with this operator. The value selected by this drop-down list determines the database connection this operator works against. The values that populate this list are stored in the project's adapter configuration file, as described in the Configuration File Settings section.
Table Name string The HBase table that this operation is to be performed against.
Row Id Field Name string The field in the inbound schema which represents the field which contains the Row Id to delete.
Enable Status Port check box If enabled, a status port is made available for this operator instance, which will emit status tuples for various events from this operator.
Log Level INFO Controls the level of verbosity the adapter uses to issue informational traces to the console. This setting is independent of the containing application's overall log level. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE.

Cluster Aware Tab

Use the settings in this tab to allow this operator or adapter to start and stop based on conditions that occur at runtime in a cluster with more than one node. During initial development of the fragment that contains this operator or adapter, and for maximum compatibility with TIBCO Streaming releases before 10.5.0, leave the Cluster start policy control in its default setting, Start with module.

Cluster awareness is an advanced topic that requires an understanding of StreamBase Runtime architecture features, including clusters, quorums, availability zones, and partitions. See Cluster Awareness Tab Settings on the Using Cluster Awareness page for instructions on configuring this tab.

Concurrency Tab

Use the Concurrency tab to specify parallel regions for this instance of this component, or multiplicity options, or both. The Concurrency tab settings are described in Concurrency Options, and dispatch styles are described in Dispatch Styles.

Caution

Concurrency settings are not suitable for every application, and using these settings requires a thorough analysis of your application. For details, see Execution Order and Concurrency, which includes important guidelines for using the concurrency options.