def getHbaseMasterNode(cls): ''' Return the host which is HBase master node :return: String- ''' cls._hbase_master = HBase.getMasterNode() if not cls._hbase_master: logger.error( 'HBase is not installed on any of hosts in the cluster') return cls._hbase_master
def resetHBaseRestService(cls, action, user=None, host=None, config=None): from beaver.component.hbase import HBase if user is None: user = Config.get('hbase', 'HBASE_USER') if host is None: host = HBase.getMasterNode() service = "rest" if Machine.isWindows(): service = "hbrest" if action == "start": HBase.resetService(user, host, service, "stop", config=config) HBase.resetService(user, host, service, action, config=config) if action == "start": util.waitForPortToOpen(host, HBase.getRestServicePort())