gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alfonso Nishikawa (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GORA-183) dataStore.put() ->org.apache.gora.hbase.util.HBaseInterface#toBytes(). Unknown type: UNION
Date Fri, 16 Nov 2012 16:30:11 GMT

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

Alfonso Nishikawa commented on GORA-183:
----------------------------------------

Hi, Lewis.
Thanks for answering that much fast.
They are not the same. GORA-174 is only related to creating get/set methods in Compiler so
Nutch crashes.
Although compiler does not create getter/setters for unions types, you can get/set them with
(in my example) testRow.get(TestRow.field.UNION_STRING.getIndex()) and write it with testRow.put(TestRow.field.UNION_STRING.getIndex(),
new Utf8("test_string")).
In my case I am not accesing through Nutch and "Unknown type: UNION" is what I get.
                
> dataStore.put() ->org.apache.gora.hbase.util.HBaseInterface#toBytes(). Unknown type:
UNION
> ------------------------------------------------------------------------------------------
>
>                 Key: GORA-183
>                 URL: https://issues.apache.org/jira/browse/GORA-183
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: storage-hbase
>    Affects Versions: 0.2, 0.2.1
>         Environment: Ubuntu 12.04, HBase 0.92.0, Gora 0.2.1, Avro 1.3.2
>            Reporter: Alfonso Nishikawa
>
> When trying to write a row I get the RuntimeException "Unknown type: UNION".
> My .avsc is the following:
> {code}
> {"name": "TestRow",
>  "type": "record",
>  "namespace": "es.foo.tests.storage",
>  "fields": [
>         {"name": "columnLong", "type": "long", "default": "0"},
>         {"name": "unionRecursive", "type": ["TestRow","null"]},
>         {"name": "unionString", "type": ["string","null"]},
>         
>         {"name": "family2", "type": {"type": "map", "values":"string"}}
>    ]
> }
> {code}
> my mapping is:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <gora-orm>
>     <table name="test"> <!-- Configuración de familias -->
>         <family name="family1"  maxVersions="1" compression="SNAPPY" />
>         <family name="family2"  maxVersions="1" compression="SNAPPY" />
>     </table>
>     <class table="test" keyClass="java.lang.String" name="es.foo.tests.storage.TestRow">
>         <field name="unionString"       family="family1" qualifier="unionString" 
  />
>         <field name="unionRecursive"    family="family1" qualifier="unionRecursive"
/>
>         <field name="columnLong"        family="family1" qualifier="colInteger"  
  />
>         <field name="family2"       family="family2" />
>     </class>
> </gora-orm>
> {code}

--
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

Mime
View raw message