diff --git a/google/cloud/bigtable/table.py b/google/cloud/bigtable/table.py index e3191a729..7429bd36f 100644 --- a/google/cloud/bigtable/table.py +++ b/google/cloud/bigtable/table.py @@ -533,7 +533,7 @@ def get_encryption_info(self): for cluster_id, value_pb in table_pb.cluster_states.items() } - def read_row(self, row_key, filter_=None): + def read_row(self, row_key, filter_=None, retry=DEFAULT_RETRY_READ_ROWS): """Read a single row from this table. For example: @@ -550,6 +550,14 @@ def read_row(self, row_key, filter_=None): :param filter_: (Optional) The filter to apply to the contents of the row. If unset, returns the entire row. + :type retry: :class:`~google.api_core.retry.Retry` + :param retry: + (Optional) Retry delay and deadline arguments. To override, the + default value :attr:`DEFAULT_RETRY_READ_ROWS` can be used and + modified with the :meth:`~google.api_core.retry.Retry.with_delay` + method or the :meth:`~google.api_core.retry.Retry.with_deadline` + method. + :rtype: :class:`.PartialRowData`, :data:`NoneType ` :returns: The contents of the row if any chunks were returned in the response, otherwise :data:`None`. @@ -558,7 +566,9 @@ def read_row(self, row_key, filter_=None): """ row_set = RowSet() row_set.add_row_key(row_key) - result_iter = iter(self.read_rows(filter_=filter_, row_set=row_set)) + result_iter = iter( + self.read_rows(filter_=filter_, row_set=row_set, retry=retry) + ) row = next(result_iter, None) if next(result_iter, None) is not None: raise ValueError("More than one row was returned.")