[protobuf] Re: protobuf object-c GPBTypeString not found

2015-12-10 Thread sam sun
done. Thanks.

在 2015年12月5日星期六 UTC+8上午7:42:40,Feng Xiao写道:
>
> Could you file an issue on protobuf github site?
>
> On Thursday, December 3, 2015 at 3:14:11 AM UTC-8, sam sun wrote:
>>
>> GPBDataTypeString rather than GPBTypeString can be found in 
>> GPBRuntimeTypes.h, so i think it's a bug ? 
>>
>> 在 2015年12月3日星期四 UTC+8下午6:33:19,sam sun写道:
>>>
>>> hi~ I try to use protobuf in object c env, but it failed because the 
>>> missing of the GPBTypeString, GPBTypeEnum ..., how to fix it ? Thanks in 
>>> advance.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+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.


[protobuf] protobuf object-c GPBTypeString not found

2015-12-03 Thread sam sun
hi~ I try to use protobuf in object c env, but it failed because the 
missing of the GPBTypeString, GPBTypeEnum ..., how to fix it ? Thanks in 
advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+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.


[protobuf] Re: protobuf object-c GPBTypeString not found

2015-12-03 Thread sam sun
GPBDataTypeString rather than GPBTypeString can be found in 
GPBRuntimeTypes.h, so i think it's a bug ? 

在 2015年12月3日星期四 UTC+8下午6:33:19,sam sun写道:
>
> hi~ I try to use protobuf in object c env, but it failed because the 
> missing of the GPBTypeString, GPBTypeEnum ..., how to fix it ? Thanks in 
> advance.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+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.


[protobuf] JsonFormat parser use camel field name in proto3 beta1

2015-09-24 Thread sam sun
I have a proto:
  message Person {
 string user_id;
  }
and write a json:
   { "user_id" : "123" }

I try to use JsonFormat.Parser to parse the json, but it failed. I found 
JsonFormat 
will call fieldNameToCamelName. I'm really confused. If the parser in java 
required camel fieldname, the parser in c++ required user_id or userId ? 
I think it's better to let the field name reserved the same as defined in 
proto or supply a optional to set whether convert the field name to camel.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+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.


Re: [protobuf] proto3 backward compatibility problem

2015-09-14 Thread sam sun
Since the map type is important to me, i decided to use proto3, so i moved 
hashLong method from  com.google.protobuf.Internal.hashLong/hashEnum/xx to 
GeneratedMessage in proto3 source code and solved the problem,  however, to 
maintain a special version by myself is really a bad idea. 
I do think it's  very import to keep full backward compatibility with code 
generated by proto2 since so many widely used opensource libs depends on 
protobuf as i have mentioned before,   especially protobuf2.5.
Thanks

在 2015年9月7日星期一 UTC+8下午3:05:50,sam sun写道:
>
> I knew it, because yarn depends on proto2 but my lib depends on proto3. 
> The reason is that proto3 runtime doesn't keep backward compatibility. The 
> problem can be reproduced if set option java_generate_equals_and_hash = 
> true with proto2.
>
> I hope msg with proto2 still work with proto3 jar since proto2 has been 
> widely used in opensource system like yarn, hbase, etc.
>
>
>
> 在 2015年9月7日星期一 UTC+8下午2:31:04,Feng Xiao写道:
>>
>> On Sat, Sep 5, 2015 at 9:08 PM, sam sun <sun...@gmail.com> wrote:
>>
>>> I use proto3 to log user event and then run a mapreduce to stat same 
>>> metrics. But it reports an error:
>>>
>>> Exception in thread "Thread-2" java.lang.NoSuchMethodError: 
>>> org.apache.hadoop.yarn.proto.YarnProtos$LocalResourceProto.hashLong(J)I
>>> at 
>>> org.apache.hadoop.yarn.proto.YarnProtos$LocalResourceProto.hashCode(YarnProtos.java:11555)
>>> at 
>>> org.apache.hadoop.yarn.api.records.impl.pb.LocalResourcePBImpl.hashCode(LocalResourcePBImpl.java:62)
>>> at java.util.HashMap.hash(HashMap.java:338)
>>> at java.util.HashMap.put(HashMap.java:611)
>>>
>>> The problem is proto3 doesn't keep backward compatibility with proto2. 
>>> hashLong is no longer exists in generated code with proto3. Now I faced a 
>>> deed situation that neither proto2 nor proto3 can be loaded when i run a 
>>>  mapreduce job.
>>>
>> It seems the problem is that your binary depends on both proto2 Java 
>> runtime and also proto3 Java runtime. One of them will be shadowed by the 
>> other and you will see such runtime errors. The suggestion is to stick with 
>> one version through out your project (including all your project's 
>> dependencies).
>>  
>>
>>>
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Protocol Buffers" 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 http://groups.google.com/group/protobuf.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+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.


