google-cloud-datastore

How to update 400,000 GAE datastore entities in parallel?

倖福魔咒の 提交于 2019-12-06 12:10:16
I have 400,000 entities of a certain type, and I'd like to perform a simple operation on each of them (adding a property). I can't process them serially because it would take forever. I don't want to use the MapReduce library because it is complicated and overwhelming. Basically I'd like to create 100 tasks on the taskqueue, each task taking a segment of ~4,000 entities and performing this operation on each one. Hopefully this wouldn't take more than a few minutes to process all 400k entities, when all tasks are executing in parallel. However, I'm not sure how to use GAE queries to do this. My

Set an entity kind name different from a class name

丶灬走出姿态 提交于 2019-12-06 11:58:39
问题 Is there any way how to set a kind name different from a class name used in my Google App Engine? I am using Java and JDO to access a datastore. There a question about the similar issue in Python. It seems answered. Set a kind name independently of the model name (App Engine datastore) 回答1: Ooops... It was quite easy to achieve: @PersistenceCapable(table = "person") public class PersonEntity { // ... } 来源: https://stackoverflow.com/questions/7616158/set-an-entity-kind-name-different-from-a

How to fetch the latest data in GAE Python NDB

余生长醉 提交于 2019-12-06 11:38:43
问题 I am using GAE Python. I have two root entities: class X(ndb.Model): subject = ndb.StringProperty() grade = ndb.StringProperty() class Y(ndb.Model): identifier = ndb.StringProperty() name = ndb.StringProperty() school = ndb.StringProperty() year = ndb.StringProperty() result = ndb.StructuredProperty(X, repeated=True) Since google stores our data across several data centers, we might not get the most recent data when we do a query as shown below(in case some changes have been "put"): def post

Starting, Stopping, and Continuing the Google App Engine BulkLoader

萝らか妹 提交于 2019-12-06 11:30:08
问题 I have quite of bit of data that I will be uploading into Google App Engine. I want to use the bulkloader to help get it in there. However, I have so much data that I generally use up my CPU quota before it's done. Also, any other problem such a bad internet connection or random computer issue can stop the process. Is there any way to continue a bulkload from where you left off? Or to only bulkload data that has not been written to the datastore? I couldn't find anything in the docs, so I

Trying to store Utf-8 data in datastore getting UnicodeEncodeError

元气小坏坏 提交于 2019-12-06 09:01:07
问题 Trying to store utf-8 into datastore and getting error : Traceback (most recent call last): File "/sinfo/google_appengine/google/appengine/ext/webapp/__init__.py", line 511, in __call__ handler.get(*groups) File "/sinfo/siteinfo/siteinfo.py", line 1911, in get seoEntity.put() File "/sinfo/google_appengine/google/appengine/ext/db/__init__.py", line 833, in put return datastore.Put(self._entity, rpc=rpc) File "/sinfo/google_appengine/google/appengine/api/datastore.py", line 275, in Put req

How to use High Replication Datastore

跟風遠走 提交于 2019-12-06 08:31:58
问题 Okay, I have watched the video and read the articles in the App Engine documentation (including Using the High Replication Datastore). However I am still completely confused on the practical usage of it. I understand the benefits (from the video) and they sound great. But what I am lacking is a few practical examples. There are plenty of master/slave examples on the web, but very little illustrating (with proper documentation) the high replication datastore. The guestbook code example used in

GAE/J Low-level API: FetchOptions usage

泄露秘密 提交于 2019-12-06 08:13:41
What should I know about FetchOptions withLimit, prefetchSize and chunkSize? The docs say the following: prefetchSize is the number of results retrieved on the first call to the datastore. chunkSize determines the internal chunking strategy of the Iterator returned by PreparedQuery.asIterator(FetchOptions) ... prefetchSize and chunkSize have no impact on the result of the PreparedQuery, but rather only the performance of the PreparedQuery. I'm not too sure how to use that in anger. What are the performance implications of different options? Any examples of how changes you've made have improved

Appengine bulk downloader is not downloading list properties

狂风中的少年 提交于 2019-12-06 07:58:15
This is related to a previous question of mine , but with new information. I'm trying to configure the bulkdownloader to download data from my Java appengine app in such a way that a list of owned objects is transformed into a nested XML path inside each parent object. I have been using the export transform transform.child_node_from_list . However, the list property is never actually being downloaded and passed to that transform! This seems similar to the effect you get when looking at an entity in the appengine datastore viewer - the parent entity just doesn't show the list property at all.

GAE w/ Objectify - Can you query a HashMap?

[亡魂溺海] 提交于 2019-12-06 07:25:49
问题 In GAE, when using Objectify, can you query a HashMap? If so how would would you write it? ofy().load().type(MyClass.class).filter("hashMapfieldName", "keyQueryinggFor").list(); Does not seem to work where the hashMapfieldName is a HashMap<String, String> . I am looking to find entities where hashMapfieldName contains a certain key. 回答1: Just like embedded classes, Objectify converts Map<String, String> to the low-level EmbeddedEntity object, which is not indexible. However, if you @Index

Is there a nosql store that also allows for relationships between stored entities?

一个人想着一个人 提交于 2019-12-06 07:20:21
问题 I am looking for nosql key value stores that also provide for storing/maintaining relationships between stored entities. I know Google App Engine's datastore allows for owned and unowned relationships between entities. Does any of the popular nosql store's provide something similar? Even though most of them are schema less, are there methods to appropriate relationships onto a key value store? 回答1: It belongs to the core features of graph databases to provide support for relationships between