hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "honghua zhu (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-5007) HBaseAdmin.stopRegionServer do not stop the region server
Date Sun, 11 Dec 2011 05:55:40 GMT
HBaseAdmin.stopRegionServer do not stop the region server

                 Key: HBASE-5007
                 URL: https://issues.apache.org/jira/browse/HBASE-5007
             Project: HBase
          Issue Type: Bug
          Components: ipc
    Affects Versions: 0.92.0
         Environment: all
            Reporter: honghua zhu
             Fix For: 0.92.0

Please running this example:

public class Test {
  public static void main(String[] args) throws Exception {
    HBaseAdmin admin = new HBaseAdmin(HBaseConfiguration.create());

then, you can see:

Exception in thread "main" java.lang.RuntimeException: The interface org.apache.hadoop.hbase.Stoppable
    at org.apache.hadoop.hbase.ipc.Invocation.<init>(Invocation.java:61)
    at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:151)
    at $Proxy2.stop(Unknown Source)
    at org.apache.hadoop.hbase.client.HBaseAdmin.stopRegionServer(HBaseAdmin.java:1492)
    at Test.main(Test.java:7)
Caused by: java.lang.NoSuchFieldException: VERSION
    at java.lang.Class.getField(Class.java:1520)
    at org.apache.hadoop.hbase.ipc.Invocation.<init>(Invocation.java:57)
    ... 4 more

When invoking the "HBaseAdmin.stopRegionServer" method,
we obtain a "proxy" for org.apache.hadoop.hbase.ipc.HRegionInterface,
(HRegionInterface extends org.apache.hadoop.hbase.Stoppable)
but the "stop" method declared in Stoppable.

In the constructor of "org.apache.hadoop.hbase.ipc.Invocation",
the "method" argument is "public abstract void org.apache.hadoop.hbase.Stoppable.stop(java.lang.String)",
so, "method.getDeclaringClass()" is "org.apache.hadoop.hbase.Stoppable",
but, the "Stoppable" interface no "VERSION" field.

[fix suggestion]:

Override the "stop" method in org.apache.hadoop.hbase.ipc.HRegionInterface as follows:
public void stop(String why);

of courese, another attempt is ok.
(e.g. declare "VERSION" field in Stoppable interface,
then modify some code fragment of Invocation and org.apache.hadoop.hbase.ipc.WritableRpcEngine.Server)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message