GAE数据存储管理员复制在MapReduce模型上失败以JSON转换

根据本文档,我试图使用数据存储管理控制台将我的应用的数据存储复制到另一个应用。 由于我的应用程序使用Java运行时,因此我按照说明安装了数据存储区管理Python示例。 我将应用程序设置为将其他应用程序服务器的ID列入白名单,并按照说明进行安装。 几个月前,我用同样的方法来复制数据存储,虽然这个过程没有完全顺利进行,但最终确实起作用。

数据存储区管理员复制操作创建的任务未完成。 在默认队列中有9个任务(每个我试图复制的实体类型都有一个)。 任务的方法/ URL是POST /_ah/mapreduce/kickoffjob_callback 。 他们不断尝试重新开展业务,但不断失败。 任务的标题都是这样的:

X-AppEngine-Current-Namespace   
content-type    application/x-www-form-urlencoded
Referer         https://ah-builtin-python-bundle-dot-mysourceappid.appspot.com/_ah/datastore_admin/copy.do
Content-Length  970
Host            ah-builtin-python-bundle-dot-mysourceappid.appspot.com
User-Agent      AppEngine-Google; (+http://code.google.com/appengine)

任务的上一次运行结果都是类似的:

Dispatched time (UTC)       2013/05/26 08:02:47
Seconds late                0.00
Seconds to process task     0.50
Last http response code     500
Reason to retry             App Error

在目标应用程序下,我收到的任何传入复制操作的唯一迹象是日志:

2013-05-26 01:55:37.798 /_ah/remote_api?rtok=66767762443
200 1832ms 0kb AppEngine-Google; (+http://code.google.com/appengine; appid: s~mysourceappid)
0.1.0.40 - - [26/May/2013:00:55:37 -0700] "GET /_ah/remote_api?rtok=66767762443 HTTP/1.1" 200 137 - "AppEngine-Google;
(+http://code.google.com/appengine; appid: s~mysourceappid)" "datastore-admin.mydestinationappid.appspot.com" ms=1833
cpu_ms=1120 cpm_usd=0.000015 loading_request=1 app_engine_release=1.8.0 instance=00c61b117c9beacd101ff92c542598f549f755cc
I 2013-05-26 01:55:37.797
This request caused a new process to be started for your application, and thus caused your application code to be loaded
for the first time. This request may thus take longer and use more CPU than a typical request for your application.

所以这些请求至少会导致一个应用程序实例被启动,但除此之外,没有任何事情发生,源应用程序正在获取500个服务器错误。

我已尝试在源数据存储和目标数据存储上启用和禁用写入。 我已经双倍,三倍和四倍检查了在Python数据存储区管理示例中注册了正确的应用程序ID,并将代码上传到了这两个应用程序服务器,尽管它仅在目标服务器上是必需的(它们每个都将对方的ID列入白名单)。 我尝试了HTTPS和HTTP网址。

ah-builtin-python-bundle-dot-mysourceappid.appspot.com/_ah/mapreduce/status没有提供任何相关信息,除此之外,任何任务都没有任何进展或活动。 如果我试图从这里放弃工作,他们也不会放弃。 为了停止作业,我必须直接从队列中删除任务。 然后,我必须手动清理遗留的实体,包括_AE_DatastoreAdmin_Operation实体,这会导致数据存储区管理员仍将副本作业显示为活动状态,同时还会留下一堆_GAE_MR_MapreduceControl,_GAE_MR_MapreduceState和_GAE_MR_ShardState实体。

出了什么问题? 我无法相信没有更多的相关日志数据或有关过程失败的信息。

更新:昨晚我一定累了,并没有想到在源应用程序ah-builtin-python-bundle实例版本下查看日志,因为这是数据存储管理操作发生的地方。 这是我到达的日志输出:

2013-05-27 00:49:11.967 /_ah/mapreduce/kickoffjob_callback 500 320ms 1kb AppEngine-Google; (+http://code.google.com/appengine)
0.1.0.2 - - [26/May/2013:23:49:11 -0700] "POST /_ah/mapreduce/kickoffjob_callback HTTP/1.1" 500 1608 "https://ah-builtin-
python-bundle-dot-mysourceappid.appspot.com/_ah/datastore_admin/copy.do" "AppEngine-Google;
(+http://code.google.com/appengine)" "ah-builtin-python-bundle-dot-mysourceappid.appspot.com" ms=320 cpu_ms=80
cpm_usd=0.000180 queue_name=default task_name=706762757133111420 app_engine_release=1.8.0
instance=00c61b117c5825670de2531f27693bdc2ffb71
E 2013-05-27 00:49:11.966
super(type, obj): obj must be an instance or subtype of type
Traceback (most recent call last):
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 716, in __call__
    handler.post(*groups)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/mapreduce/base_handler.py", line 83, in post
    self.handle()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/mapreduce/handlers.py", line 1087, in handle
    spec, input_readers, queue_name, self.base_path(), state)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/mapreduce/handlers.py", line 1159, in _schedule_shards
    output_writer=output_writer))
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/mapreduce/handlers.py", line 718, in _state_to_task
    params=tstate.to_dict(),
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/mapreduce/model.py", line 805, in to_dict
    "input_reader_state": self.input_reader.to_json_str(),
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/mapreduce/model.py", line 165, in to_json_str
    json = self.to_json()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/mapreduce/input_readers.py", line 2148, in to_json
    json_dict = super(DatastoreKeyInputReader, self).to_json()
TypeError: super(type, obj): obj must be an instance or subtype of type

由于输入读取器不是DatastoreKeyInputReader的子类型,因此尝试将MapReduce数据模型转换为JSON时,看起来复制任务崩溃。 这必须是自1.8.5版或1.7.5版以来的另一个版本中引入的错误,这是当前SDK版本,上次运行数据存储复制操作。


作为参考,这个问题已经解决并且很快就会出来。

https://code.google.com/p/googleappengine/issues/detail?id=9388

链接地址: http://www.djcxy.com/p/67463.html

上一篇: GAE datastore admin copy failing on MapReduce model to JSON conversion

下一篇: Blobstore Backup Strategy Google App Engine Python