/** * Creates a new instance of the RocksDBConfig class. * * @param properties The TypedProperties object to read Properties from. */ private RocksDBConfig(TypedProperties properties) throws ConfigurationException { this.databaseDir = properties.get(DATABASE_DIR); this.writeBufferSizeMB = properties.getInt(WRITE_BUFFER_SIZE_MB); this.readCacheSizeMB = properties.getInt(READ_CACHE_SIZE_MB); this.cacheBlockSizeKB = properties.getInt(CACHE_BLOCK_SIZE_KB); }
/** * Creates a new instance of the HDFSStorageConfig class. * * @param properties The TypedProperties object to read Properties from. */ private HDFSStorageConfig(TypedProperties properties) throws ConfigurationException { this.hdfsHostURL = properties.get(URL); this.hdfsRoot = properties.get(ROOT); this.replication = (short) properties.getInt(REPLICATION); this.blockSize = properties.getInt(BLOCK_SIZE); this.replaceDataNodesOnFailure = properties.getBoolean(REPLACE_DATANODES_ON_FAILURE); }
/** * Creates a new instance of the FileSystemStorageConfig class. * * @param properties The TypedProperties object to read Properties from. */ private FileSystemStorageConfig(TypedProperties properties) throws ConfigurationException { this.root = properties.get(ROOT); }
/** * Creates a new instance of the MetricsConfig class. * * @param properties The TypedProperties object to read Properties from. */ private MetricsConfig(TypedProperties properties) throws ConfigurationException { this.enableStatistics = properties.getBoolean(ENABLE_STATISTICS); this.dynamicCacheSize = properties.getLong(DYNAMIC_CACHE_SIZE); this.dynamicCacheEvictionDurationMinutes = Duration.ofMinutes(properties.getInt(DYNAMIC_CACHE_EVICTION_DURATION_MINUTES)); this.statsOutputFrequencySeconds = Duration.ofSeconds(properties.getInt(OUTPUT_FREQUENCY)); this.metricsPrefix = properties.get(METRICS_PREFIX); this.csvEndpoint = properties.get(CSV_ENDPOINT); this.statsDHost = properties.get(STATSD_HOST); this.statsDPort = properties.getInt(STATSD_PORT); this.graphiteHost = properties.get(GRAPHITE_HOST); this.graphitePort = properties.getInt(GRAPHITE_PORT); this.jmxDomain = properties.get(JMX_DOMAIN); this.gangliaHost = properties.get(GANGLIA_HOST); this.gangliaPort = properties.getInt(GANGLIA_PORT); this.enableCSVReporter = properties.getBoolean(ENABLE_CSV_REPORTER); this.enableStatsdReporter = properties.getBoolean(ENABLE_STATSD_REPORTER); this.enableGraphiteReporter = properties.getBoolean(ENABLE_GRAPHITE_REPORTER); this.enableJMXReporter = properties.getBoolean(ENABLE_JMX_REPORTER); this.enableGangliaReporter = properties.getBoolean(ENABLE_GANGLIA_REPORTER); this.enableConsoleReporter = properties.getBoolean(ENABLE_CONSOLE_REPORTER); }
/** * Creates a new instance of the ExtendedS3StorageConfig class. * * @param properties The TypedProperties object to read Properties from. */ private ExtendedS3StorageConfig(TypedProperties properties) throws ConfigurationException { this.root = properties.get(ROOT); this.accessKey = properties.get(ACCESS_KEY_ID); this.secretKey = properties.get(SECRET_KEY); this.url = java.net.URI.create(properties.get(URI)); this.bucket = properties.get(BUCKET); this.namespace = properties.get(NAMESPACE); this.useNoneMatch = properties.getBoolean(USENONEMATCH); }
private SingleNodeConfig(TypedProperties properties) { this.zkPort = properties.getInt(ZK_PORT); this.segmentStorePort = properties.getInt(SEGMENTSTORE_PORT); this.controllerPort = properties.getInt(CONTROLLER_PORT); this.restServerPort = properties.getInt(REST_SERVER_PORT); this.certFile = properties.get(CERT_FILE); this.keyFile = properties.get(KEY_FILE); this.passwdFile = properties.get(PASSWD_FILE); this.userName = properties.get(USER_NAME); this.passwd = properties.get(PASSWD); this.enableRestServer = properties.getBoolean(ENABLE_REST_SERVER); this.enableTls = properties.getBoolean(ENABLE_TLS); this.enableAuth = properties.getBoolean(ENABLE_AUTH); keyStoreJKS = properties.get(KEYSTORE_JKS); keyStoreJKSPassword = properties.get(KEYSTORE_JKS_PASSWORD); }
String ipAddress = properties.get(LISTENING_IP_ADDRESS); if (ipAddress == null || ipAddress.equals(LISTENING_IP_ADDRESS.getDefaultValue())) { String publishedIPAddress = properties.get(PUBLISHED_IP_ADDRESS); if (Strings.isNullOrEmpty(publishedIPAddress)) { this.publishedIPAddress = this.listeningIPAddress; this.zkURL = properties.get(ZK_URL); this.zkRetrySleepMs = properties.getInt(ZK_RETRY_SLEEP_MS); this.zkRetryCount = properties.getInt(ZK_RETRY_COUNT); this.zkSessionTimeoutMs = properties.getInt(ZK_SESSION_TIMEOUT_MS); this.clusterName = properties.get(CLUSTER_NAME); this.dataLogTypeImplementation = properties.getEnum(DATALOG_IMPLEMENTATION, DataLogType.class); this.storageImplementation = properties.getEnum(STORAGE_IMPLEMENTATION, StorageType.class); this.readOnlySegmentStore = properties.getBoolean(READONLY_SEGMENT_STORE); this.secureZK = properties.getBoolean(SECURE_ZK); this.zkTrustStore = properties.get(ZK_TRUSTSTORE_LOCATION); this.zkTrustStorePasswordPath = properties.get(ZK_TRUST_STORE_PASSWORD_PATH); this.enableTls = properties.getBoolean(ENABLE_TLS); this.keyFile = properties.get(KEY_FILE); this.certFile = properties.get(CERT_FILE); long cachePolicyMaxSize = properties.getLong(CACHE_POLICY_MAX_SIZE); int cachePolicyMaxTime = properties.getInt(CACHE_POLICY_MAX_TIME); this.cachePolicy = new CachePolicy(cachePolicyMaxSize, Duration.ofSeconds(cachePolicyMaxTime), Duration.ofSeconds(cachePolicyGenerationTime)); this.replyWithStackTraceOnError = properties.getBoolean(REPLY_WITH_STACK_TRACE_ON_ERROR); this.instanceId = properties.get(INSTANCE_ID);
if (fullyQualifiedPropertyName.startsWith(componentCode)) { if (valueValidator.test(config.get(stringProperty))) {
private AutoScalerConfig(TypedProperties properties) throws ConfigurationException { this.internalRequestStream = properties.get(REQUEST_STREAM); this.cooldownDuration = Duration.ofSeconds(properties.getInt(COOLDOWN_IN_SECONDS)); this.muteDuration = Duration.ofSeconds(properties.getInt(MUTE_IN_SECONDS)); this.cacheCleanup = Duration.ofSeconds(properties.getInt(CACHE_CLEANUP_IN_SECONDS)); this.cacheExpiry = Duration.ofSeconds(properties.getInt(CACHE_EXPIRY_IN_SECONDS)); this.controllerUri = URI.create(properties.get(CONTROLLER_URI)); this.tlsEnabled = properties.getBoolean(TLS_ENABLED); this.authEnabled = properties.getBoolean(AUTH_ENABLED); this.tlsCertFile = properties.get(TLS_CERT_FILE); this.tokenSigningKey = properties.get(TOKEN_SIGNING_KEY); this.validateHostName = properties.getBoolean(VALIDATE_HOSTNAME); }
this.zkAddress = properties.get(ZK_ADDRESS).replace(",", ";"); this.zkSessionTimeout = Duration.ofMillis(properties.getInt(ZK_SESSION_TIMEOUT)); this.zkConnectionTimeout = Duration.ofMillis(properties.getInt(ZK_CONNECTION_TIMEOUT)); this.zkMetadataPath = properties.get(ZK_METADATA_PATH); this.zkHierarchyDepth = properties.getInt(ZK_HIERARCHY_DEPTH); if (this.zkHierarchyDepth < 0) { this.bkLedgerPath = properties.get(BK_LEDGER_PATH); this.bkEnsembleSize = properties.getInt(BK_ENSEMBLE_SIZE); this.bkAckQuorumSize = properties.getInt(BK_ACK_QUORUM_SIZE); this.bkReadTimeoutMillis = properties.getInt(BK_READ_TIMEOUT); this.bkLedgerMaxSize = properties.getInt(BK_LEDGER_MAX_SIZE); this.bkPassword = properties.get(BK_PASSWORD).getBytes(Charset.forName("UTF-8")); this.isTLSEnabled = properties.getBoolean(BK_TLS_ENABLED); this.tlsTrustStore = properties.get(TLS_TRUST_STORE_PATH); this.tlsTrustStorePasswordPath = properties.get(TLS_TRUST_STORE_PASSWORD_PATH);
this.bkBasePort = properties.getInt(BK_BASE_PORT); this.zkPort = properties.getInt(ZK_PORT); this.controllerHost = properties.get(CONTROLLER_HOST); this.controllerBasePort = properties.getInt(CONTROLLER_BASE_PORT); this.segmentStoreBasePort = properties.getInt(SEGMENT_STORE_BASE_PORT); this.testType = TestType.valueOf(properties.get(TEST_TYPE)); this.readsEnabled = properties.getBoolean(READS_ENABLED); this.metricsEnabled = properties.getBoolean(METRICS_ENABLED);