class documentation

class Batch:

View In Hierarchy

The batch interface provided for a hbspark.table.Table.
Method __init__ Creates a new batch processor for a hbspark.table.Table instance.
Method delete Load a new delete operation into the batch.
Method put Load a new put operation into the batch.
Method send Send all of the pending changes loaded into the batch process.
Instance Variable _hb_batch The corresponding Happybase batch processesor.
def __init__(self, hb_batch):

Creates a new batch processor for a hbspark.table.Table instance.

Should only be initialized through hbspark.table.Table.batch and not called by the user separately.

Parameters
hb_batch:happybase.BatchThe happybase batch link that allows batch operations on the current table.
Returns
hbspark.table.Table.BatchA new instance of the batch processor.
def delete(self, rowkey, column=None, wal=None):

Load a new delete operation into the batch.

The column payload should have the following structure:

    column = ["cf_x:col_x", ...]
Parameters
rowkey:stringThe rowkey targeting the row to be deleted.
column:listThe list of column names to be deleted.
wal:boolWhether or not to insert into the WAL for HBase.
Returns
NoneMethod does not return.
def put(self, rowkey, data, wal=None):

Load a new put operation into the batch.

The data payload should have the following structure:

    data = {
        "cf_x:col_x" : "value",
        ...
    }
Parameters
rowkey:stringThe rowkey for the new inserted row.
data:dictThe dictionary mapping cf:col to values to be stored.
wal:boolWhether or not to write to the WAL of HBase.
Returns
NoneMethod does not return.
def send(self):
Send all of the pending changes loaded into the batch process.
Returns
NoneMethod does not return.
_hb_batch =
The corresponding Happybase batch processesor.