Esempio n. 1
0
def initFromZk():
    if getRack():
        logger.info("getRack() called success")
    else:
        logger.error("getRack() called failed, need check now")
        return False

    if getAllVolume():
        logger.info("getAllVolume() called success")
    else:
        logger.info("getAllVolume() called failed, need check now")
        return False

    if getAllGroup():
        logger.info("getAllGroup() called success")
    else:
        logger.info("getAllGroup() called failed, need check now")
        return False

    return True
Esempio n. 2
0
def initFromZk():
	if getRack():
		logger.info("getRack() called success")
	else:
		logger.error("getRack() called failed, need check now")
		return False

	if getAllVolume():
		logger.info("getAllVolume() called success")
	else:
		logger.info("getAllVolume() called failed, need check now")
		return False

	if getAllGroup():
		logger.info("getAllGroup() called success")
	else:
		logger.info("getAllGroup() called failed, need check now")
		return False

	return True
Esempio n. 3
0
def initBfsData():
    from zk_client import initFromZk
    if initFromZk():
        logger.info("initFromZk() is called, success")
    else:
        logger.error("initFromZk() is called, failed")
        return False

    from store_client import initFromStore
    for store_ip in IP_TO_STORE:
        if initFromStore(store_ip):
            logger.info("initFromStore() is called, success")
        else:
            logger.info("initFromStore() is called, failed")
            return False

    logger.info("initBfsData() is called, success")
    return True
Esempio n. 4
0
def initBfsData():
	from zk_client import initFromZk
	if initFromZk():
		logger.info("initFromZk() is called, success")
	else:
		logger.error("initFromZk() is called, failed")
		return False

	from store_client import initFromStore
	for store_ip in IP_TO_STORE:
		if initFromStore(store_ip):
			logger.info("initFromStore() is called, success")
		else:
			logger.info("initFromStore() is called, failed")
			return False

	logger.info("initBfsData() is called, success")
	return True
Esempio n. 5
0
 def watcher(event):
     logger.info("/rack children changed, need update memory")
     getRack()
Esempio n. 6
0
		def watcher(event):
			logger.info("/rack children changed, need update memory")
			getRack()