Operator HBASEDelete
The HBASEDelete operator deletes an entry, an entire row, a columnFamily in a row, or a columnFamily, columnQualifier pair in a row from an HBase table. It can also optionally do a checkAndDelete operation.
The behavior of the operator depends on its parameters:
- To delete an entire row, specify only the row.
-
To delete a columnFamily, specify the row and the columnFamily. You can specify the columnFamily by using the staticColumnFamily or columnFamilyAttrName parameters.
-
To delete just a single entry, specify the row, columnFamily, and columnQualifier.You can specify the columnQualifier by using the staticColumnQualifer or columnQualiferAttrName parameters.
To support locking, you can perform a conditional delete operation in HBase. To use the conditional delete functionality in Streams, you must set checkAttrName. This parameter must specify the attribute in the input tuple that describes the check. If the check fails, the deletion does not occur.To distinguish between failed and successful delete operations, use the optional output port. If the delete operation succeeded, the attribute of the output tuple in successAttr is set to true. Otherwise, the attribute of the output tuple is false.
Behavior in a consistent region
The operator can be in a consistent region, but it cannot be the start of a consistent region.
When in a consistent region, the deleteAllVersions parameter must either be unspecified or set to true. The operator ensures at-least-once tuple processing, but it does not guarentee exactly-once tuple processing. Thus, if there is a reset, the same delete may be sent twice. However, unless another process is modifying the table, sending the same delete twice is no different than sending it once. At drain points, it flushes its internal buffer, and at resets, in clears its internal buffer.
Summary
- Ports
- This operator has 1 input port and 2 output ports.
- Windowing
- This operator does not accept any windowing configurations.
- Parameters
- This operator supports 14 parameters.
Required: rowAttrName
Optional: authKeytab, authPrincipal, batchSize, checkAttrName, columnFamilyAttrName, columnQualifierAttrName, deleteAllVersions, hbaseSite, staticColumnFamily, staticColumnQualifier, successAttr, tableName, tableNameAttribute
- Metrics
- This operator does not report any metrics.
Properties
- Implementation
- Java
- Ports (0)
-
Representation of tuple to delete
- Properties
-
- Optional: false
- ControlPort: false
- WindowingMode: NonWindowed
- WindowPunctuationInputMode: Oblivious
- Assignments
- Java operators do not support output assignments.
- Ports (0)
-
This port can only be used if checkAttrName is specified. When that attribute is specified, deletes are conditional on the state of the table, and so may either succeed or fail. This output port allows the SPL developer to determine whether the delete succeede or failed. For each input tuple, an output tuple is generated. The attribute named by successAttr is set to true when the delete succeded, and false otherwise. The other attributes are copied from the input tuple.
- Properties
-
- Optional: true
- WindowPunctuationOutputMode: Preserving
- Ports (1)
-
Optional port for error information. This port submits an error message and a tuple, when an error occurs while HBase actions.
- Properties
-
- Optional: true
- WindowPunctuationOutputMode: Preserving
Required: rowAttrName
Optional: authKeytab, authPrincipal, batchSize, checkAttrName, columnFamilyAttrName, columnQualifierAttrName, deleteAllVersions, hbaseSite, staticColumnFamily, staticColumnQualifier, successAttr, tableName, tableNameAttribute
- authKeytab
-
The authKeytab parameter specifies the kerberos keytab file that is created for the principal.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- authPrincipal
-
The authPrincipal parameter specifies the Kerberos principal, which is typically the principal that is created for HBase server
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- batchSize
-
Maximum number of Deletes to buffer before sending to HBase. Larger numbers are more efficient, but increase the risk of lost changes on operator crash. In a consistent region, a drain flushes the buffer to HBase.
- Properties
-
- Type: int32
- Cardinality: 1
- Optional: true
- checkAttrName
-
Name of the attribute specifying the tuple to check for before applying the Put or Delete. The type of the attribute is tuple with attributes columnFamily and columnQualifier, or a tuple with attributes columnFamily, columnQualifier, and value. In the first case, the Put or Delete will be allowed to proceed only when there is no entry for the row, columnFamily, columnQualifer combination. When the the type of the attribute given by checkAttrName contains an attribute value, the Put or Delete operation will only succeed when the entry specified the row, columnFamily, and columnQualifier has the given value.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- columnFamilyAttrName
-
Name of the attribute on the input tuple containing the columnFamily. Cannot be used with staticColumnFmily.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- columnQualifierAttrName
-
Name of the attribute on the input tuple containing the columnQualifier. Cannot be used with staticColumnQualifier.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- deleteAllVersions
-
Defaults to true. If true, delete all versions of a cell. If false, delete only the most recent.
- Properties
-
- Type: boolean
- Cardinality: 1
- Optional: true
- hbaseSite
-
The hbaseSite parameter specifies the path of hbase-site.xml file. This is the recommended way to specify the HBASE configuration. If not specified, then HBASE_HOME must be set when the operator runs, and it will use $HBASE_SITE/conf/hbase-site.xml
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- rowAttrName
-
Name of the attribute on the input tuple containing the row. It is required.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: false
- staticColumnFamily
-
If this parameter is specified, it will be used as the columnFamily for all operations. (Compare to columnFamilyAttrName.) For HBASEScan, it can have cardinality greater than one.
- staticColumnQualifier
-
If this parameter is specified, it will be used as the columnQualifier for all tuples. HBASEScan allows it to be specified multiple times.
- successAttr
-
Attribute on the output port to be set to true if the check passes and the action is successful
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- tableName
-
Name of the HBASE table. It is an optional parameter but one of these parameters must be set in opeartor: 'tableName' or 'tableNameAttribute'. Cannot be used with 'tableNameAttribute'. If the table does not exist, the operator will throw an exception
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- tableNameAttribute
-
Name of the attribute on the input tuple containing the tableName. Use this parameter to pass the table name to the operator via input port. Cannot be used with parameter 'tableName'. This is suitable for tables with the same schema.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- ExpressionMode: Attribute
- Operator class library