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

Dean Ericson commented on AVRO-924:
-----------------------------------

[~cutting], Here is the stacktrace

{code}
org.apache.avro.AvroTypeException: Unknown union branch hour
        at org.apache.avro.io.JsonDecoder.readIndex(JsonDecoder.java:445)
        at 
org.apache.avro.io.ResolvingDecoder.doAction(ResolvingDecoder.java:290)
        at org.apache.avro.io.parsing.Parser.advance(Parser.java:88)
        at 
org.apache.avro.io.ResolvingDecoder.readIndex(ResolvingDecoder.java:267)
        at 
org.apache.avro.generic.GenericDatumReader.readWithoutConversion(GenericDatumReader.java:178)
        at 
org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:152)
        at 
org.apache.avro.generic.GenericDatumReader.readField(GenericDatumReader.java:240)
        at 
org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:230)
        at 
org.apache.avro.generic.GenericDatumReader.readWithoutConversion(GenericDatumReader.java:174)
        at 
org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:152)
        at 
org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:144)
        at avro.TestAvro.jsonToAvro(TestAvro.java:215)
        at avro.TestAvro.testAvroJsonToBinarySerialization(TestAvro.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)


{code}

> permit reading & writing arbitrary JSON as binary Avro data
> -----------------------------------------------------------
>
>                 Key: AVRO-924
>                 URL: https://issues.apache.org/jira/browse/AVRO-924
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>             Fix For: 1.6.0
>
>         Attachments: AVRO-924.patch
>
>
> It would be useful to permit reading and writing arbitrary JSON data as 
> binary Avro data.  JSON is a popular data interchange format but can be 
> rather big and slow to process in some cases, e.g., for numeric data.  Avro 
> can provide a smaller and faster to process binary format for JSON data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to