mirror of https://github.com/apache/nifi.git
NIFI-4: Changed @OnEnabled to @OnScheduled for the configuration of services
This commit is contained in:
parent
a4e4af7cba
commit
d0e15f1eef
|
@ -26,7 +26,7 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import org.apache.nifi.annotation.documentation.CapabilityDescription;
|
||||
import org.apache.nifi.annotation.documentation.Tags;
|
||||
import org.apache.nifi.annotation.lifecycle.OnEnabled;
|
||||
import org.apache.nifi.annotation.lifecycle.OnScheduled;
|
||||
import org.apache.nifi.components.PropertyDescriptor;
|
||||
import org.apache.nifi.controller.status.ConnectionStatus;
|
||||
import org.apache.nifi.controller.status.ProcessGroupStatus;
|
||||
|
@ -80,7 +80,7 @@ public class ControllerStatusReportingTask extends AbstractReportingTask {
|
|||
return descriptors;
|
||||
}
|
||||
|
||||
@OnEnabled
|
||||
@OnScheduled
|
||||
public void onConfigured(final ConfigurationContext context) {
|
||||
connectionLineFormat = context.getProperty(SHOW_DELTAS).asBoolean() ? CONNECTION_LINE_FORMAT_WITH_DELTA : CONNECTION_LINE_FORMAT_NO_DELTA;
|
||||
connectionHeader = String.format(connectionLineFormat, "Connection ID", "Source", "Connection Name", "Destination", "Flow Files In", "Flow Files Out", "FlowFiles Queued");
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.regex.Pattern;
|
|||
|
||||
import org.apache.nifi.annotation.documentation.CapabilityDescription;
|
||||
import org.apache.nifi.annotation.documentation.Tags;
|
||||
import org.apache.nifi.annotation.lifecycle.OnEnabled;
|
||||
import org.apache.nifi.annotation.lifecycle.OnScheduled;
|
||||
import org.apache.nifi.components.PropertyDescriptor;
|
||||
import org.apache.nifi.components.ValidationContext;
|
||||
import org.apache.nifi.components.ValidationResult;
|
||||
|
@ -147,7 +147,7 @@ public class MonitorMemory extends AbstractReportingTask {
|
|||
return descriptors;
|
||||
}
|
||||
|
||||
@OnEnabled
|
||||
@OnScheduled
|
||||
public void onConfigured(final ConfigurationContext config) throws InitializationException {
|
||||
final String desiredMemoryPoolName = config.getProperty(MEMORY_POOL_PROPERTY).getValue();
|
||||
final String thresholdValue = config.getProperty(THRESHOLD_PROPERTY).getValue().trim();
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
|
||||
import org.apache.nifi.annotation.documentation.CapabilityDescription;
|
||||
import org.apache.nifi.annotation.documentation.Tags;
|
||||
import org.apache.nifi.annotation.lifecycle.OnEnabled;
|
||||
import org.apache.nifi.annotation.lifecycle.OnScheduled;
|
||||
import org.apache.nifi.components.PropertyDescriptor;
|
||||
import org.apache.nifi.controller.ConfigurationContext;
|
||||
import org.apache.nifi.controller.status.ProcessGroupStatus;
|
||||
|
@ -92,7 +92,7 @@ public class StandardGangliaReporter extends AbstractReportingTask {
|
|||
return properties;
|
||||
}
|
||||
|
||||
@OnEnabled
|
||||
@OnScheduled
|
||||
public void onConfigure(final ConfigurationContext config) throws InitializationException {
|
||||
metricsRegistry = new MetricsRegistry();
|
||||
|
||||
|
|
Loading…
Reference in New Issue