Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

SaveReportingTask Scheduler Significance?

SaveReportingTask Scheduler Significance?

New Contributor

Hello,

We are using NiFi and came to know that above scheduler i.e SaveReportingTask is running in every 500 milliseconds, Would like to understand the significance of this scheduler and what would be the ideal scenario for a very large template.

Also noticed from thread dump that this thread is running for a longer time and also leading to high CPU Usage.

Class: StandardFlowService

@Override public void start() throws LifeCycleStartException { writeLock.lock(); try { if (isRunning()) { return; } running.set(true); final ScheduledExecutorService newExecutor = new FlowEngine(2, "Flow Service Tasks"); newExecutor.scheduleWithFixedDelay(new SaveReportingTask(), 0L, 500L, TimeUnit.MILLISECONDS); this.executor.set(newExecutor); if (configuredForClustering) { senderListener.start(); } } catch (final IOException ioe) { try { stop(/* force */true); } catch (final Exception e) { } throw new LifeCycleStartException("Failed to start Flow Service due to: " + ioe, ioe); } finally { writeLock.unlock(); } }

Don't have an account?
Coming from Hortonworks? Activate your account here