I'll take another pass through the Javadoc on the changes in AVRO-753 and
AVRO-769.
I may have missed some details.
JsonEncoder's class Javadoc has this info:
"
/** An {@link Encoder} for Avro's JSON data encoding.
* </p>
* Construct using {@link EncoderFactory}.
* </p>
* JsonEncoder buffers output, and data may not appear on the output
* until {@link Encoder#flush()} is called.
* </p>
* JsonEncoder is not thread-safe.
* */
"
It has no public constructors.
JsonDecoder however is missing the equivalent.
On 2/28/11 9:49 AM, "Bruce Mitchener" <[email protected]> wrote:
>Thanks, that solves that. I didn't find that because I was searching for
>Json and JsonEncoder. Also, despite the constructor being public and not
>actually being usable, there's no notice in the Javadoc comments about how
>to properly construct things...
>
> - Bruce
>
>On Tue, Mar 1, 2011 at 12:32 AM, Doug Cutting <[email protected]> wrote:
>
>> Bruce,
>>
>> This sounds like the incompatible change of AVRO-753:
>>
>>
>>
>>http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?r1=1074364&r2=1074363
>>&pathrev=1074364
>>
>> Doug
>>
>> On 02/28/2011 09:22 AM, Bruce Mitchener wrote:
>> > Hopefully this is just some stupidity on my part, but ...
>> >
>> > I'm doing a test upgrade of Flume from Avro 1.4 to the rc0 of 1.5.0 to
>> make
>> > sure everything works ... After putting the new jars in place and
>>fixing
>> > errors due to classes moving around some, I end up with these 2
>>errors:
>> >
>> > [javac]
>> >
>>
>>/Users/bruce/Development/flume/src/java/com/cloudera/flume/handlers/avro/
>>AvroJsonOutputFormat.java:61:
>> > cannot find symbol
>> > [javac] symbol : constructor
>> > JsonEncoder(org.apache.avro.Schema,java.io.OutputStream)
>> > [javac] location: class org.apache.avro.io.JsonEncoder
>> > [javac] json = new JsonEncoder(schema, o);
>> > [javac] ^
>> > [javac]
>> >
>>
>>/Users/bruce/Development/flume/src/java/com/cloudera/flume/handlers/avro/
>>AvroJsonOutputFormat.java:67:
>> > cannot find symbol
>> > [javac] symbol : method init(java.io.OutputStream)
>> > [javac] location: class org.apache.avro.io.JsonEncoder
>> > [javac] json.init(o);
>> > [javac] ^
>> >
>> > I can't see where I'm doing anything wrong and this code works with
>>1.4.
>> >
>> > I also updated the Jackson jars to be the same as what Avro is using
>>and
>> > I've done 'ant clean'...
>> >
>> > Any idea what is going on and how I can fix it?
>> >
>> > - Bruce
>> >
>>