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); }
/** * 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 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); }
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); }
/** * 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); }
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.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); int cachePolicyGenerationTime = properties.getInt(CACHE_POLICY_GENERATION_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);
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); this.pauseBeforeExit = properties.getBoolean(PAUSE_BEFORE_EXIT); this.enableSecurity = properties.getBoolean(ENABLE_SECURITY); checkOverlappingPorts();