4

My project use bottle and HBase, client connect to HBase via python thrift client, code simplify like this

#!/usr/bin/env python

from bottle import route, run, default_app, request

client = HBaseClient()

@route('/', method='POST')
def index():
    data = client.getdata()
    return data

Now the issue is if client disconnect, our request will be failed. So it requires to make sure client keep alive.

One solution is using connection pool, is there any connection pool I can refer to?

Any other solution for this issue?

4

2 回答 2

1

看起来happybase可以解决这个问题

于 2013-05-27T01:26:14.743 回答
0

HappyBase 有一个连接池,它试图在一定程度上处理断开的连接:http: //happybase.readthedocs.org/en/latest/user.html#using-the-connection-pool

于 2014-07-19T19:50:26.183 回答