Re: [protobuf] proto3 backward compatibility problem

2015-09-07 Thread sam sun
I knew it, because yarn depends on proto2 but my lib depends on proto3. The 
reason is that proto3 runtime doesn't keep backward compatibility. The 
problem can be reproduced if set option java_generate_equals_and_hash = 
true with proto2.

I hope msg with proto2 still work with proto3 jar since proto2 has been 
widely used in opensource system like yarn, hbase, etc.



在 2015年9月7日星期一 UTC+8下午2:31:04,Feng Xiao写道:
>
> On Sat, Sep 5, 2015 at 9:08 PM, sam sun <sun...@gmail.com > 
> wrote:
>
>> I use proto3 to log user event and then run a mapreduce to stat same 
>> metrics. But it reports an error:
>>
>> Exception in thread "Thread-2" java.lang.NoSuchMethodError: 
>> org.apache.hadoop.yarn.proto.YarnProtos$LocalResourceProto.hashLong(J)I
>> at 
>> org.apache.hadoop.yarn.proto.YarnProtos$LocalResourceProto.hashCode(YarnProtos.java:11555)
>> at 
>> org.apache.hadoop.yarn.api.records.impl.pb.LocalResourcePBImpl.hashCode(LocalResourcePBImpl.java:62)
>> at java.util.HashMap.hash(HashMap.java:338)
>> at java.util.HashMap.put(HashMap.java:611)
>>
>> The problem is proto3 doesn't keep backward compatibility with proto2. 
>> hashLong is no longer exists in generated code with proto3. Now I faced a 
>> deed situation that neither proto2 nor proto3 can be loaded when i run a 
>>  mapreduce job.
>>
> It seems the problem is that your binary depends on both proto2 Java 
> runtime and also proto3 Java runtime. One of them will be shadowed by the 
> other and you will see such runtime errors. The suggestion is to stick with 
> one version through out your project (including all your project's 
> dependencies).
>  
>
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Protocol Buffers" 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 http://groups.google.com/group/protobuf.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+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.


[protobuf] proto3 backward compatibility problem

2015-09-06 Thread sam sun
I use proto3 to log user event and then run a mapreduce to stat same 
metrics. But it reports an error:

Exception in thread "Thread-2" java.lang.NoSuchMethodError: 
org.apache.hadoop.yarn.proto.YarnProtos$LocalResourceProto.hashLong(J)I
at 
org.apache.hadoop.yarn.proto.YarnProtos$LocalResourceProto.hashCode(YarnProtos.java:11555)
at 
org.apache.hadoop.yarn.api.records.impl.pb.LocalResourcePBImpl.hashCode(LocalResourcePBImpl.java:62)
at java.util.HashMap.hash(HashMap.java:338)
at java.util.HashMap.put(HashMap.java:611)

The problem is proto3 doesn't keep backward compatibility with proto2. 
hashLong is no longer exists in generated code with proto3. Now I faced a 
deed situation that neither proto2 nor proto3 can be loaded when i run a 
 mapreduce job.


-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+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.


[protobuf] protobuf3 backward compatibility

2015-09-06 Thread sam sun
I used proto3 to serialize events,  and when i run mapreduce to read it , 
an error  was raised:

java.lang.NoSuchMethodError: 
org.apache.hadoop.yarn.proto.YarnProtos$LocalResourceProto.hashLong(J)I
at org.apache.hadoop.yarn.proto.YarnProtos$LocalResourceProto.hashCode

The problem is that i need proto3 to deserialize log, but yarn needs 
proto2. however proto3 doesn't keep backward compatibility ... 
Since i need some features only included in proto3(like map), It seems that 
i have no solution now.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+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.