protected void createChronixStorage(ControllerServiceInitializationContext context) throws ProcessException { if (updater != null) { return; } // setup a thread pool of solr updaters int batchSize = context.getPropertyValue(BATCH_SIZE).asInteger(); long flushInterval = context.getPropertyValue(FLUSH_INTERVAL).asLong(); updater = new ChronixUpdater(solr, queue, createMetricsTypeMapping(context), batchSize, flushInterval); executorService.execute(updater); }
private boolean has_domain_flag(String domain, String flag, ProcessContext context, Record record){ final String source_of_traffic_suffix = context.getPropertyValue(SOURCE_OF_TRAFFIC_SUFFIX_FIELD).asString(); final long cacheValidityPeriodSec = context.getPropertyValue(CONFIG_CACHE_VALIDITY_TIMEOUT).asLong(); boolean has_flag = false;
/** * set up BackoffPolicy */ private BackoffPolicy getBackOffPolicy(ControllerServiceInitializationContext context) { BackoffPolicy backoffPolicy = BackoffPolicy.exponentialBackoff(); if (context.getPropertyValue(BULK_BACK_OFF_POLICY).getRawValue().equals(DEFAULT_EXPONENTIAL_BACKOFF_POLICY.getValue())) { backoffPolicy = BackoffPolicy.exponentialBackoff(); } else if (context.getPropertyValue(BULK_BACK_OFF_POLICY).getRawValue().equals(EXPONENTIAL_BACKOFF_POLICY.getValue())) { backoffPolicy = BackoffPolicy.exponentialBackoff( TimeValue.timeValueMillis(context.getPropertyValue(BULK_THROTTLING_DELAY).asLong()), context.getPropertyValue(BULK_RETRY_NUMBER).asInteger() ); } else if (context.getPropertyValue(BULK_BACK_OFF_POLICY).getRawValue().equals(CONSTANT_BACKOFF_POLICY.getValue())) { backoffPolicy = BackoffPolicy.constantBackoff( TimeValue.timeValueMillis(context.getPropertyValue(BULK_THROTTLING_DELAY).asLong()), context.getPropertyValue(BULK_RETRY_NUMBER).asInteger() ); } else if (context.getPropertyValue(BULK_BACK_OFF_POLICY).getRawValue().equals(NO_BACKOFF_POLICY.getValue())) { backoffPolicy = BackoffPolicy.noBackoff(); } return backoffPolicy; }
long flushInterval = context.getPropertyValue(FLUSH_INTERVAL).asLong(); updaters = new ArrayList<>(numConcurrentRequests); for (int i = 0; i < numConcurrentRequests; i++) {
if (durationBeetwenLastUpdateInMs > context.getPropertyValue(MIN_UPDATE_TIME_MS).asLong()) {
long session_inactivity_timeout = context.getPropertyValue(SESSION_INACTIVITY_TIMEOUT).asLong(); String sessionid_field = context.getPropertyValue(SESSION_ID_FIELD).asString(); String timestamp_field = context.getPropertyValue(TIMESTAMP_FIELD).asString();
long session_inactivity_timeout = context.getPropertyValue(SESSION_INACTIVITY_TIMEOUT).asLong(); String sessionid_field = context.getPropertyValue(SESSION_ID_FIELD).asString(); String timestamp_field = context.getPropertyValue(TIMESTAMP_FIELD).asString();
Long maxCpuTime = context.getPropertyValue(MAX_CPU_TIME).asLong(); Long maxMemory = context.getPropertyValue(MAX_MEMORY).asLong(); Boolean allowNoBrace = context.getPropertyValue(ALLOw_NO_BRACE).asBoolean(); Integer maxPreparedStatements = context.getPropertyValue(MAX_PREPARED_STATEMENTS).asInteger();
outlierConfig.getChunkingPolicy().setAmount(context.getPropertyValue(CHUNKING_POLICY_AMOUNT).asLong()); switch (context.getPropertyValue(CHUNKING_POLICY_TYPE).asString().toLowerCase()) { case "by_time": outlierConfig.getRotationPolicy().setAmount(context.getPropertyValue(ROTATION_POLICY_AMOUNT).asLong()); switch (context.getPropertyValue(ROTATION_POLICY_TYPE).asString().toLowerCase()) { case "by_time": outlierConfig.getConfig().put( SketchyMovingMAD.MIN_AMOUNT_TO_PREDICT, context.getPropertyValue(MIN_AMOUNT_TO_PREDICT).asLong());