Skip to content

API Docs - v4.0.0

Store

hbase (Store)

This extension assigns data sources and connection instructions to event tables. It also implements read-write operations on connected datasources.

Syntax

@Store(type="hbase", any.hbase.property="<STRING>", table.name="<STRING>", column.family="<STRING>")
@PrimaryKey("PRIMARY_KEY")
@Index("INDEX")

QUERY PARAMETERS

Name Description Default Value Possible Data Types Optional Dynamic
any.hbase.property Any property that can be specified for HBase connectivity in hbase-site.xml is also accepted by the HBase Store implementation. STRING No No
table.name The name with which the event table should be persisted in the store. If no name is specified via this parameter, the event table is persisted with the same name as the Siddhi table. The table name defined in the Siddhi Application query. STRING Yes No
column.family The number of characters that the values for fields of the STRING type in the table definition must contain. If this is not specified, the default number of characters specific to the database type is considered. 'wso2.sp' STRING Yes No

Examples EXAMPLE 1

define stream StockStream (symbol string, price float, volume long); @Store(type="hbase", table.name="StockTable", column.family="StockCF", hbase.zookeeper.quorum="localhost", hbase.zookeeper.property.clientPort="2181")define table StockTable (symbol string, price float, volume long);

This definition creates an event table named StockTable with a column family StockCF on the HBase instance if it does not already exist (with 3 attributes named symbol, price, and volume of the string, float and long types respectively). The connection is made as specified by the parameters configured for the '@Store' annotation. The symbol attribute is considered a unique field, and the values for this attribute are the HBase row IDs.