Ok,

Unfortunately I confirmed the same error you're getting:

  @Inject
  @Unit
  MindashDatastoreService md;

  @Test
  public void putEntitySizeOf9MBShouldWork() {
    Key key = KeyFactory.createKey("kind", 1);
    Entity entity = new Entity(key);
    /* generate ~9MB buffer */
    byte[] buffer = generateByteBuffer(9000000);
    Blob blob = new Blob(buffer);
    entity.setProperty("big", blob);
    Key result = null;
    try {
      result = md.put(entity);
    } catch (Exception e) {
      fail("failed put() with exception " + e);
    }
    assertTrue(result != null);
  }

java.lang.AssertionError: failed put() with exception
com.google.apphosting.api.ApiProxy$RequestTooLargeException: The
request to API call datastore_v3.Put() was too large.
        at org.junit.Assert.fail(Assert.java:91)
        at
com.mindash.datastore.impl.integration.MindashDatastoreServiceImplIntegrationTest.putEntitySizeOf9MBShouldWork(MindashDatastoreServiceImplIntegrationTest.java:
98)
        ...

This is discouraging. What do you think should be a good solution for
this?. If we provide a contract of "eventual consistency" perhaps we
could use Task Queues to get around the limitation. I'd be happy to
collaborate.


On May 20, 9:53 am, Tristan <[email protected]> wrote:
> I'm looking into it, give me a bit and I will get back to you soon.
>
> On May 19, 4:03 pm, Mouseclicker <[email protected]> wrote:
>
>
>
>
>
> > 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 
> > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> 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 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
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.

Reply via email to