GAE documentation mentions that the max entity size is 1Mb. Since I'm storing a lot of data inside entities I'd like to know when I'm approaching this limit.
I'm aware of GAE/Pyhon method model_to_protobuf(..)
, but I can't find anything for Java.
I'm also aware that GAE uses protobuf internally to serialize entities, so I could do the same. But I'd like to avoid duplicate code as GAE is already doing this under the hood.
Is there a programmatic way to get entity size in Java, preferably before entity is actually stored?
It looks like this method should fit the bill for you:
public static EntityProto convertToPb(Entity entity)
and matches up with what you've found on the Python side.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With