Henry Hung created HDFS-5566:
--------------------------------

             Summary: HA namenode with QJM created from 
org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider 
should implement Closeable
                 Key: HDFS-5566
                 URL: https://issues.apache.org/jira/browse/HDFS-5566
             Project: Hadoop HDFS
          Issue Type: Bug
         Environment: hadoop-2.2.0
hbase-0.96
            Reporter: Henry Hung


When using hbase-0.96 with hadoop-2.2.0, stopping master/regionserver node will 
result in {{Cannot close proxy - is not Closeable or does not provide closeable 
invocation}}.

[Mail 
Archive|https://drive.google.com/file/d/0B22pkxoqCdvWSGFIaEpfR3lnT2M/edit?usp=sharing]

My hadoop-2.2.0 configured as HA namenode with QJM, the configuration is like 
this:
{code:xml}
  <property>
    <name>dfs.nameservices</name>
    <value>hadoopdev</value>
  </property>
  <property>
    <name>dfs.ha.namenodes.hadoopdev</name>
    <value>nn1,nn2</value>
  </property>
  <property>
    <name>dfs.namenode.rpc-address.hadoopdev.nn1</name>
    <value>fphd9.ctpilot1.com:9000</value>
  </property>
  <property>
    <name>dfs.namenode.http-address.hadoopdev.nn1</name>
    <value>fphd9.ctpilot1.com:50070</value>
  </property>
  <property>
    <name>dfs.namenode.rpc-address.hadoopdev.nn2</name>
    <value>fphd10.ctpilot1.com:9000</value>
  </property>
  <property>
    <name>dfs.namenode.http-address.hadoopdev.nn2</name>
    <value>fphd10.ctpilot1.com:50070</value>
  </property>
  <property>
    <name>dfs.namenode.shared.edits.dir</name>
    
<value>qjournal://fphd8.ctpilot1.com:8485;fphd9.ctpilot1.com:8485;fphd10.ctpilot1.com:8485/hadoopdev</value>
  </property>
  <property>
    <name>dfs.client.failover.proxy.provider.hadoopdev</name>
    
<value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
  </property>
  <property>
    <name>dfs.ha.fencing.methods</name>
    <value>shell(/bin/true)</value>
  </property>
  <property>
    <name>dfs.journalnode.edits.dir</name>
    <value>/data/hadoop/hadoop-data-2/journal</value>
  </property>
  <property>
    <name>dfs.ha.automatic-failover.enabled</name>
    <value>true</value>
  </property>
  <property>
    <name>ha.zookeeper.quorum</name>
    <value>fphd1.ctpilot1.com:2222</value>
  </property>
{code}

I traced the code and found out that when stopping the hbase master node, it 
will try invoke method "close" on namenode, but the instance that created from 
{{org.apache.hadoop.hdfs.NameNodeProxies.createProxy}} with 
failoverProxyProviderClass 
{{org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider}} 
do not have the Closeable interface.

If we use the Non-HA case, the created instance will be 
{{org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB}} that 
implement Closeable.

TL;DR;
With hbase connecting to hadoop HA namenode, when stopping the hbase master or 
regionserver, it couldn't find the {{close}} method to gracefully close 
namenode session.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to