| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| self.assertEqual(partial_row_data.row_key, ROW_KEY) | ||
| cell = partial_row_data.cells[COLUMN_FAMILY_ID1] | ||
| column = cell[COL_NAME1] | ||
| self.assertIsNotNone(column[0].value) |
| :returns: A gRPC stub object. | ||
| """ | ||
| if client.emulator_host is None: | ||
| one_hundred_mb = 100 * 1024 * 1024 |
| :param host: The host for the service. | ||
|
|
||
| :type extra_options: tuple | ||
| :param extra_options: Extra gRPC options used when creating the channel. |
| self.assertEqual(partial_row_data.row_key, ROW_KEY) | ||
| cell = partial_row_data.cells[COLUMN_FAMILY_ID1] | ||
| column = cell[COL_NAME1] | ||
| self.assertIsNotNone(column[0].value) |
| row = self._table.row(ROW_KEY) | ||
| self.rows_to_delete.append(row) | ||
|
|
||
| data = '1' * 10 * 1024 * 1024 # 10MB of 1's. |
| cell4 = Cell(CELL_VAL4, timestamp4) | ||
| return cell1, cell2, cell3, cell4 | ||
|
|
||
| def test_read_large_row(self): |
| # 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', one_hundred_mb), |
| """ | ||
| if client.emulator_host is None: | ||
| one_hundred_mb = 100 * 1024 * 1024 | ||
| # NOTE: 'grpc.max_message_length' will be deprecated in the 1.1 release |
|
Added Nathaniel's feedback and updated the constant. |
Sorry, something went wrong.
| # 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)) |
|
Reformatted and squashed. |
Sorry, something went wrong.
There was a problem hiding this comment.
General comment: Are you planning to add a system test where two cells combined exceed 10MB but neither does individually?
Sorry, something went wrong.
| """Scope for reading table data.""" | ||
|
|
||
| # NOTE: 'grpc.max_message_length' will no longer be recognized in | ||
| # grpcio 1.1 and later. |
|
|
||
| with self.assertRaises(Exception): | ||
| partial_row_data = self._table.read_row(ROW_KEY) | ||
|
|
| row = self._table.row(ROW_KEY) | ||
| self.rows_to_delete.append(row) | ||
|
|
||
| data = '1' * 101 * 1024 * 1024 # 11MB of 1's. |
|
|
||
| data = '1' * 101 * 1024 * 1024 # 11MB of 1's. | ||
| row.set_cell(COLUMN_FAMILY_ID1, COL_NAME1, data) | ||
| with self.assertRaises(Exception): |
| self.rows_to_delete.append(row) | ||
|
|
||
| number_of_bytes = 10 * 1024 * 1024 | ||
| data = '1' * number_of_bytes # 10MB of 1's. |
|
@dhermes and @nathanielmanistaatgoogle If this looks good, I'll squash and merge. |
Sorry, something went wrong.
|
Squashed. |
Sorry, something went wrong.
| _MAX_MSG_LENGTH_100MB = 100 * 1024 * 1024 | ||
| _GRPC_MAX_LENGTH_OPTIONS = ( | ||
| ('grpc.max_message_length', _MAX_MSG_LENGTH_100MB), | ||
| ('grpc.max_receive_message_length', _MAX_MSG_LENGTH_100MB) |
| from google.cloud.bigtable.row_data import Cell | ||
| from google.cloud.bigtable.row_data import PartialRowData | ||
| from google.cloud.environment_vars import BIGTABLE_EMULATOR | ||
| from grpc._channel import _Rendezvous |
| cell = partial_row_data.cells[COLUMN_FAMILY_ID1] | ||
| column = cell[COL_NAME1] | ||
| value = column[0].value | ||
| self.assertIsNotNone(value) |
| row.set_cell(COLUMN_FAMILY_ID1, COL_NAME1, data) | ||
| row.commit() | ||
| row.set_cell(COLUMN_FAMILY_ID1, COL_NAME1, data) | ||
| row.commit() |
| row.commit() | ||
|
|
||
| with self.assertRaises(_Rendezvous): | ||
| self._table.read_row(ROW_KEY) |
| cell4 = Cell(CELL_VAL4, timestamp4) | ||
| return cell1, cell2, cell3, cell4 | ||
|
|
||
| def test_read_large_cell_limit(self): |
| with self.assertRaises(_Rendezvous): | ||
| row.commit() | ||
| self.assertEqual(len(column), 1) | ||
| self.assertEqual(len(column[0].value), number_of_bytes) |
|
Squashed. |
Sorry, something went wrong.
…receive-length Add max_message_length for larger rows.
| Back | FazBrowse Home | New Git URL |
Closes #2880
/cc @nathanielmanistaatgoogle @sduskis