[
https://issues.apache.org/jira/browse/GORA-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13591615#comment-13591615
]
Lewis John McGibbney commented on GORA-206:
-------------------------------------------
OK so I tracked down the bug
{code}
line 488: schemaString.append("]}");
{code}
should be changed to
{code}
line 488: schemaString.append("]");
{code}
However we have another problem.
In Nutch, the webpage schema is kinda tricky, where it uses different naming
conventions for fields e.g. in this case protocolStatus and ProtocolStatus
{code}
{"name": "protocolStatus", "type": ["null", {
"name": "ProtocolStatus",
"type": "record",
"namespace": "org.apache.nutch.storage",
"fields": [
{code}
The GoraCompiler we do .toLowerCase() for a such instances which then messes
things up and I get
{code}
Exception in thread "main" java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at
org.apache.gora.util.ReflectionUtils.newInstance(ReflectionUtils.java:76)
at
org.apache.gora.persistency.impl.BeanFactoryImpl.<init>(BeanFactoryImpl.java:53)
at
org.apache.gora.store.impl.DataStoreBase.initialize(DataStoreBase.java:80)
at
org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102)
at
org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161)
at
org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135)
at
org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:75)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:221)
at org.apache.nutch.crawl.InjectorJob.inject(InjectorJob.java:251)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:273)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.crawl.InjectorJob.main(InjectorJob.java:282)
Caused by: org.apache.avro.SchemaParseException: Undefined name:
"protocolstatus"
at org.apache.avro.Schema.parse(Schema.java:876)
at org.apache.avro.Schema.parse(Schema.java:962)
at org.apache.avro.Schema.parse(Schema.java:912)
at org.apache.avro.Schema.parse(Schema.java:821)
at org.apache.nutch.storage.WebPage.<clinit>(WebPage.java:44)
... 16 more
{code}
I think this is becasue of the following:
{code}
line 484 schemaString.append("\"" +
field.schema().getTypes().get(iCnt2).getName().toLowerCase() + "\"");
{code}
This messes it all up.
Any suggestions please?
The obvious one, is to use the camelCasify(String s) in some shape or form, but
it's been a hellishly long day and I am going to retire. Some suggestions would
be really great.
Thank you
> Verify storage and retrieval of Avro null-single-type Union data type within
> Gora-Cassandra
> -------------------------------------------------------------------------------------------
>
> Key: GORA-206
> URL: https://issues.apache.org/jira/browse/GORA-206
> Project: Apache Gora
> Issue Type: Sub-task
> Components: storage-cassandra
> Affects Versions: 0.3
> Reporter: Renato Javier Marroquín Mogrovejo
> Assignee: Renato Javier Marroquín Mogrovejo
> Labels: gora-cassandra, gora-core
> Fix For: 0.3
>
> Attachments: GORA-206.v1.patch, GORA-206.v2.patch
>
>
> The necessary features should be added to confirm that we are able to support
> Avro Union data types.
> This referes specifically to null-single-type unions. We will open another
> issue to address the multi-type unions.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira