Reputation: 1550
I have a spring Integration project using spring-hadoop. I have an Hbase template as follows,
<beans:bean id="fsh" class="org.springframework.data.hadoop.fs.FsShell">
</beans:bean>
<beans:bean id="hbaseTemplate"
class="org.springframework.data.hadoop.hbase.HbaseTemplate">
<beans:property name="configuration" ref="hdpConfiguration" />
</beans:bean>
Now, when I shutdown the app and the context at the end, it throws a strange error,
o.a.h.hbase.client.HConnectionManager : Connection not found in the list, can't delete it (connection key=HConnectionKey{properties={hbase.zookeeper.quorum=xxx.com,xxx.com, hbase.rpc.timeout=60000, hbase.client.prefetch.limit=10, hbase.zookeeper.property.clientPort=2181, zookeeper.znode.parent=/hbase-secure, hbase.client.retries.number=35, hbase.client.pause=100}, username='[email protected]'}). May be the key was modified?
As I understand, this was an innocuous error and was thrown even in Hadoop 1.x
I have migrated to Hadoop 2.x and Spring-Hadoop-2.0.4 But now, spring throws an Exception which earlier was not thrown,
java.lang.Exception: null at org.apache.hadoop.hbase.client.HConnectionManager.deleteConnection(HConnectionManager.java:488) at org.apache.hadoop.hbase.client.HConnectionManager.deleteConnection(HConnectionManager.java:424) at org.springframework.data.hadoop.hbase.HbaseConfigurationFactoryBean.destroy(HbaseConfigurationFactoryBean.java:80) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:258) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:907) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:914) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:908) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:884) at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:804) 2015-01-22 14:58:20.168 INFO --- [ Thread-11] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 2015-01-22 14:58:20.170 INFO --- [ Thread-11] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler' 2015-01-22 14:58:20.175 INFO --- [ Thread-2] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
Question, how can I trap this error so that it's not shown to the user...
Thanks for any insight.
Upvotes: 3
Views: 1451
Reputation: 1550
I was able to resolve the error, simply by setting delete-connection to false, (default is 'true')
<hbase-configuration configration-ref="hdpConfiguration" delete-connection="false"/>
Upvotes: 4