如果hbase页面显示 Region merge are disabled.This may be the result of HBCK aborting while running repair mode.
此时需要设置merge为true,否则执行merge_region合并无效
设置:
splitormerge_switch 'MERGE',true
https://blog.csdn.net/u012551524/article/details/108225466
https://blog.csdn.net/mnasd/article/details/81304249
启动hbase rest服务
/usr/hdp/2.6.5.3008-11/hbase/bin# ./hbase rest start -p 1122
脚本如下:
#!/usr/bin/python
# -*- coding : UTF-8 -*-
# -*-
# v1.0
import requests
import json
if __name__ == '__main__':
HMasterIP = '192.168.123.154'
HMasterPort = '1122'
HBaseTableName = 'default:people'
pre_region_id = ''
response = requests.get('http://{0}:{1}/{2}/regions'.format(HMasterIP, HMasterPort, HBaseTableName),
headers={"Accept": "application/json"})
jsoncontent = json.loads(response.content)
regioncontent = jsoncontent['Region']
i = 0
for region in regioncontent:
endKey = region['endKey']
startKey = reg