0

根據this documentation我試圖複製我的應用程序的數據存儲到另一個應用程序使用數據存儲管理控制檯。由於我的應用程序使用Java運行時,因此按照指示安裝了datastore admin Python sample。我將應用程序設置爲將其他應用程序服務器的ID列入白名單,並按照說明進行安裝。幾個月前,我用同樣的方法來複制數據存儲,雖然這個過程沒有完全順利進行,但最終確實起作用。GAE datastore管理員複製失敗MapReduce模型到JSON轉換

由數據存儲管理員複製操作創建的任務未完成。在默認隊列中有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實體。

什麼問題?我無法相信沒有更多的相關日誌數據或有關過程失敗的信息。

UPDATE: 我一定已經累昨晚沒想到在日誌中查找源應用程序啊,內置的Python-包實例的版本下,因爲這是發生在數據存儲管理操作的位置。這是日誌輸出我越來越有:

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 

看起來試圖MapReduce的數據模型轉換成JSON,因爲輸入讀者不是DatastoreKeyInputReader亞型的副本任務崩潰。這必須是自1.8.5版或1.7.5版以來的另一個版本中引入的錯誤,這是當前SDK版本,上次運行數據存儲複製操作。

+0

我[在GAE bug跟蹤報道這個問題(https://code.google.com/p/googleappengine/issues/detail?id=9388)。 –

回答