Rylander
Rylander

Reputation: 20129

What happens when you do not close an HBase table?

I am considering creating a HBase table when my application starts up and leaving it open as long as my application is running. My application may run indefinitely.

What happens if I never close the HBase table?

I have HBase The Definitive Guide but I have not found the information I am looking for in there. If there are any online references for this then please provide them.

Upvotes: 3

Views: 2587

Answers (2)

Alexis Gamarra
Alexis Gamarra

Reputation: 4422

This was extracted from "HBase in Action" page 25:

"Closing the table when you’re finished with it allows the underlying connection resources to be returned to the pool."

Upvotes: 2

shutty
shutty

Reputation: 3338

This blog post is about timeouts in HBase. Generally speaking, there is a lot of them:

  • ZK session timeout (zookeeper.session.timeout)
  • RPC timeout (hbase.rpc.timeout)
  • RecoverableZookeeper retry count and retry wait (zookeeper.recovery.retry, zookeeper.recovery.retry.intervalmill)
  • Client retry count and wait (hbase.client.retries.number, hbase.client.pause)

You may try to raise them a bit and set a really high value for retry count. This can make your sessions be alive for a very long period of time.

When the system of HBase client crashed, the connection is closed by timeout.

Upvotes: 0

Related Questions