|
Bruce Mitchener
2011-02-28, 17:22
Doug Cutting
2011-02-28, 17:32
Bruce Mitchener
2011-02-28, 17:49
Scott Carey
2011-02-28, 18:17
Bruce Mitchener
2011-02-28, 18:19
Scott Carey
2011-03-01, 01:10
|
-
JsonEncoder issue in 1.5?Bruce Mitchener 2011-02-28, 17:22
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
-
Re: JsonEncoder issue in 1.5?Doug Cutting 2011-02-28, 17:32
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 >
-
Re: JsonEncoder issue in 1.5?Bruce Mitchener 2011-02-28, 17:49
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 > > >
-
Re: JsonEncoder issue in 1.5?Scott Carey 2011-02-28, 18:17
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 >> > >>
-
Re: JsonEncoder issue in 1.5?Bruce Mitchener 2011-02-28, 18:19
Hmm, something odd happened to my tree. It was missing several commits, so
I had quite a different version of JsonEncoder.java. - Bruce On Tue, Mar 1, 2011 at 1:17 AM, Scott Carey <[EMAIL PROTECTED]> wrote: > 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 > >> > > >> > >
-
Re: JsonEncoder issue in 1.5?Scott Carey 2011-03-01, 01:10
I've added some extra clarification and documentation in
https://issues.apache.org/jira/browse/AVRO-769. If there is another 1.5.0 RC, I'd add them in. Otherwise the javadoc changes can just go in 1.5.1 in another ticket. There is one API inconsistency that I've added as well, but it is minor and we could live with it as is. ValidatingEncoder.configure(Encoder) does not return itself like the configure() methods on other Encoder and Decoders. Other comments/suggestions of the updated API and documentation is welcome, the intention is that this change allows the Encoder/Decoder APIs and factories to be much more stable going forward since they mask implementation details. -Scott On 2/28/11 10:19 AM, "Bruce Mitchener" <[EMAIL PROTECTED]> wrote: >Hmm, something odd happened to my tree. It was missing several commits, >so >I had quite a different version of JsonEncoder.java. > > - Bruce > >On Tue, Mar 1, 2011 at 1:17 AM, Scott Carey <[EMAIL PROTECTED]> >wrote: > >> 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/avr >>>>o/ >> >>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/avr >>>>o/ >> >>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 >> >> > >> >> >> >> |