Can you please provide a complete, self-contained test case for this, so
that I can easily reproduce it? Thanks!
Doug
Alex Newman wrote:
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{