Native data type storage


#1

I vaguely remember that I saw this somewhere. Is it possible to store a Map (Not a large Map) instead of Bins for a Key? I also remember that there is no size limit to it?

My usecase is to store a record with 30-40 key value pairs. The keys are more than 14 character limits.

Basically I would want to create a Map and do client.put(policy, map)

I might also write a UDF to filter and return only couple of keys from my map.


#2

Or does it have to be like (with the limit to 1MB as max size of the bin)

  Map<String, byte[]> map = new HashMap<>();
  map.put("thisisfourteencharacterlong", "value1".getBytes());
  map.put("key2", "value2".getBytes());
  map.put("3", "value3".getBytes());
  
  aerospikeClient.put(wp, key, new Bin("pid", map));

#3

Would appreciate any help with the above question.


#4

Not sure what your question is, but we do have a use case where we store deeply nested maps (4 levels deep) in one bin without any problem.

We also execute UDFs to retrieve only particular data out of this nested map.

So generally what you’re looking for should not be a problem, but maybe I’m missing your problem here.