Loïc
unread,May 7, 2012, 9:55:54 AM5/7/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nessDB
Hello,
I would like to include NessDB in a computation software written in
Java that already use other Key-Value databases (Kyoto, Redis, HashMap
Java...).
I use Redis client Jedis to connect to NessDB server.
Keys are String (convert in byte[]) and Value are Object (convert in
byte[] with Google Protobuffer).
After some GET/SET operations, I got a ProtoBuff error because value
from GET cannot be deserialize by protobuf.
It seems that, with Jedis and NessDB, data are not well processed/
transfer or store.
I'have try with a simple example which put the byte[] built from
string "helloworld" instead of my data for every key.
In a SET:
jedis.set(key,"helloworld".getBytes());
In a GET:
byte[] value = jedis.get(key);
String printValue = value!=null ? new String(value) : null;
System.out.println("GET:"+new String(key) + " => " + printValue);
With this implementation, I have:
GET:1#14811020 => helloworld
GET:1#14c1102a => null
GET:1#17810021 => null
GET:1#110100a8 => helloworld
[...]
GET:1#171701ba => null
GET:1#171500aa => helloworldq[]
GET:1#4851122 => helloworld
GET:1#d5112a => null
GET:1#5501bb => null
[...]
GET:1#169501ab => helloworldu[]
GET:1#6d511a1 => null
GET:1#16d501bb => null
GET:1#10020 => helloworldu[]
[...]
([] is a special rectangle char)
I try to visualise the history of key: "1#171500aa".
The first part of my software makes read/write (in my "dummy" example:
if read = null then write data)
Second part is just Read. Data are not modify!
-----------READ/WRITE part------
GET:1#171500aa => null
SET:key 1#171500aa value helloworld
(My software won't update this key/value but makes a lot of other read/
write in other key/value.
-----------JUST READ part-------
GET:1#171500aa => helloworld
GET:1#171500aa => helloworld
GET:1#171500aa => helloworldu[]
GET:1#171500aa => helloworldu[]
GET:1#171500aa => helloworldt[]
[...]
GET:1#171500aa => helloworldq[]
GET:1#171500aa => helloworld
[...]
I don't understand why jedis/nessdb gives me "dirty" values. Sometimes
GET gives me good value, sometimes not.
Is there anyone here who try to use NessDB with Jedis?
Thanks!