avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Newman <posi...@gmail.com>
Subject issues getting with the SpecificCompiler
Date Mon, 03 Aug 2009 18:03:34 GMT
I am currently having some issues getting the SpecificCompiler
infrastructure working.

Here is my json
{
   "namespace": "org.apache.hadoop.hbase.avro",
   "protocol": "HBase",

   "types": [
       {"name": "Mutation", "type": "record",
           "fields": [
           {"name": "isDelete", "type": "boolean", "default" :false},
           {"name": "column", "type": "bytes"},
           {"name": "value", "type": "bytes"}
           ]
       },
       {"name": "BatchMutation", "type": "record",
           "fields": [
               {"name": "row", "type": "bytes"},
               {"name": "mutations", "type": {
                   "type":"array",
                   "items": "Mutation"
                   }
               }
           ]
       }
   ],
   "messages": {
       "isTableEnabled": {
           "request": [
               {
                   "name": "tableName",
                   "type": "bytes"
               }
           ],
           "response": "boolean"
       },
       "mutateRows": {
           "request": [
               {
                   "name": "tableName",
                   "type": "bytes"
               },
               {
                   "name": "batchMutation",
                   "type":
                       {
                           "type":"array",
                           "items": "BatchMutation"
                       }
               }
           ],
           "response": "null"
       }
   }
}

I get
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
       at org.apache.avro.reflect.ReflectData.getMessage(ReflectData.java:236)
       at org.apache.avro.reflect.ReflectData.getProtocol(ReflectData.java:212)
       at org.apache.avro.reflect.ReflectResponder.<init>(ReflectResponder.java:45)
       at org.apache.avro.specific.SpecificResponder.<init>(SpecificResponder.java:29)
       at org.apache.hadoop.hbase.avro.AvroServer.main(AvroServer.java:214)


at line
    server = new SocketServer(new SpecificResponder(HBase.class,
                   new HBaseImpl()) ,
                   new InetSocketAddress(port));


btw
   private static class HBaseImpl implements HBase{

Mime
View raw message