in datahub/implement.py [0:0]
def put_records_by_shard(self, project_name, topic_name, shard_id, record_list):
if check_empty(project_name):
raise InvalidParameterException(ErrorMessage.PARAMETER_EMPTY % 'project_name')
if check_empty(topic_name):
raise InvalidParameterException(ErrorMessage.PARAMETER_EMPTY % 'topic_name')
if check_empty(shard_id):
raise InvalidParameterException(ErrorMessage.PARAMETER_EMPTY % 'shard_id')
if record_list is None or len(record_list) == 0:
raise InvalidParameterException("Record list is null or empty")
url = Path.SHARD % (project_name, topic_name, shard_id)
request_param = PutPBRecordsRequestParams(record_list)
self._rest_client.post(url, data=request_param.content(), headers=request_param.extra_headers(),
compress_format=self._compress_format)