'This is filter for testing "in-memory HBase".
This method is called from scan() when \'RowFilter\' is found in the
\'filter\' argument.
:param args: a list of filter arguments, it contains operator and
sought string
:param rows: a dict of rows which are filtered'

@staticmethod
def RowFilter(args, rows):

    op = args[0]
    value = args[1]
    if value.startswith('regexstring:'):
        value = value[len('regexstring:'):]
    r = {}
    for (row, data) in rows.items():
        try:
            g = re.search(value, row).group()
            if (op == '='):
                if (g == row):
                    r[row] = data
            else:
                raise ceilometer.NotImplementedError(("In-memory    RowFilter    doesn't    support    the    %s    operation    yet" % op))
        except AttributeError:
            pass
    return r
