我使用Java调用Google Cloud来执行简单查询。我收到错误:
com.google.api.services.datastore.client.DatastoreException: Backend Error
at com.google.api.services.datastore.client.RemoteRpc.makeException(RemoteRpc.java:115)
at com.google.api.services.datastore.client.RemoteRpc.call(RemoteRpc.java:81)
at com.google.api.services.datastore.client.BaseDatastoreFactory$RemoteRpc.call(BaseDatastoreFactory.java:41)
at com.google.api.services.datastore.client.Datastore.runQuery(Datastore.java:109)
at com.test.mycode.main(mycode.java:538)
Caused by: com.google.api.client.http.HttpResponseException: 503 Service Unavailable
提出的要求非常简单。它以查询格式完成:
query {
kind {
name: "thedata"
}
filter {
property_filter {
property {
name: "mykey"
}
operator: EQUAL
value {
string_value: "somevalue"
}
}
}
}
只有两个问题: - 环境设置错误了吗? - 查询的语法不正确吗?它应该读取“种类”而不是“种类”吗?