Skip to content

Commit

Permalink
Change grpcio comment, update msg size constant name.
Browse files Browse the repository at this point in the history
  • Loading branch information
daspecster committed Dec 29, 2016
1 parent 7b9f08d commit 11092e6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions bigtable/google/cloud/bigtable/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/bigtable.data.readonly'
"""Scope for reading table data."""

_MAX_MSG_LENGTH = 100 * 1024 * 1024
"""Maximum row size that can be retrieved."""
_MAX_MSG_LENGTH_100MB = 100 * 1024 * 1024


def _make_data_stub(client):
Expand All @@ -79,11 +78,11 @@ def _make_data_stub(client):
:returns: A gRPC stub object.
"""
if client.emulator_host is None:
# NOTE: 'grpc.max_message_length' will be deprecated in the 1.1 release
# of grpcio in favor of 'grpc.max_receive_message_length' and
# 'grpc.max_send_message_length'.
max_msg_length = (('grpc.max_message_length', _MAX_MSG_LENGTH),
('grpc.max_receive_message_length', _MAX_MSG_LENGTH))
# NOTE: 'grpc.max_message_length' will no longer be recognized in
# grpcio 1.1 and later.
max_msg_length = (('grpc.max_message_length', _MAX_MSG_LENGTH_100MB),
('grpc.max_receive_message_length',
_MAX_MSG_LENGTH_100MB))
return make_secure_stub(client.credentials, client.user_agent,
bigtable_pb2.BigtableStub, DATA_API_HOST,
extra_options=max_msg_length)
Expand Down

0 comments on commit 11092e6

Please sign in to comment.