Not sure that I have understood your code correctly, but as expected I
get the same error:
com.google.apphosting.api.ApiProxy$RequestTooLargeException: The
request to API call datastore_v3.Put() was too large.
at com.google.appengine.tools.development.ApiProxyLocalImpl
$AsyncApiCall.call(ApiProxyLocalImpl.java:288)
at com.google.appengine.tools.development.ApiProxyLocalImpl
$AsyncApiCall.call(ApiProxyLocalImpl.java:264)
...
Here is my code (local unit test):
_ds = new
MindashDatastoreServiceImpl(_testUtil.getDatastoreService(), new
DatastoreHelperImpl());
@Test
public void testSimplePersist() {
int size = 10 * 1024 * 1000;
byte[] buf = new byte[size];
_generator.nextBytes(buf);
Key key = createEntity(buf);
byte[] buf2 = readEntity(key);
checkBuffersForEquality(buf, buf2);
}
private Key createEntity(byte[] buf) {
Entity ent = new Entity(MY_KIND);
Blob blob= new Blob(buf);
ent.setProperty(MY_PROP, blob);
Key key = _ds.put(ent);
return key;
}
private byte[] readEntity(Key key) {
Entity ent = null;
try {
ent = _ds.get(key);
} catch (EntityNotFoundException e) {
fail("Failed to read entity from key
(EntityNotFoundException)" + key);
} catch (EntityCorruptException e) {
fail("Failed to read entity from key
(EntityCorruptException)" + key);
}
Blob blob = (Blob) ent.getProperty(MY_PROP);
return blob.getBytes();
}
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.