Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-1303

Secondary index configuration prevents HBase from starting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.19.1
    • 0.19.2, 0.20.0
    • regionserver
    • None

    Description

      HBase does not start up when configured to use the IndexedRegionServer with the following properties in hbase-site.xml

       <property>
           <name>hbase.regionserver.class</name>
           <value>org.apache.hadoop.hbase.ipc.IndexedRegionInterface</value>
           <description>Indexing is enabled for this hbase server.  </description>
       </property>
       <property>
          <name>hbase.regionserver.impl</name>
          <value>org.apache.hadoop.hbase.regionserver.tableindexed.IndexedRegionServer</value>
          <description>Indexing is enabled for this hbase server.</description>
      </property>
      

      This results in the following exception in the log:

      2009-03-31 12:33:35,993 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 8 on 45026, call getProtocolVersion(org.apache.hadoop.hbase.ipc.IndexedRegionInterface, 16) from 127.0.0.1:60854: error: java.io.IOException: Unknown protocol to name node: org.apache.hadoop.hbase.ipc.IndexedRegionInterface
      java.io.IOException: Unknown protocol to name node: org.apache.hadoop.hbase.ipc.IndexedRegionInterface
          at org.apache.hadoop.hbase.regionserver.HRegionServer.getProtocolVersion(HRegionServer.java:2146)
          at org.apache.hadoop.hbase.regionserver.transactional.TransactionalRegionServer.getProtocolVersion(TransactionalRegionServer.java:92)
          at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:632)
          at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:912)
      2009-03-31 12:33:35,994 WARN org.apache.hadoop.hbase.master.BaseScanner: Scan ROOT region
      java.io.IOException: java.io.IOException: Unknown protocol to name node: org.apache.hadoop.hbase.ipc.IndexedRegionInterface
          at org.apache.hadoop.hbase.regionserver.HRegionServer.getProtocolVersion(HRegionServer.java:2146)
          at org.apache.hadoop.hbase.regionserver.transactional.TransactionalRegionServer.getProtocolVersion(TransactionalRegionServer.java:92)
          at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:632)
          at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:912)
      

      There is also a mailing list post on this problem:
      http://markmail.org/message/6pugle5uegiijjbc?q=Secondary+Indexes+problem

      I think the solution is to implement public long getProtocolVersion(final String protocol, final long clientVersion) in org.apache.hadoop.hbase.regionserver.tableindexed.IndexedRegionServer as follows:

        @Override
        public long getProtocolVersion(final String protocol, final long clientVersion)
            throws IOException {
          if (protocol.equals(IndexedRegionInterface.class.getName())) {
            return HBaseRPCProtocolVersion.versionID;
          }
          return super.getProtocolVersion(protocol, clientVersion);
        }
      

      Attachments

        1. HBASE-1303_0.19.1.patch
          2 kB
          Ken Weiner

        Activity

          People

            Unassigned Unassigned
            kweiner Ken Weiner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: