Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase, mail # user - Endpoint Coprocessor Protocol and implementation versioning


Copy link to this message
-
Endpoint Coprocessor Protocol and implementation versioning
Asaf Mesika 2013-10-17, 19:18
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!
+
Ted Yu 2013-10-17, 23:06