The panko.storage.hbase.inmemory Module

This is a very crude version of “in-memory HBase”, which implements just enough functionality of HappyBase API to support testing of our driver.

class panko.storage.hbase.inmemory.MConnection

Bases: object

HappyBase.Connection mock.

create_table(n, families=None)
delete_table(name, use_prefix=True)
static open()
table(name)
class panko.storage.hbase.inmemory.MConnectionPool

Bases: object

connection()
class panko.storage.hbase.inmemory.MTable(name, families)

Bases: object

HappyBase.Table mock.

static ColumnPrefixFilter(args, rows)

This is filter for testing “in-memory HBase”.

This method is called from scan() when ‘ColumnPrefixFilter’ is found in the ‘filter’ argument.

Parameters
  • args – a list of filter arguments, contain prefix of column

  • rows – a dict of row prefixes for filtering

static QualifierFilter(args, rows)

This is filter for testing “in-memory HBase”.

This method is called from scan() when ‘QualifierFilter’ is found in the ‘filter’ argument

static RowFilter(args, rows)

This is filter for testing “in-memory HBase”.

This method is called from scan() when ‘RowFilter’ is found in the ‘filter’ argument.

Parameters
  • args – a list of filter arguments, it contains operator and sought string

  • rows – a dict of rows which are filtered

static SingleColumnValueFilter(args, rows)

This is filter for testing “in-memory HBase”.

This method is called from scan() when ‘SingleColumnValueFilter’ is found in the ‘filter’ argument.

delete(key)
put(key, data, ts=None)
row(key, columns=None)
rows(keys)
scan(filter=None, columns=None, row_start=None, row_stop=None, limit=None)