hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Endpoint Coprocessor Protocol and implementation versioning
Date Thu, 17 Oct 2013 23:06:17 GMT
When cluster does rolling restart to upgrade servers, you would want to
keep clients working during that period of time.
This means version 2 of the endpoint should implement both methods.

Once cluster is fully upgraded, you can switch the clients over to using
the version 2 protocol.

Cheers


On Thu, Oct 17, 2013 at 12:18 PM, Asaf Mesika <asaf.mesika@gmail.com> wrote:

> Hi,
>
> I'm writing an Endpoint Coprocessor for HBase v0.94.6 (cdh4.3.1).
>
> I'm trying to understand how the CoprocessorProtocol and
> CoprocessorEndPoint implementation versioning works, both backwards and
> forward.
>
> For instance, I have my protocol as:
>
> public interface MyQueryProtocol extends CoprocessorProtocol{
>
>     public static final long VERSION = 1L;
>
>     public MyResult query(int x) throws IOException;
> }
>
> Let's say I have deployed them both at the client and at the Region Server
> (and their respective implementation.
> Now lets say after 0.5 year I've discovered I want to change the method by
> adding another parameter y:
>
> public interface MyQueryProtocol extends CoprocessorProtocol{
>
>     public static final long VERSION = *2L*;
>
>     public MyResult query(int x*, int y*) throws IOException;
> }
>
> Am I suppose to have both the old method and the new method in the
> interface?
> What happens if I update the client first - is it even possible, or is it
> always the order of: server first and then client?
>
> So in essence: How am I supposed to do both in the protocol and endpoint
> implementation in terms of versioning.
>
> Thanks!
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message