def CreateTable(self, request, context): _status, _table_schema = Parser.parse_proto_TableSchema(request) if not _status.OK(): return status_pb2.Status(error_code=_status.code, reason=_status.message) logger.info('CreateTable {}'.format(_table_schema['table_name'])) _status = self._create_table(_table_schema) return status_pb2.Status(error_code=_status.code, reason=_status.message)
def CreateTable(self, request, context): _status, unpacks = Parser.parse_proto_TableSchema(request) if not _status.OK(): return status_pb2.Status(error_code=_status.code, reason=_status.message) _status, _table_schema = unpacks # if _status.error_code != 0: # logging.warning('[CreateTable] table schema error occurred: {}'.format(_status)) # return _status logger.info('CreateTable {}'.format(_table_schema['collection_name'])) _status = self._create_table(_table_schema) return status_pb2.Status(error_code=_status.code, reason=_status.message)