ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladislav Pyatkov <vldpyat...@gmail.com>
Subject Re: byte[] as a key in Ignite cache
Date Mon, 26 Dec 2016 08:00:00 GMT
Hi,

Your question does not almost clear for me.

>> I realize that strings do take double the space as compared to bytes in
java.

It is not always correct. How about none latin characters?
If you are able to pack string, of course it is good idea for reduce
consume memory.

About byte[] as key, I think you will have hash code issue. You should to
implement key which will by wrapper over byte array.

On Sun, Dec 25, 2016 at 4:39 PM, Oru <debasish.upadhyey@gmail.com> wrote:

> Hi There!
> I have a situation where I need to have a Java String as a key in a
> distributed Ignite Cache across multiple server nodes.
>
> I realize that strings do take double the space as compared to bytes in
> java.
>
> So it is possible or recommended to use a byte[] as a key in Ignite Cache?
>
> What's the expert advise on this?
>
> Thanks in advance
> Debasish
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/byte-as-a-key-in-Ignite-cache-tp9728.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Vladislav Pyatkov

Mime
View raw message