[
https://issues.apache.org/jira/browse/GORA-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14048288#comment-14048288
]
Valerio Schiavoni commented on GORA-326:
----------------------------------------
By applying the submitted patch, the execution of the TestGoraStorage as
regular java application fails with:
Starting!
Exception in thread "main" org.apache.avro.AvroRuntimeException: Bad index
at org.apache.nutch.storage.WebPage.get(WebPage.java:158)
at
org.apache.gora.persistency.impl.PersistentBase.getDirtyBytes(PersistentBase.java:179)
at
org.apache.gora.persistency.impl.PersistentBase.setDirty(PersistentBase.java:164)
at org.apache.nutch.storage.WebPage.setTitle(WebPage.java:520)
at
org.apache.nutch.storage.TestGoraStorage.readWrite(TestGoraStorage.java:80)
at
org.apache.nutch.storage.TestGoraStorage.main(TestGoraStorage.java:231)
This is because the patch seems to ignore the consequences on the switch-cases
here:
https://github.com/apache/nutch/blob/2.x/src/java/org/apache/nutch/storage/WebPage.java#L131
https://github.com/apache/nutch/blob/2.x/src/java/org/apache/nutch/storage/WebPage.java#L164
> Removal of _g_dirty field from _ALL_FIELDS array and Field Enum in Persistent
> classes
> -------------------------------------------------------------------------------------
>
> Key: GORA-326
> URL: https://issues.apache.org/jira/browse/GORA-326
> Project: Apache Gora
> Issue Type: Bug
> Components: gora-core
> Affects Versions: 0.4
> Reporter: Alparslan Avcı
> Priority: Minor
> Labels: gora-core
> Fix For: 0.5
>
> Attachments: GORA-326.patch
>
>
> In auto-generated persistent classes, we create an array field called
> ALL_FIELDS as you know. But this array also contains _g_dirty field, which is
> not a stored field at all. Maybe we should remove _g_dirty field from the
> array, since the array is used for getting all fields in the stored table. We
> can also remove it from Field enum, so the users do not know about the
> _g_dirty field.
--
This message was sent by Atlassian JIRA
(v6.2#6252)