You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by "kulkarni.swarnim@gmail.com" <ku...@gmail.com> on 2012/12/11 15:39:16 UTC

Thrift backward compatibility

Hello,

I just had a quick question about backward compatibility of thrift. As far
as my understanding goes, thrift does not guarantee backward compatibility
over generated classes but compatibility is guaranteed over-the-wire
generated binary stuff.

So, for instance, if I understand this right, I can still use thrift 0.8 to
deserialize data generated with thrift 0.9? I have tried this locally
without any issues. But still wanted to confirm that I wasn't missing
anything.

Thanks,

-- 
Swarnim

Re: Thrift backward compatibility

Posted by "kulkarni.swarnim@gmail.com" <ku...@gmail.com>.
> I have tried this locally without any issues

Guess I spoke too soon. I found that "unions" are not really backward
compatible. I had a union type defined in my thrift definition and I
serialized it with thrift 0.9. However, when I tried to use thrift 0.8 to
deserialize it, I got the following exception:

Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.thrift.EncodingUtils.setBit(BIZ)B

Any ideas on what might be wrong?


On Tue, Dec 11, 2012 at 10:07 AM, Jake Farrell <jf...@apache.org> wrote:

> Yes, you are correct.
>
> -Jake
>
>   kulkarni.swarnim@gmail.com
>  December 11, 2012 9:39 AM
> Hello,
>
> I just had a quick question about backward compatibility of thrift. As far
> as my understanding goes, thrift does not guarantee backward compatibility
> over generated classes but compatibility is guaranteed over-the-wire
> generated binary stuff.
>
> So, for instance, if I understand this right, I can still use thrift 0.8 to
> deserialize data generated with thrift 0.9? I have tried this locally
> without any issues. But still wanted to confirm that I wasn't missing
> anything.
>
> Thanks,
>
>


-- 
Swarnim

Re: Thrift backward compatibility

Posted by Jake Farrell <jf...@apache.org>.
Yes, you are correct.

-Jake

> kulkarni.swarnim@gmail.com <ma...@gmail.com>
> December 11, 2012 9:39 AM
> Hello,
>
> I just had a quick question about backward compatibility of thrift. As far
> as my understanding goes, thrift does not guarantee backward compatibility
> over generated classes but compatibility is guaranteed over-the-wire
> generated binary stuff.
>
> So, for instance, if I understand this right, I can still use thrift 
> 0.8 to
> deserialize data generated with thrift 0.9? I have tried this locally
> without any issues. But still wanted to confirm that I wasn't missing
> anything.
>
> Thanks,
>