hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-1669) need dynamic extensibility of HBaseRPC code maps and interface lists
Date Fri, 17 Jul 2009 19:48:14 GMT

    [ https://issues.apache.org/jira/browse/HBASE-1669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732703#action_12732703
] 

Andrew Purtell commented on HBASE-1669:
---------------------------------------

Can the class loading order be guaranteed to be stable for all client and server instances?
What if some contribs are used somewhere and other combinations of them are used elsewhere?
If not, you'll have code mis-matches. On the server an interface code might map to some other
interface than is the client's expectation. This is why I suggested an approach that uses
annotations, e.g.

{code}
import org.apache.hadoop.hbase.ipc.Interface;

@Interface(code=1000)
public interface TransactionalRegionInterface extends HRegionInterface {

[...]
{code}

> need dynamic extensibility of HBaseRPC code maps and interface lists
> --------------------------------------------------------------------
>
>                 Key: HBASE-1669
>                 URL: https://issues.apache.org/jira/browse/HBASE-1669
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>             Fix For: 0.20.0
>
>         Attachments: 1588.patch
>
>
> From https://issues.apache.org/jira/browse/HBASE-1588?focusedCommentId=12732675&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12732675
> {quote}
> Now RPC does not work for the transactional interface. I see thinks like:
> [17/07/09 11:34:59] 26052 [or: SeedService] ERROR org.apache.hadoop.ipc.HbaseRPC - Unsupported
type beginTransaction
> Caused by: java.lang.UnsupportedOperationException: No code for unexpected abort
> at org.apache.hadoop.hbase.ipc.HBaseRPC$Invocation.writeMethodNameCode(HBaseRPC.java:225)
> at org.apache.hadoop.hbase.ipc.HBaseRPC$Invocation.write(HBaseRPC.java:152)
> at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.sendParam(HBaseClient.java:475)
> at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:708)
> at org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:321)
> at $Proxy18.abort(Unknown Source)
> at org.apache.hadoop.hbase.client.transactional.TransactionManager.abort(TransactionManager.java:214)
> at org.apache.hadoop.hbase.client.transactional.TransactionManager.abort(TransactionManager.java:198)
> Looking at HBaseRPC, it seems the interfaces are added in a static block inside of Invocation.
Is there a way to add my interface from contrib?
> {quote}
> Maybe we can rig up something which uses annotations to mark RPC interfaces and associate
an integer code with them, and then scan all classes on the classpath from a static initializer
or constructor in HBaseRPC? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message