Uploaded image for project: 'Apache Gora'
  1. Apache Gora
  2. GORA-183

dataStore.put() ->org.apache.gora.hbase.util.HBaseInterface#toBytes(). Unknown type: UNION

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.2, 0.2.1
    • Fix Version/s: 0.3
    • Component/s: gora-hbase
    • Labels:
      None
    • Environment:
      Ubuntu 12.04, HBase 0.92.0, Gora 0.2.1, Avro 1.3.2

      Description

      Summary: HBase does not handle avro UNION type (in the schema like ["string","null"]".

      When trying to write a row I get the RuntimeException "Unknown type: UNION".

      My .avsc is the following:

      {"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"}}
      
         ]
      }
      

      my mapping is:

      <?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&gt;
      </gora-orm>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alfonso.nishikawa Alfonso Nishikawa
                Reporter:
                alfonso.nishikawa Alfonso Nishikawa
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: