/** * Coordinator initialization. */ protected void initialize(Properties props) { this.zkHeartBeatEnabled = Boolean.TRUE.toString().equalsIgnoreCase( props.getProperty(GuaguaConstants.GUAGUA_ZK_HEARTBEAT_ENABLED, Boolean.FALSE.toString())); checkAndSetZooKeeper(props); setSleepTime(NumberFormatUtils.getLong(props.getProperty(GuaguaConstants.GUAGUA_COORDINATOR_SLEEP_UNIT), WAIT_SLOT_MILLS)); setFixedTime(Boolean.TRUE.toString().equalsIgnoreCase( props.getProperty(GuaguaConstants.GUAGUA_COORDINATOR_FIXED_SLEEP_ENABLE, GuaguaConstants.GUAGUA_COORDINATOR_FIXED_SLEEP))); this.threadPool = Executors.newFixedThreadPool(Integer.parseInt(props.getProperty( "guagua.master.result.thread.number", 8 + ""))); }