public int getWebThreads() { return getIntegerProperty(WEB_THREADS, DEFAULT_WEB_THREADS); }
public int getSwapInThreads() { return getIntegerProperty(SWAP_IN_THREADS, DEFAULT_SWAP_IN_THREADS); }
public int getClusterNodeMaxConcurrentRequests() { return getIntegerProperty(CLUSTER_NODE_MAX_CONCURRENT_REQUESTS, DEFAULT_CLUSTER_NODE_MAX_CONCURRENT_REQUESTS); }
public Integer getFlowElectionMaxCandidates() { return getIntegerProperty(FLOW_ELECTION_MAX_CANDIDATES, null); }
public Integer getFlowConfigurationArchiveMaxCount() { return getIntegerProperty(FLOW_CONFIGURATION_ARCHIVE_MAX_COUNT, null); }
public VolatileComponentStatusRepository(final NiFiProperties nifiProperties) { numDataPoints = nifiProperties.getIntegerProperty(NUM_DATA_POINTS_PROPERTY, DEFAULT_NUM_DATA_POINTS); gcStatuses = new RingBuffer<>(numDataPoints); timestamps = new RingBuffer<>(numDataPoints); }
public VolatileProvenanceRepository(final NiFiProperties nifiProperties) { maxSize = nifiProperties.getIntegerProperty(BUFFER_SIZE, DEFAULT_BUFFER_SIZE); ringBuffer = new RingBuffer<>(maxSize); final String indexedFieldString = nifiProperties.getProperty(NiFiProperties.PROVENANCE_INDEXED_FIELDS); final String indexedAttrString = nifiProperties.getProperty(NiFiProperties.PROVENANCE_INDEXED_ATTRIBUTES); searchableFields = Collections.unmodifiableList(SearchableFieldParser.extractSearchableFields(indexedFieldString, true)); searchableAttributes = Collections.unmodifiableList(SearchableFieldParser.extractSearchableFields(indexedAttrString, false)); final ThreadFactory defaultThreadFactory = Executors.defaultThreadFactory(); queryExecService = Executors.newFixedThreadPool(2, new ThreadFactory() { private final AtomicInteger counter = new AtomicInteger(0); @Override public Thread newThread(final Runnable r) { final Thread thread = defaultThreadFactory.newThread(r); thread.setName("Provenance Query Thread-" + counter.incrementAndGet()); return thread; } }); scheduledExecService = Executors.newScheduledThreadPool(2); }
public InetSocketAddress getClusterLoadBalanceAddress() { try { String address = getProperty(LOAD_BALANCE_ADDRESS); if (StringUtils.isBlank(address)) { address = getProperty(CLUSTER_NODE_ADDRESS); } if (StringUtils.isBlank(address)) { address = "localhost"; } final int port = getIntegerProperty(LOAD_BALANCE_PORT, DEFAULT_LOAD_BALANCE_PORT); return InetSocketAddress.createUnresolved(address, port); } catch (final Exception e) { throw new RuntimeException("Invalid load balance address/port due to: " + e, e); } }
final Integer port = getIntegerProperty(propertyKey, null); if (port == null) { throw new RuntimeException("Remote input HTTP" + (isSiteToSiteSecure() ? "S" : "")
final String rolloverSize = nifiProperties.getProperty(NiFiProperties.PROVENANCE_ROLLOVER_SIZE, "100 MB"); final String shardSize = nifiProperties.getProperty(NiFiProperties.PROVENANCE_INDEX_SHARD_SIZE, "500 MB"); final int queryThreads = nifiProperties.getIntegerProperty(NiFiProperties.PROVENANCE_QUERY_THREAD_POOL_SIZE, 2); final int indexThreads = nifiProperties.getIntegerProperty(NiFiProperties.PROVENANCE_INDEX_THREAD_POOL_SIZE, 2); final int journalCount = nifiProperties.getIntegerProperty(NiFiProperties.PROVENANCE_JOURNAL_COUNT, 16); final int concurrentMergeThreads = nifiProperties.getIntegerProperty(CONCURRENT_MERGE_THREADS, 2); final String warmCacheFrequency = nifiProperties.getProperty(WARM_CACHE_FREQUENCY); config.setDebugFrequency(nifiProperties.getIntegerProperty(NiFiProperties.PROVENANCE_REPO_DEBUG_FREQUENCY, config.getDebugFrequency()));
final LoadBalanceProtocol loadBalanceProtocol = new StandardLoadBalanceProtocol(flowFileRepo, contentRepository, provenanceRepository, this, authorizeConnection); final int numThreads = nifiProperties.getIntegerProperty(NiFiProperties.LOAD_BALANCE_MAX_THREAD_COUNT, NiFiProperties.DEFAULT_LOAD_BALANCE_MAX_THREAD_COUNT); final String timeoutPeriod = nifiProperties.getProperty(NiFiProperties.LOAD_BALANCE_COMMS_TIMEOUT, NiFiProperties.DEFAULT_LOAD_BALANCE_COMMS_TIMEOUT); final int timeoutMillis = (int) FormatUtils.getTimeDuration(timeoutPeriod, TimeUnit.MILLISECONDS); final int connectionsPerNode = nifiProperties.getIntegerProperty(NiFiProperties.LOAD_BALANCE_CONNECTIONS_PER_NODE, NiFiProperties.DEFAULT_LOAD_BALANCE_CONNECTIONS_PER_NODE); final NioAsyncLoadBalanceClientFactory asyncClientFactory = new NioAsyncLoadBalanceClientFactory(sslContext, timeoutMillis, new ContentRepositoryFlowFileAccess(contentRepository), eventReporter, new StandardLoadBalanceFlowFileCodec()); loadBalanceClientRegistry = new NioAsyncLoadBalanceClientRegistry(asyncClientFactory, connectionsPerNode); final int loadBalanceClientThreadCount = nifiProperties.getIntegerProperty(NiFiProperties.LOAD_BALANCE_MAX_THREAD_COUNT, NiFiProperties.DEFAULT_LOAD_BALANCE_MAX_THREAD_COUNT); loadBalanceClientThreadPool = new FlowEngine(loadBalanceClientThreadCount, "Load-Balanced Client", true);
public int getSwapInThreads() { return getIntegerProperty(SWAP_IN_THREADS, DEFAULT_SWAP_IN_THREADS); }
public Integer getFlowConfigurationArchiveMaxCount() { return getIntegerProperty(FLOW_CONFIGURATION_ARCHIVE_MAX_COUNT, null); }
public int getWebThreads() { return getIntegerProperty(WEB_THREADS, DEFAULT_WEB_THREADS); }
public int getClusterNodeMaxConcurrentRequests() { return getIntegerProperty(CLUSTER_NODE_MAX_CONCURRENT_REQUESTS, DEFAULT_CLUSTER_NODE_MAX_CONCURRENT_REQUESTS); }
public Integer getFlowElectionMaxCandidates() { return getIntegerProperty(FLOW_ELECTION_MAX_CANDIDATES, null); }
public InetSocketAddress getClusterLoadBalanceAddress() { try { String address = getProperty(LOAD_BALANCE_ADDRESS); if (StringUtils.isBlank(address)) { address = getProperty(CLUSTER_NODE_ADDRESS); } if (StringUtils.isBlank(address)) { address = "localhost"; } final int port = getIntegerProperty(LOAD_BALANCE_PORT, DEFAULT_LOAD_BALANCE_PORT); return InetSocketAddress.createUnresolved(address, port); } catch (final Exception e) { throw new RuntimeException("Invalid load balance address/port due to: " + e, e); } }
final Integer port = getIntegerProperty(propertyKey, null); if (port == null) { throw new RuntimeException("Remote input HTTP" + (isSiteToSiteSecure() ? "S" : "")