private void updateConfig() { long now = System.currentTimeMillis(); if (this.conf == null || now > (lastConfigUpdate + CONFIG_UPDATE_FREQUENCY)) { try { CConfiguration conf = cConfReader.read(); if (conf != null) { this.conf = conf; LOG.info("Reloaded CConfiguration at {}", now); this.lastConfigUpdate = now; long configUpdateFrequency = conf.getLong(QueueConstants.QUEUE_CONFIG_UPDATE_FREQUENCY, QueueConstants.DEFAULT_QUEUE_CONFIG_UPDATE_FREQUENCY); LOG.info("Will reload consumer config cache every {} seconds", configUpdateFrequency); this.configCacheUpdateFrequency = configUpdateFrequency * 1000; } } catch (IOException ioe) { LOG.error("Error reading default configuration table", ioe); } } }
if (now > (lastUpdated + cConfUpdatePeriodInMillis)) { try { CConfiguration newCConf = cConfReader.read(); if (newCConf != null) { Configuration newConf = new Configuration();
if (now > (lastUpdated + cConfUpdatePeriodInMillis)) { try { CConfiguration newCConf = cConfReader.read(); if (newCConf != null) { Configuration newConf = new Configuration();
@Override protected Configuration getSnapshotConfiguration() throws IOException { CConfiguration cConf = configReader.read(); Configuration txConf = HBaseConfiguration.create(getConf()); CConfigurationUtil.copyTxProperties(cConf, txConf); // Set the instance id so that it gets logged setId(cConf.get(Constants.INSTANCE_NAME)); return txConf; } }
@Override protected Configuration getSnapshotConfiguration() throws IOException { CConfiguration cConf = configReader.read(); Configuration txConf = HBaseConfiguration.create(getConf()); CConfigurationUtil.copyTxProperties(cConf, txConf); // Set the instance id so that it gets logged setId(cConf.get(Constants.INSTANCE_NAME)); return txConf; } }
long topicCount = 0; try { CConfiguration cConf = cConfReader.read(); if (cConf != null) { this.cConf = cConf;
long topicCount = 0; try { CConfiguration cConf = cConfReader.read(); if (cConf != null) { this.cConf = cConf;