App Engine MapReduce 映射器通过了错误的模型类型
嘿,我正在关注此处的文档:Google MapReduce
class StationsBlobstoreHandler(webapp.RequestHandler):
''''''
def get(self):
mr_job = mapreduce_pipeline.MapPipeline(
'calculate_sha1_stations_logos',
'radioflag.admin.mapreduce.blobfixstations.station_avatar_mapper',
'mapreduce.input_readers.DatastoreEntityInputReader',
{'entity_kind': 'myproj.engine.db.model.StationAvatar'})
mr_job.start()
def station_avatar_mapper(station_avatar):
logging.info(type(station_avatar))
但是我的映射器被调用而不是 myproj.engine.db.model.StationAvatar。
我怎样才能在我的映射器中获得正确的模型。
PS:仅将 StationAvatar 传递给实体_kind 也不起作用
Hey I was following the documentation here: Google MapReduce
class StationsBlobstoreHandler(webapp.RequestHandler):
''''''
def get(self):
mr_job = mapreduce_pipeline.MapPipeline(
'calculate_sha1_stations_logos',
'radioflag.admin.mapreduce.blobfixstations.station_avatar_mapper',
'mapreduce.input_readers.DatastoreEntityInputReader',
{'entity_kind': 'myproj.engine.db.model.StationAvatar'})
mr_job.start()
def station_avatar_mapper(station_avatar):
logging.info(type(station_avatar))
But my mapper is called with instead of myproj.engine.db.model.StationAvatar.
How can i get the right models in my mapper.
PS: Passing just StationAvatar to entity_kind did not work as well
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,我发现我应该使用 DatastoreInputReader 而不是 DatastoreEntityInputReader。
对不起 :)
OK I have found that i should use DatastoreInputReader instead of DatastoreEntityInputReader.
Sorry :)