HBase special case

Thanks for sharing the platform- http://bjbsair.com/2020-04-10/tech-info/53327.html

For applications that fail faster than wait

  • In the client's hbase-site.xml, set the following parameters:

  • Set hbase.client.pause = 1000

  • Set hbase.client.retries.number = 3

  • If you want to move across divisions and regions, increase hbase.client.retries.number substantially (> = 20)

  • Set the RecoverableZookeeper retry count: zookeeper.recovery.retry = 1 (do not retry)

  • On the server side of hbase-site.xml, set the Zookeeper session timeout to detect server failure: zookeeper.session.timeout⇐30 seconds (20-30 recommended)

For apps that can tolerate slightly outdated information

HBase Timeline Consistency (HBASE-10070) When Read Replica is enabled, the Read Replicas of regions (replicas) will be distributed in the cluster. A RegionServer serves the default or master copy, which is the only copy that can be serviced. Other Region Servers serve auxiliary copies, please follow the main RegionServer and only view the submitted updates. Auxiliary replicas are read-only, but can provide read operations immediately when the primary server fails, thereby reducing the time interval for read availability from seconds to milliseconds. Phoenix supports tips for timeline consistency of 4.4.0:

  • Deploy HBase 1.0.0 or higher.
  • Enable timeline consistent copies on the server side.
  • Use one of the following methods to set the timeline consistency:

  • 使用 ALTER SESSION SET CONSISTENCY = 'TIMELINE’

  • Set the connection property Consistency to timeline in the JDBC connection string

Guess you like

Origin blog.51cto.com/14744108/2486387