This is what is stored in a test redis set.
HGETALL __hash__
It returns around 7000 key=>value pairs. (key is pincode, value is 1/0)
To set the same data in aerospike, I am using the LList LDT, but the key is only taking the first value, rejecting the others.
Is LList is a good choice for this.
raj
February 26, 2015, 10:53am
2
I am not able to under what you mean by rejecting… following works for me
aql> execute llist.add ('listbin', 'JSON{"key":560075, "R":0}') on test.demo where PK='1'
+-----+
| add |
+-----+
| 0 |
+-----+
1 row in set (0.001 secs)
aql> execute llist.add('listbin', 'JSON{"key":600001, "R":1}') on test.demo where PK='1'
+-----+
| add |
+-----+
| 0 |
+-----+
1 row in set (0.001 secs)
aql> execute llist.scan('listbin') on test.demo where PK='1'
+------------------------------------------------+
| scan |
+------------------------------------------------+
| [{"R":0, "key":560075}, {"R":1, "key":600001}] |
+------------------------------------------------+
1 row in set (0.000 secs)
Yes !! Llist is b+tree and is actually LSortedMap
HTH
– R
I am not taking about upating the aerospike record.That works well.
I want to know the equivalent in the LList LDT.
raj
February 26, 2015, 11:21am
4
llist.scan is the call corresponding to HMGETALL
– R
I did not explain my original question correctly
What I meant was this:
I do
HSET(HASH, KEY, VALUE)
If I change KEY and VALUE keeping HASH the same, then doing
HGETALL HASH
gives me an array of all key-value pairs that were entered earlier.
There are many such hashes.
What LDT should I choose to implement the same in aerospike.
Thanks
raj
February 26, 2015, 2:22pm
6
Well that is what the original example explained …
Keep changing the key but keep the same LLIST bin (llistbin ) and primary key (‘1’ ) same … and scan would get you all the records in the llistbin. You can many such records identified by primary key. In your example primary key is “hash” …
Llist is one you should use …
– R
1 Like
rbotzer
October 22, 2015, 11:31pm
8
FYI, LList has been upgraded, and its documentation and examples have been improved.