Add protobuf bindings to syspath
This commit is contained in:
parent
28bf84fa46
commit
42fde2c6e7
@ -32,6 +32,7 @@ import os
|
|||||||
from prometheus_client import start_http_server, Summary
|
from prometheus_client import start_http_server, Summary
|
||||||
from prometheus_client.core import GaugeMetricFamily, REGISTRY
|
from prometheus_client.core import GaugeMetricFamily, REGISTRY
|
||||||
from prometheus_client import Gauge
|
from prometheus_client import Gauge
|
||||||
|
#import pybase
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
import requests
|
import requests
|
||||||
@ -42,7 +43,10 @@ import sys
|
|||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
import xml.etree.ElementTree as et
|
import xml.etree.ElementTree as et
|
||||||
from protobuf.ZooKeeper_pb2 import Master as pbMaster
|
sys.path.append('/usr/local/lib/hbase-protobuf-python')
|
||||||
|
sys.path.append('/usr/local/lib/hbase-protobuf-python/server')
|
||||||
|
sys.path.append('/usr/local/lib/hbase-protobuf-python/server/zookeeper')
|
||||||
|
from ZooKeeper_pb2 import Master as pbMaster
|
||||||
|
|
||||||
tmp_path = '/tmp/'
|
tmp_path = '/tmp/'
|
||||||
logpath = tmp_path
|
logpath = tmp_path
|
||||||
@ -368,6 +372,8 @@ class hbase_exporter():
|
|||||||
prom_hbase_healthy.set(0)
|
prom_hbase_healthy.set(0)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
prom_hbase_up.set(1)
|
||||||
|
|
||||||
self.stale_regions_in_transition(hbase_active_master)
|
self.stale_regions_in_transition(hbase_active_master)
|
||||||
msg = 'hbase: {0} stale regions in transition '\
|
msg = 'hbase: {0} stale regions in transition '\
|
||||||
.format(self.num_regions_in_transition_stale)
|
.format(self.num_regions_in_transition_stale)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user