in Java how to determine if a POJO will exceed the size limit before saving it to Google Cloud Datastore?

14 views
Skip to first unread message

Gerardo

unread,
Apr 8, 2023, 7:52:09 PM4/8/23
to Google Cloud Datastore
Hi sorry I ask about this in here, but it looks like stackoverflow is not a place to get help anymore, rather it's just about getting reputation points.

Anyway, has someone came across this, can you give me some guideline on how to solve this:

I need to save different java objects as entities in Google Cloud Datastore, but I want to ensure that none of them exceed the size limit of 1,048,572 bytes. How can I determine the size a POJO will take as an Entity before saving it to Datastore to avoid a "com.google.datastore.v1.client.DatastoreException: entity is too big" Exception?
Reply all
Reply to author
Forward
0 new messages