@Override public void loadState(final Graph graph, final Configuration configuration) { this.memoryKey = configuration.getString(PAGE_RANK_MEMORY_KEY, DEFAULT_MEMORY_KEY); }
@Override public void loadState(final Graph graph, final Configuration configuration) { this.memoryKey = configuration.getString(SHORTEST_DISTANCE_MEMORY_KEY, DEFAULT_MEMORY_KEY); }
@Override public String getInstanceId() { return _instanceDataManagerConfiguration.getString(INSTANCE_ID); }
@Override public String getConsumerDir() { return _instanceDataManagerConfiguration.getString(CONSUMER_DIR); }
@Override public String getInstanceSegmentTarDir() { return _instanceDataManagerConfiguration.getString(INSTANCE_SEGMENT_TAR_DIR); }
@Override public String getAvgMultiValueCount() { return _instanceDataManagerConfiguration.getString(AVERAGE_MV_COUNT, null); }
@Override public void loadState(final Graph graph, final Configuration configuration) { this.memoryKey = configuration.getString(PAGE_RANK_MEMORY_KEY, DEFAULT_MEMORY_KEY); }
@Override public String getInstanceDataDir() { return _instanceDataManagerConfiguration.getString(INSTANCE_DATA_DIR); }
@Override public String getInstanceBootstrapSegmentDir() { return _instanceDataManagerConfiguration.getString(INSTANCE_BOOTSTRAP_SEGMENT_DIR); }
private void setupHelixSystemProperties() { final String helixFlappingTimeWindowPropName = "helixmanager.flappingTimeWindow"; System.setProperty(helixFlappingTimeWindowPropName, _pinotHelixProperties .getString(DefaultHelixBrokerConfig.HELIX_FLAPPING_TIME_WINDOW_NAME, DefaultHelixBrokerConfig.DEFAULT_HELIX_FLAPPING_TIMEIWINDWOW_MS)); }
private void setupHelixSystemProperties(Configuration conf) { // [PINOT-2435] [PINOT-3927] Disable helix detection of flapping connection // Helix will shutdown and effectively remove the instance from cluster if // it detects flapping while the process continues to run // Helix ignores the value if it is <= 0. Hence, setting time window to small value // and number of connection failures within that window to high value System.setProperty(CommonConstants.Helix.HELIX_MANAGER_FLAPPING_TIME_WINDOW_KEY, conf.getString(CommonConstants.Helix.CONFIG_OF_HELIX_FLAPPING_TIMEWINDOW_MS, CommonConstants.Helix.DEFAULT_HELIX_FLAPPING_TIMEWINDOW_MS)); System.setProperty(CommonConstants.Helix.HELIX_MANAGER_MAX_DISCONNECT_THRESHOLD_KEY, conf.getString(CommonConstants.Helix.CONFIG_OF_HELIX_MAX_DISCONNECT_THRESHOLD, CommonConstants.Helix.DEFAULT_HELIX_FLAPPING_MAX_DISCONNECT_THRESHOLD)); }
public ClientSSLContextGenerator(Configuration sslConfig) { if (sslConfig.getBoolean(CONFIG_OF_ENABLE_SERVER_VERIFICATION, true)) { _serverCACertFile = sslConfig.getString(CONFIG_OF_SERVER_CA_CERT); } else { _serverCACertFile = null; LOGGER.warn("Https Server CA file not configured.. All servers will be trusted!"); } _keyStoreFile = sslConfig.getString(CONFIG_OF_CLIENT_PKCS12_FILE); _keyStorePassword = sslConfig.getString(CONFIG_OF_CLIENT_PKCS12_PASSWORD); if ((_keyStorePassword == null && _keyStoreFile != null) || (_keyStorePassword != null && _keyStoreFile == null)) { throw new IllegalArgumentException("Invalid configuration of keystore file and passowrd"); } }
@Override public void init(org.apache.commons.configuration.Configuration configs) { try { _retryCount = configs.getInt(RETRY, _retryCount); _retryWaitMs = configs.getInt(RETRY_WAITIME_MS, _retryWaitMs); Configuration hadoopConf = getConf(configs.getString(HADOOP_CONF_PATH)); authenticate(hadoopConf, configs); _hadoopFS = FileSystem.get(hadoopConf); LOGGER.info("successfully initialized hdfs segment fetcher"); } catch (Exception e) { LOGGER.error("failed to initialized the hdfs segment fetcher", e); } }
private BrokerRequestHandler buildRequestHandler() { String requestHandlerType = _config.getString(REQUEST_HANDLER_TYPE_CONFIG, DEFAULT_REQUEST_HANDLER_TYPE); if (requestHandlerType.equalsIgnoreCase(SINGLE_CONNECTION_REQUEST_HANDLER_TYPE)) { LOGGER.info("Using SingleConnectionBrokerRequestHandler"); return new SingleConnectionBrokerRequestHandler(_config, _routingTable, _timeBoundaryService, _accessControlFactory, _tableQueryQuotaManager, _brokerMetrics); } else { LOGGER.info("Using ConnectionPoolBrokerRequestHandler"); return new ConnectionPoolBrokerRequestHandler(_config, _routingTable, _timeBoundaryService, _accessControlFactory, _tableQueryQuotaManager, _brokerMetrics, _liveInstanceChangeListener, _metricsRegistry); } }
@Override public Optional<String> get(String key, Optional<String> language, Object... params) { Configuration configuration = getLanguageConfigurationForLocale(language); String value = configuration.getString(key); if (value != null) { MessageFormat messageFormat = getMessageFormatForLocale(value, language); return Optional.of(messageFormat.format(params)); } else { return Optional.empty(); } }
@Override public void loadState(final Graph graph, final Configuration configuration) { maxDepth = configuration.getInt(MAX_DEPTH); seed = configuration.getLong(SEED); weightProperty = configuration.getString(WEIGHT_PROPERTY, "distance"); incidentMessageScope = MessageScope.Local.of(__::inE, (msg, edge) -> msg + edge.<Integer>value(weightProperty)); log.debug("Loaded maxDepth={}", maxDepth); }
@Override public void loadState(final Graph graph, final Configuration configuration) { maxDepth = configuration.getInt(MAX_DEPTH); seed = configuration.getLong(SEED); weightProperty = configuration.getString(WEIGHT_PROPERTY, "distance"); incidentMessageScope = MessageScope.Local.of(__::inE, (msg, edge) -> msg + edge.<Integer>value(weightProperty)); log.debug("Loaded maxDepth={}", maxDepth); }
@Override public void init(Configuration config) { Assert.assertTrue(config.containsKey(CONFIG_SUBSET_KEY)); Assert.assertTrue(config.getString(CONFIG_SUBSET_KEY).equalsIgnoreCase(SAMPLE_KEYMAP_VAL)); }
public MinionStarter(String zkAddress, String helixClusterName, Configuration config) throws Exception { _helixClusterName = helixClusterName; _config = config; _instanceId = config.getString(CommonConstants.Helix.Instance.INSTANCE_ID_KEY, CommonConstants.Minion.INSTANCE_PREFIX + NetUtil.getHostAddress() + "_" + CommonConstants.Minion.DEFAULT_HELIX_PORT); _helixManager = new ZKHelixManager(_helixClusterName, _instanceId, InstanceType.PARTICIPANT, zkAddress); _taskExecutorFactoryRegistry = new TaskExecutorFactoryRegistry(); _eventObserverFactoryRegistry = new EventObserverFactoryRegistry(); }
public void init(Configuration cfg) { if (cfg.containsKey(ROUTING_MODE_KEY)) { _routingMode = RoutingMode.valueOf(cfg.getString(ROUTING_MODE_KEY)); } if ((_routingMode == RoutingMode.CONFIG)) { _cfgBasedRouting.init(cfg.subset(CFG_BASED_ROUTING)); } Configuration connPoolCfg = cfg.subset(CONNECTION_POOL_CONFIG); if (connPoolCfg != null) { _connPool.init(connPoolCfg); } }