google-cloud-datastore

What exactly is the throughput restriction on an entity group in Google App Engine's datastore?

只谈情不闲聊 提交于 2019-12-08 16:14:18
问题 The documentation describes a limitation on the throughput to an entity group in the datastore, but is vague on what exactly the limitation is. My confusion is in two parts: 1. What is being restricted? Specifically, is it: The number of writes? Number of transactions that write to the datastore? Number of transactions regardless of whether it reads or writes to the datastore? 2. What is the type of the restriction? Specifically, is it: An artificially enforced one-per-second hard rule? An

Google Datastore Silently Failing in Production (node.js)

非 Y 不嫁゛ 提交于 2019-12-08 12:54:25
问题 As part of a larger web app, I'm using a combination of Google Datastore and Firebase. On my local machine, all requests go through seamlessly, however when I deploy my app to the GAE (using node.js - Flexible Environment) everything works except the calls to the datastore. The requests do not throw an error, directly or via promise and just never return, hanging the process. My current configuration is set up to use a Service Account key file containing my private key. Ive checked that it

App Engine Datastore: How to set multiple values on a property using golang?

妖精的绣舞 提交于 2019-12-08 10:45:27
问题 I am trying to save multiple values for a single property in Google's Datastore using Golang. I have a slice of int64 that I would like to be able to store and retrieve. From the documentation I can see that there is support for this by implementing the PropertyLoadSaver{} interface. But I cannot seem to come up with a correct implementation. Essentially, this is what I'd like to accomplish: type Post struct { Title string UpVotes []int64 `json:"-" xml:"-" datastore:",multiple"` DownVotes [

DeadlineExceededError: The overall deadline for responding to the HTTP request was exceeded

我是研究僧i 提交于 2019-12-08 10:21:32
问题 I have a cron job which calls vendor api to fetch the companies list. Once the data is fetched, we are storing that data into cloud datastore as shown in the below code . For some reason for last two days when i trigger the cron job , started seeing the errors. When i debug the code locally i dont see this error company_list = cron.rest_client.load(config, "companies", '') if not company_list: logging.info("Company list is empty") return "Ok" for row in company_list: company_repository.save

How do I register API environment for Datastore in GAE Flexible Environment?

纵然是瞬间 提交于 2019-12-08 09:50:44
问题 When trying to run Datastore in a Servlet in Google App Engine Flexible Environment I get "No API environment is registered for this thread." (Details below.) I see questions on StackOverflow about this happening in local machines or unit tests, but this is happening in GAE in a regular Servlet. Here is the entirety of my Datastore code, a simple query. Do I need to register an API environment? If so, how? List<String> kinds = new ArrayList<String>(); DatastoreService datastore =

cannot fetch image data in gwt google datastore - image is strected out

点点圈 提交于 2019-12-08 09:37:39
问题 I have a class in which I have decrlared a serialized class to store image data @Persistent(serialized = "true") private DownloadableFile imageLogoFile; Implementation of the class public class DownloadableFile implements Serializable { public DownloadableFile(byte[] content, String filename, String mimeType) { super(); this.content = content; this.filename = filename; this.mimeType = mimeType; } private static final long serialVersionUID = -8497358622042084708L; private byte[] content;

Datastore export logic in Java

守給你的承諾、 提交于 2019-12-08 09:12:17
问题 Thankfully, Google announced the export logic from cloud Datastore. I would like to set up schedule-export in my platform. However, it's not Python, but Java. So I need to use cron.xml and Java logic to design this logic. Is there any reference to design Datastore export logic (cloud_datastore_admin.py) in Java? Especially, I need to transform this part in Java app = webapp2.WSGIApplication( [ ('/cloud-datastore-export', Export), ], debug=True) https://cloud.google.com/datastore/docs/schedule

How to set namespace in appengine using go lang?

流过昼夜 提交于 2019-12-08 09:06:35
问题 I am able to insert the entities with default namespace but I need to achieve multitenancy. Below is the code i am using to insert the entities and get the entities,but I need to assign namespaces for each entity.So i have followed below link but i am unable to set namespace please help me to fix https://cloud.google.com/appengine/docs/standard/go/multitenancy/multitenancy I found that there are two packages 1."cloud.google.com/go/datastore" - By using this package i am able to insert the

Kindless Queries in App Engine Go

微笑、不失礼 提交于 2019-12-08 08:28:27
问题 In Python it's q = db.Query() q.ancestor(ancestor_key) I tried: q := datastore.NewQuery("") q.Ancestor(ancestor_key) I get the error "datastore: empty kind" when running GetAll I also tried: q := &datastore.Query{} q.Ancestor(ancestor_key) I get the error "datastore: empty query kind" Thanks in advance for any help with this matter. 回答1: func NewQuery func NewQuery(kind string) *Query NewQuery creates a new Query for a specific entity kind. The kind must be non-empty. In your code, q :=

How do I prevent application calling datastore_v3.next() when calling get_multi?

≡放荡痞女 提交于 2019-12-08 08:17:42
问题 I'm running a keys_only query, which fetches 20 results. result_keys, cursor, more = ActivityIndex.query(cls.followers == key)\ .order(-cls.date_created)\ .fetch_page(num_results, start_cursor = cursor, keys_only=True) I then get the parents of the activityIndex objects: keys = [] for k in result_keys: for pair in k.parent().pairs(): keys.append(ndb.Key(pairs=[pair])) activities_related = ndb.get_multi(keys) I thought this would be quick, because I was getting a batch of objects by key.