Skip to content

Commit

Permalink
Updating HappyBase package docstring with more caveats.
Browse files Browse the repository at this point in the history
Just explaining more features which can't be supported by
the Cloud Bigtable API.
  • Loading branch information
dhermes committed Sep 19, 2015
1 parent 0624993 commit 8fa618f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 21 additions & 2 deletions gcloud_bigtable/happybase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
* :meth:`Table.counter_set() \
<gcloud_bigtable.happybase.table.Table.counter_set>` - method can't
be atomic, so we disable it
* The ``__version__`` value for the HappyBase package is :data`None`
* The ``__version__`` value for the HappyBase package is :data:`None`
In addition, the many of the constants from :mod:`.connection` are specific
In addition, many of the constants from :mod:`.connection` are specific
to HBase and are defined as :data:`None` in our module:
* ``COMPAT_MODES``
Expand Down Expand Up @@ -126,6 +126,25 @@
mutated row in the batch. This should not be noticeable since gRPC
uses HTTP/2. However, some of the requests may fail part way through and
the process of applying all mutations cannot be rolled back.
* :meth:`Table.scan() <gcloud_bigtable.happybase.table.Table.scan>` no longer
accepts the following arguments (which will result in a
:class:`ValueError <exceptions.ValueError>`):
* ``batch_size``
* ``scan_batching``
* ``sorted_columns``
* Using a HBase filter string in
:meth:`Table.scan() <gcloud_bigtable.happybase.table.Table.scan>` is
not possible with Cloud Bigtable and will result in a
:class:`TypeError <exceptions.TypeError>`. However, the method now accepts
:class:`.RowFilter` instances (and related classes).
* :meth:`.Batch.delete` (and hence
:meth:`Table.delete() <gcloud_bigtable.happybase.table.Table.delete>`)
will fail when either a row or column family delete is attempted with
a ``timestamp``. This is because the Cloud Bigtable API uses the
``DeleteFromFamily`` and ``DeleteFromRow`` mutations for these deletes, and
neither of these mutations support a timestamp.
"""

from gcloud_bigtable.happybase.batch import Batch
Expand Down
2 changes: 1 addition & 1 deletion gcloud_bigtable/happybase/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _get_column_pairs(columns, require_qualifier=False):
elif num_colons == 1:
column_pairs.append(column.split(':'))
else:
raise ValueError('')
raise ValueError('Column contains the : separator more than once')

return column_pairs

Expand Down

0 comments on commit 8fa618f

Please sign in to comment.