hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toby Lazar <tla...@capitaltg.com>
Subject closing hbase resources for webapp
Date Mon, 03 Mar 2014 21:21:15 GMT
I am working on an HBase webapp and Tomcat is telling me I have a memory
leak, which I have confirmed, but I'm not sure how to fix it.  I've reduced
my app to a single jsp that calls a single method (both are included below
since they are short).  After I reload my application, Tomcat detects that
I may have a memory leak, leading me to think I should be doing something
else when closing an HConnection.  I tried the deprecated
HConnectionManager.deleteConnection(config) without any luck.

I am using Hadoop 2.2/HBase 0.96 client jars and running it on Tomcat
7.0.47/JVM 1.7.0_45 on CentOS 6.5.

Any ideas what I'm missing or how to work around this?



JSP is:

<%@page import="foobar.Test"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
<%out.println(Test.hello()); %>

Java method in the Test class is:

public static String hello() throws IOException{
 Configuration config = HBaseConfiguration.create();
HConnection connection = HConnectionManager.createConnection(config);
HTableInterface table = connection.getTable("sometable");
return "hellosay";

  Toby Lazar
  Capital Technology Group
  Email: tlazar@capitaltg.com
  Mobile: 646-469-5865

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message