[protobuf] JsonFormater.printer convert long to String in Json

2018-10-30 Thread David Yu
Hi, Currently I encounter the behavior of JsonFormater.printer printing the long(int64) value as String to JSON. Is there a way to set the JsonFormater.printer not to do this conversion (Long(int64) -> String in Json)? In my use case, the JSON is not consumed by javascript app, representing the

[protobuf] How to find the number of messages in a protobuf file?

2018-09-18 Thread David Yu
Hi, I am currently writing the java code to check the number of messages in a protocol buffer file *.pb I would like to know if there is meta-data or header that contains the information of number of messages in the protobuf file? I am looping through the whole file, and I think there should

[protobuf] Re: NoSuchMethodError exception when read the protobuf file from HDFS

2018-09-14 Thread David Yu
Figured out this is because the protobuf version is different between hadoop (2.5.0) and the one I used (3.6.1) to generate the java files. Once I downgrade the protoc to re-generate the java files, the issue resolved. Thanks David On Wednesday, September 12, 2018 at 3:28:49 PM UTC-7, David Yu

[protobuf] Re: NoSuchMethodError exception when read the protobuf file from HDFS

2018-09-12 Thread David Yu
eDelimitedFrom(input)) != null) { recordCount++; } It works fine. =( On Wednesday, September 12, 2018 at 3:28:49 PM UTC-7, David Yu wrote: > > Hi, > I am working on the project to count the record in the protobuf file > but I get the excepti

[protobuf] NoSuchMethodError exception when read the protobuf file from HDFS

2018-09-12 Thread David Yu
Hi, I am working on the project to count the record in the protobuf file but I get the exception Exception in thread "main" java.lang.NoSuchMethodError: com.google.protobuf.CodedInputStream.shouldDiscardUnknownFields()Z at

Re: [protobuf] Binary protocol optimization recomendations

2017-11-06 Thread David Yu
On Mon, Nov 6, 2017 at 3:28 AM, Andrey Dotsenko wrote: > Hi again! > > I'm trying to write library for C with minimal memory allocations and I've > encounted that protocol is not as perfect as I thought. My aim is embedded > systems but with compatibility mode with Protocol

Re: [protobuf] Re: Streaming Serialization - Suggestion

2016-03-29 Thread David Yu
ers" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to protobuf+u...@googlegroups.com. >>>> To post to this group, send email to prot...@googlegroups.com. >>>> Visit this group at https://gr

Re: [protobuf] Customizing protoc to support an existing wire format

2014-05-27 Thread David Yu
+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout. -- When the cat is away, the mouse is alone. - David Yu -- You received

Re: [protobuf] Is the Protocol Buffers serialization format standardized?

2011-07-15 Thread David Yu
to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You

Re: [protobuf] Java: Why are the generated classes final?

2011-06-27 Thread David Yu
://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group

Re: [protobuf] Reading data coded with some other protocol

2011-03-23 Thread David Yu
@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed

Re: [protobuf] Specification for the .proto file?

2011-03-09 Thread David Yu
?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf

Re: [protobuf] Circular package import problem

2011-02-22 Thread David Yu
On Wed, Feb 23, 2011 at 2:29 AM, Kenton Varda ken...@google.com wrote: On Tue, Feb 8, 2011 at 4:14 AM, David Yu david.yu@gmail.com wrote: Hmm, so protoc doesn't handle cyclic imports as well. Are there plans to support it in the near future? No, cyclic imports are not likely

Re: [protobuf] Re: Circular package import problem

2011-02-08 Thread David Yu
to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post

Re: [protobuf] Circular package import problem

2011-02-08 Thread David Yu
to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed to the Google Groups Protocol Buffers group

Re: [protobuf] 2.4.0a released.

2011-02-02 Thread David Yu
from this group, send email to protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because

Re: [protobuf] ProtocolBuffers and existing classes

2011-01-25 Thread David Yu
options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com

Re: [protobuf] Why not allow null values in Java for scalar types?

2010-12-23 Thread David Yu
. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto

Re: [protobuf] Feature proposal: mapped fields

2010-10-06 Thread David Yu
email to protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed

Re: [protobuf] Architectural question - Java - proto - C#

2010-09-15 Thread David Yu
, the mouse is alone. - David Yu -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options

Re: [protobuf] What's the point of Protocol Buffers?

2010-07-21 Thread David Yu
...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received

Re: [protobuf] Java protobuf for J2ME.

2010-05-30 Thread David Yu
at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from

Re: [protobuf] *.proto file format specification?

2010-05-21 Thread David Yu
to protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed to the Google

Re: [protobuf] 2.3.0 release candidate #2

2010-01-07 Thread David Yu
?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email t

Re: [protobuf] 2.3.0 release candidate #2

2010-01-07 Thread David Yu
When writing to the CodedOutputStream, it will be written as 0 length delimited (0)bytes. The Builder's setFoo(String foo) fails to protect it. On Fri, Jan 8, 2010 at 7:50 AM, Kenton Varda ken...@google.com wrote: On Thu, Jan 7, 2010 at 3:34 PM, David Yu david.yu@gmail.com wrote: Just

Re: [protobuf] 2.3.0 release candidate #2

2010-01-07 Thread David Yu
Oh ok, didn't think it was normal to write delimited data with 0 length and no data. But I guess that is how the empty string is passed around. Thanks. On Fri, Jan 8, 2010 at 8:00 AM, Kenton Varda ken...@google.com wrote: On Thu, Jan 7, 2010 at 3:53 PM, David Yu david.yu@gmail.com wrote

Re: [protobuf] Java UTF-8 encoding/decoding: possible performance improvements

2009-12-22 Thread David Yu
. - David Yu -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group

Re: [protobuf] Java UTF-8 encoding/decoding: possible performance improvements

2009-12-22 Thread David Yu
On Wed, Dec 23, 2009 at 12:21 PM, Kenton Varda ken...@google.com wrote: On Tue, Dec 22, 2009 at 8:18 PM, David Yu david.yu@gmail.com wrote: On Wed, Dec 23, 2009 at 11:14 AM, Kenton Varda ken...@google.com wrote: On Tue, Dec 22, 2009 at 7:06 PM, David Yu david.yu@gmail.comwrote

Re: Any progress on the Maven plugin?

2009-10-16 Thread David Yu
not entirely sure how I can contribute at the moment) -Bjørn -- When the cat is away, the mouse is alone. - David Yu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post

Re: Java generated code: faster equals() and hashCode()

2009-09-25 Thread David Yu
I do agree that this should not be applied for LITE_RUNTIME because of the lite runtime goal. However an extra option could be added where these equals() and hashCode() are implemented. LITE_RUNTIME_EXTRA maybe. (any name is fine) Those 2 methods are definitely needed in most cases. Cheers On

Re: java JPA entities and PB question

2009-08-16 Thread David Yu
On Sun, Aug 16, 2009 at 9:37 PM, FiveTwelve cape...@gmail.com wrote: I have an application that already has a ton of Soap web services that basically serve up JPA entities. I use this to communicate data to a Silverlight application. Soap is horribly slow, one of our messages is 10MB!!! The