[
https://issues.apache.org/jira/browse/NIFI-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15549959#comment-15549959
]
ASF GitHub Bot commented on NIFI-1526:
--------------------------------------
Github user pvillard31 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1107#discussion_r82070000
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
---
@@ -1059,6 +1060,42 @@ public ProcessorNode createProcessor(final String
type, String id, final boolean
final LogRepository logRepository =
LogRepositoryFactory.getRepository(id);
logRepository.addObserver(StandardProcessorNode.BULLETIN_OBSERVER_ID,
LogLevel.WARN, new ProcessorLogObserver(getBulletinRepository(), procNode));
+ try {
+
+ final Class<?> procClass = processor.getClass();
+ if(procClass.isAnnotationPresent(DefaultSettings.class))
+ {
--- End diff --
There are checkstyle violations to fix:
````
[WARNING]
src/main/java/org/apache/nifi/annotation/configuration/DefaultSchedule.java[5]
(imports) AvoidStarImport: Using the '.*' form of import should be avoided -
java.lang.annotation.*.
[WARNING]
src/main/java/org/apache/nifi/annotation/configuration/DefaultSettings.java[5]
(imports) AvoidStarImport: Using the '.*' form of import should be avoided -
java.lang.annotation.*.
[WARNING]
src/main/java/org/apache/nifi/controller/FlowController.java[1067:13] (blocks)
LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/FlowController.java[1071:17] (blocks)
RightCurly: '}' should be on the same line.
[WARNING]
src/main/java/org/apache/nifi/controller/FlowController.java[1073:17] (blocks)
LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/FlowController.java[1079:17] (blocks)
RightCurly: '}' should be on the same line.
[WARNING]
src/main/java/org/apache/nifi/controller/FlowController.java[1081:17] (blocks)
LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/FlowController.java[1086:17] (blocks)
RightCurly: '}' should be on the same line.
[WARNING]
src/main/java/org/apache/nifi/controller/FlowController.java[1088:17] (blocks)
LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/FlowController.java[1093:9] (blocks)
RightCurly: '}' should be on the same line.
[WARNING]
src/main/java/org/apache/nifi/controller/FlowController.java[1095:9] (blocks)
LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[191:9]
(blocks) LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[194:13]
(blocks) LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[197:17]
(blocks) LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[199:17]
(blocks) RightCurly: '}' should be on the same line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[201:17]
(blocks) LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[205:17]
(blocks) LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[207:17]
(blocks) RightCurly: '}' should be on the same line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[209:17]
(blocks) LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[214:17]
(blocks) LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[216:21]
(blocks) LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[218:21]
(blocks) RightCurly: '}' should be on the same line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[220:21]
(blocks) LeftCurly: '{' should be on the previous line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[226:9]
(blocks) RightCurly: '}' should be on the same line.
[WARNING]
src/main/java/org/apache/nifi/controller/StandardProcessorNode.java[228:9]
(blocks) LeftCurly: '{' should be on the previous line.
````
You can check it by yourself by running:
````
mvn clean install -Pcontrib-check
````
> Allow components to provide default values for Yield Duration and Run Schedule
> ------------------------------------------------------------------------------
>
> Key: NIFI-1526
> URL: https://issues.apache.org/jira/browse/NIFI-1526
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Bryan Bende
> Priority: Minor
>
> It would be nice for developers of processors (and maybe reporting tasks and
> controller services) to be able to specify a default value for Yield duration
> and Run Schedule.
> Currently Yield defaults to 1 second and Run Schedule defaults to 0 seconds.
> There may be cases where these are not the best default values and the
> developer wants to start off with better defaults, still allowing the user to
> tune as needed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)