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ı (JIRA)" <ji...@apache.org> on 2014/02/06 09:22:11 UTC

[jira] [Comment Edited] (GORA-94) Upgrade to Apache Avro 1.7.x

    [ https://issues.apache.org/jira/browse/GORA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13893157#comment-13893157 ] 

Alparslan Avcı edited comment on GORA-94 at 2/6/14 8:21 AM:
------------------------------------------------------------

Hi [~lewismc], thanks for checking. :)

bq. Do we need to always setHeaders as follows --> webPage.setHeaders(new HashMap<CharSequence, CharSequence>()); ? What happens if we just access the headers field without initiating a new HashMap? Do we still get NPE? I though the builder build() method would initiate default empty HashMap?

Since headers field is defined as 'nullable' and has 'null' as default value in JSON, {code:javascript}{"name": "headers", "type": ["null",{"type": "map", "values": ["null", "string"]}],"default":null}{code} the builder initiate this field with null value. So, we always have to set a new HashMap object to headers field at first. 

bq. Do you have any idea what is the current issue with PersistentBase#clear() method? I am puzzled as to why it is not clearing dirty state of object field.

I had fixed this problem in GORA-94v10.patch and it seems that it is clearing the dirty states of all fields for now. Would you please elaborate this issue?


was (Author: alparslan.avci):
Hi [~lewismc], thanks for checking. :)

bq. Do we need to always setHeaders as follows --> webPage.setHeaders(new HashMap<CharSequence, CharSequence>()); ? What happens if we just access the headers field without initiating a new HashMap? Do we still get NPE? I though the builder build() method would initiate default empty HashMap?

Since headers field is defined as 'nullable' and has 'null' as default value in JSON ({"name": "headers", "type": ["null", {"type": "map", "values": ["null", "string"]}],"default":null}), the builder initiate this field with null value. So, we always have to set a new HashMap object to headers field at first. 

bq. Do you have any idea what is the current issue with PersistentBase#clear() method? I am puzzled as to why it is not clearing dirty state of object field.

I had fixed this problem in GORA-94v10.patch and it seems that it is clearing the dirty states of all fields for now. Would you please elaborate this issue?

> Upgrade to Apache Avro 1.7.x
> ----------------------------
>
>                 Key: GORA-94
>                 URL: https://issues.apache.org/jira/browse/GORA-94
>             Project: Apache Gora
>          Issue Type: Improvement
>          Components: build process, storage
>    Affects Versions: 0.2
>            Reporter: Lewis John McGibbney
>            Assignee: Ed Kohlwey
>             Fix For: 0.4
>
>         Attachments: GORA-94-v2.patch, GORA-94-v3.patch, GORA-94-v4.patch, GORA-94.patch, GORA-94v10.patch, GORA-94v11.patch, GORA-94v12.patch, GORA-94v6.diff, GORA-94v7.patch, GORA-94v8.patch, GORA-94v9.patch, GORA_94v5.patch
>
>
> I am not sure what this involves as of yet but I have a small feeling that it's going to be some reasonably major work...  



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)