You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by Alparslan Avcı <al...@agmlab.com> on 2014/01/16 15:08:19 UTC

About Putting Same Value to Same Key

Hi all,

I've noticed that (in trunk) when we set the same value to the same key 
in any avro-generated object's map field, it removes the key from the 
map. For example; after running this code piece,

    WebPage webPage = dataStore.newPersistent();
    webPage.putToOutlinks(new Utf8("anchor0"), new Utf8("url0"));
    webPage.putToOutlinks(new Utf8("anchor0"), new Utf8("url0"));
    webPage.putToOutlinks(new Utf8("anchor2"), new Utf8("url2"));
    dataStore.put(webPage.getUrl().toString(), webPage);
    dataStore.flush();


it only stores {"anchor2", "url2"} pair.

Is it an intended coding? If it is not, I will upload a bug-fix about 
this issue.

Re: About Putting Same Value to Same Key

Posted by Renato Marroquín Mogrovejo <re...@gmail.com>.
Awesome Alparslan!
I will review it! Thanks!


Renato M.


2014/1/16 Alparslan Avcı <al...@agmlab.com>

> Opened GORA-290 about this issue.
>
> Regards,
> Alparslan Avcı
>
>
> On 16-01-2014 16:51, Alparslan Avcı wrote:
>
>> Hi Renato,
>>
>> I'm using Hbase as backend; however this is about gora-core, a bug in
>> StatefulHashMap.
>>
>> I will open an issue and upload a patch as soon as possible.
>>
>> Thanks,
>> Alparslan Avcı
>>
>> On 16-01-2014 16:42, Renato Marroquín Mogrovejo wrote:
>>
>>> Hi there,
>>>
>>> Yeah this for sure looks like a bug.
>>> Could you tell us which back end you are using please?
>>> Thanks!
>>>
>>> Renato M.
>>> On Jan 16, 2014 9:08 AM, "Alparslan Avcı" <al...@agmlab.com>
>>> wrote:
>>>
>>>  Hi all,
>>>>
>>>> I've noticed that (in trunk) when we set the same value to the same key
>>>> in
>>>> any avro-generated object's map field, it removes the key from the map.
>>>> For
>>>> example; after running this code piece,
>>>>
>>>>     WebPage webPage = dataStore.newPersistent();
>>>>     webPage.putToOutlinks(new Utf8("anchor0"), new Utf8("url0"));
>>>>     webPage.putToOutlinks(new Utf8("anchor0"), new Utf8("url0"));
>>>>     webPage.putToOutlinks(new Utf8("anchor2"), new Utf8("url2"));
>>>>     dataStore.put(webPage.getUrl().toString(), webPage);
>>>>     dataStore.flush();
>>>>
>>>>
>>>> it only stores {"anchor2", "url2"} pair.
>>>>
>>>> Is it an intended coding? If it is not, I will upload a bug-fix about
>>>> this
>>>> issue.
>>>>
>>>>
>>
>

Re: About Putting Same Value to Same Key

Posted by Alparslan Avcı <al...@agmlab.com>.
Opened GORA-290 about this issue.

Regards,
Alparslan Avcı

On 16-01-2014 16:51, Alparslan Avcı wrote:
> Hi Renato,
>
> I'm using Hbase as backend; however this is about gora-core, a bug in 
> StatefulHashMap.
>
> I will open an issue and upload a patch as soon as possible.
>
> Thanks,
> Alparslan Avcı
>
> On 16-01-2014 16:42, Renato Marroquín Mogrovejo wrote:
>> Hi there,
>>
>> Yeah this for sure looks like a bug.
>> Could you tell us which back end you are using please?
>> Thanks!
>>
>> Renato M.
>> On Jan 16, 2014 9:08 AM, "Alparslan Avcı" <al...@agmlab.com> 
>> wrote:
>>
>>> Hi all,
>>>
>>> I've noticed that (in trunk) when we set the same value to the same 
>>> key in
>>> any avro-generated object's map field, it removes the key from the 
>>> map. For
>>> example; after running this code piece,
>>>
>>>     WebPage webPage = dataStore.newPersistent();
>>>     webPage.putToOutlinks(new Utf8("anchor0"), new Utf8("url0"));
>>>     webPage.putToOutlinks(new Utf8("anchor0"), new Utf8("url0"));
>>>     webPage.putToOutlinks(new Utf8("anchor2"), new Utf8("url2"));
>>>     dataStore.put(webPage.getUrl().toString(), webPage);
>>>     dataStore.flush();
>>>
>>>
>>> it only stores {"anchor2", "url2"} pair.
>>>
>>> Is it an intended coding? If it is not, I will upload a bug-fix 
>>> about this
>>> issue.
>>>
>


Re: About Putting Same Value to Same Key

Posted by Alparslan Avcı <al...@agmlab.com>.
Hi Renato,

I'm using Hbase as backend; however this is about gora-core, a bug in 
StatefulHashMap.

I will open an issue and upload a patch as soon as possible.

Thanks,
Alparslan Avcı

On 16-01-2014 16:42, Renato Marroquín Mogrovejo wrote:
> Hi there,
>
> Yeah this for sure looks like a bug.
> Could you tell us which back end you are using please?
> Thanks!
>
> Renato M.
> On Jan 16, 2014 9:08 AM, "Alparslan Avcı" <al...@agmlab.com> wrote:
>
>> Hi all,
>>
>> I've noticed that (in trunk) when we set the same value to the same key in
>> any avro-generated object's map field, it removes the key from the map. For
>> example; after running this code piece,
>>
>>     WebPage webPage = dataStore.newPersistent();
>>     webPage.putToOutlinks(new Utf8("anchor0"), new Utf8("url0"));
>>     webPage.putToOutlinks(new Utf8("anchor0"), new Utf8("url0"));
>>     webPage.putToOutlinks(new Utf8("anchor2"), new Utf8("url2"));
>>     dataStore.put(webPage.getUrl().toString(), webPage);
>>     dataStore.flush();
>>
>>
>> it only stores {"anchor2", "url2"} pair.
>>
>> Is it an intended coding? If it is not, I will upload a bug-fix about this
>> issue.
>>


Re: About Putting Same Value to Same Key

Posted by Renato Marroquín Mogrovejo <re...@gmail.com>.
Hi there,

Yeah this for sure looks like a bug.
Could you tell us which back end you are using please?
Thanks!

Renato M.
On Jan 16, 2014 9:08 AM, "Alparslan Avcı" <al...@agmlab.com> wrote:

> Hi all,
>
> I've noticed that (in trunk) when we set the same value to the same key in
> any avro-generated object's map field, it removes the key from the map. For
> example; after running this code piece,
>
>    WebPage webPage = dataStore.newPersistent();
>    webPage.putToOutlinks(new Utf8("anchor0"), new Utf8("url0"));
>    webPage.putToOutlinks(new Utf8("anchor0"), new Utf8("url0"));
>    webPage.putToOutlinks(new Utf8("anchor2"), new Utf8("url2"));
>    dataStore.put(webPage.getUrl().toString(), webPage);
>    dataStore.flush();
>
>
> it only stores {"anchor2", "url2"} pair.
>
> Is it an intended coding? If it is not, I will upload a bug-fix about this
> issue.
>