How to run mapreduce under namespace? - google-app-engine

I want to run mapreduce to change datastore entity under namespace in google app engine with python.
How can I do that?

The appengine mapreduce supports namespace option. You'll need to check the version you installed to be sure. From the latest version, put the namespace parameter in the mapper param. https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/master/python/src/mapreduce/input_readers.py#L320

Related

DataNucleus JDO with Google Cloud Tools for Eclipse

I am using the relatively new Google Cloud Tools Plugin for Eclipse, replacing the Google Plugin for Eclipse. I have converted my App Engine project to the environment of the new plugin, but now the app stopped working.
I get the following error when requesting a servlet that uses a Google DataStore entry:
javax.jdo.JDOUserException: Persistent class \"Class
CLASSNAME does not seem to have been enhanced. You may want to rerun
the enhancer and check for errors in the output.\" has no table in the
database, but the operation requires it. Please check the specification
of the MetaData for this class.
The GPE (Google Plugin Eclipse) had some options for this: https://developers.google.com/eclipse/docs/appengine_orm and https://developers.google.com/eclipse/docs/appengine_datanucleus.
Unfortunately there are no settings for this in the new plugin. I tried to add the DataNucleus Plugin for Eclipse, but then I get the error: Error: Could not find or load main class org.datanucleus.enhancer.DataNucleusEnhancer, when it tries to enhance the classes.
I already tried this too: https://cloud.google.com/appengine/docs/standard/java/datastore/jdo/overview-dn2#Enhancing_Data_Classes, but I don't get how to use this with the new plugin.
I use all the latest versions of Google Cloud (App Engine SDK 1.9.50).
Any help is greatly appreciated!
The new Cloud Tools for Eclipse plugin does not support Datanucleus, the recommended way is to use the Datanucleus Maven plugin to do enhancing: http://www.datanucleus.org/products/datanucleus/jdo/enhancer.html#maven

How to Use JDO with Google App Engine Modules Java

I'm trying to use JDO for datastore, in GAE Java modules app.
I have created two dynamic web projects with GAE runtime. Created an EAR project, add the two dynamic web projects to EAR.
Then tried "run on server".
I got the following error.
org.datanucleus.exceptions.ClassNotPersistableException: The class "MyBeanClass" is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data/annotations for the class are not found.
I tried enabling the JPA facet also.
please help.
Thanks.
I solved the problem after lot of trail and errors.
I just wanted to post the solution so that it might help others.
Creating a Dynamic Web Project and enabling JPA didn't work for me.
I created a Dynamic web project, while creating selected, Google App engine with JPA. It solved the problem.
Thanks..!!

Using both Java and Python with the new "Module" feature on AppEngine?

Is it possible to create a Google AppEngine application using Java in one module and Python in another (or Go)?
It is possible to have modules with different languages. I have not tried it myself but it has been confirmed in the GAE google group when SDK 1.8.2 was first released.

How to auto-generate database schema using DataNucleus for Google Cloud SQL on localhost and AppEngine?

I'm migrating my webapp to Google AppEngine. I worked with Hibernate previously. Since AppEngine works with DataNucleus, which is new to me, I'm facing problems with generating database schema. How do I achieve this? In hibernate, I used to do it with the property hbm2ddl.auto in hibernate.cfg.xml.
When learning something new its normal to look at the documentation.

Export/import datastore from/to Google App Engine

I want to export the datastore that I have running in App Engine into my local "standalone" version of the application. Anyone know how I can do that?
I've been looking around in the App Engine dashboard but can't find it.
Check out the docs on uploading and downloading data.
Gobo-Tools is designed for such tasks
It seems that there is no separate doc for java version of this except that it is said to do with com.google.apphosting.utils.remoteapi.RemoteApiServlet in the doc Nick provided.
Tip: If you have a Java app, you can use the Python appcfg.py tool by installing the Java
version of the remote_api handler, which is included with the Java runtime environment.
The handler servlet class is com.google.apphosting.utils.remoteapi.RemoteApiServlet.
Here is some relevant code example for java version of this API usage GAE/J datastore backup

Resources