avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Evans (JIRA)" <j...@apache.org>
Subject [jira] Created: (AVRO-503) ArrayIndexOutOfBoundsException with nested maps
Date Sun, 04 Apr 2010 23:09:27 GMT
ArrayIndexOutOfBoundsException with nested maps
-----------------------------------------------

                 Key: AVRO-503
                 URL: https://issues.apache.org/jira/browse/AVRO-503
             Project: Avro
          Issue Type: Bug
          Components: java, python
    Affects Versions: 1.3.2
            Reporter: Eric Evans
         Attachments: cass.tar.gz

I'm attempting to add an avro equivalent to Cassandra's batch_mutate() method (thrift def
here: https://svn.apache.org/repos/asf/cassandra/trunk/interface/cassandra.thrift). This is
the first time I've attempted to nest maps within maps, and I'm assuming it's related since
that seems like the only difference to the working examples I have.

Attached is a tarball that includes the protocol I'm using along with java and python examples
(src/BatchMutate.java and py/batch_mutate.py) that reproduce the exceptions I'm seeing.

Running the java example produces:
{noformat} 
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
	at org.apache.avro.io.parsing.Symbol$Alternative.getSymbol(Symbol.java:364)
	at org.apache.avro.io.ResolvingDecoder.doAction(ResolvingDecoder.java:191)
	at org.apache.avro.io.parsing.Parser.advance(Parser.java:88)
	at org.apache.avro.io.ResolvingDecoder.readIndex(ResolvingDecoder.java:168)
	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:81)
	at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:105)
	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:77)
	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:70)
	at org.apache.avro.ipc.Requestor.readHandshake(Requestor.java:181)
	at org.apache.avro.ipc.Requestor.request(Requestor.java:116)
	at org.apache.avro.specific.SpecificRequestor.invoke(SpecificRequestor.java:52)
	at $Proxy0.batch_mutate(Unknown Source)
	at BatchMutate.main(BatchMutate.java:43)
{noformat} 

Running the python examples produces:
{noformat} 
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.5/nose/case.py", line 183, in runTest
    self.test(*self.arg)
  File "/home/eevans/dev/src/git/cassandra/test/system/test_avro_server.py", line 161, in
test_batch_mutate
    self.client.request('batch_mutate', params)
  File "/usr/local/lib/python2.5/site-packages/avro/ipc.py", line 146, in request
    return self.request(message_name, request_datum)
  File "/usr/local/lib/python2.5/site-packages/avro/ipc.py", line 142, in request
    call_response_exists = self.read_handshake_response(buffer_decoder)
  File "/usr/local/lib/python2.5/site-packages/avro/ipc.py", line 188, in read_handshake_response
    handshake_response = HANDSHAKE_REQUESTOR_READER.read(decoder)
  File "/usr/local/lib/python2.5/site-packages/avro/io.py", line 411, in read
    return self.read_data(self.writers_schema, self.readers_schema, decoder)
  File "/usr/local/lib/python2.5/site-packages/avro/io.py", line 455, in read_data
    return self.read_record(writers_schema, readers_schema, decoder)
  File "/usr/local/lib/python2.5/site-packages/avro/io.py", line 643, in read_record
    field_val = self.read_data(field.type, readers_field.type, decoder)
  File "/usr/local/lib/python2.5/site-packages/avro/io.py", line 453, in read_data
    return self.read_union(writers_schema, readers_schema, decoder)
  File "/usr/local/lib/python2.5/site-packages/avro/io.py", line 608, in read_union
    selected_writers_schema = writers_schema.schemas[index_of_schema]
IndexError: list index out of range
{noformat} 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message