[ 
https://issues.apache.org/jira/browse/NIFI-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16368020#comment-16368020
 ] 

ASF GitHub Bot commented on NIFI-4872:
--------------------------------------

Github user jtstorck commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2475#discussion_r168895945
  
    --- Diff: 
nifi-api/src/main/java/org/apache/nifi/annotation/behavior/HighResourceUsageScenario.java
 ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.nifi.annotation.behavior;
    +
    +import java.lang.annotation.Documented;
    +import java.lang.annotation.ElementType;
    +import java.lang.annotation.Inherited;
    +import java.lang.annotation.Repeatable;
    +import java.lang.annotation.Retention;
    +import java.lang.annotation.RetentionPolicy;
    +import java.lang.annotation.Target;
    +
    +/**
    + * Annotation that may be placed on a
    + * {@link org.apache.nifi.components.ConfigurableComponent Component} 
indicating that this
    + * component may cause high usage of a resource.
    + */
    +@Documented
    +@Target({ElementType.TYPE})
    +@Retention(RetentionPolicy.RUNTIME)
    +@Inherited
    +@Repeatable(HighResourceUsageScenarios.class)
    +public @interface HighResourceUsageScenario {
    --- End diff --
    
    I'm not tied to any of the names of classes that I've used so far.  
SystemResourceConsideration sounds good to me, especially since it has a wider 
range of meaning than just specifying higher resource usage.


> NIFI component high resource usage annotation
> ---------------------------------------------
>
>                 Key: NIFI-4872
>                 URL: https://issues.apache.org/jira/browse/NIFI-4872
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Core Framework, Core UI
>    Affects Versions: 1.5.0
>            Reporter: Jeff Storck
>            Assignee: Jeff Storck
>            Priority: Critical
>
> NiFi Processors currently have no means to relay whether or not they have may 
> be resource intensive or not. The idea here would be to introduce an 
> Annotation that can be added to Processors that indicate they may cause high 
> memory, disk, CPU, or network usage. For instance, any Processor that reads 
> the FlowFile contents into memory (like many XML Processors for instance) may 
> cause high memory usage. What ultimately determines if there is high 
> memory/disk/cpu/network usage will depend on the FlowFiles being processed. 
> With many of these components in the dataflow, it increases the risk of 
> OutOfMemoryErrors and performance degradation.
> The annotation should support one value from a fixed list of: CPU, Disk, 
> Memory, Network.  It should also allow the developer to provide a custom 
> description of the scenario that the component would fall under the high 
> usage category.  The annotation should be able to be specified multiple 
> times, for as many resources as it has the potential to be high usage.
> By marking components with this new Annotation, we can update the generated 
> Processor documentation to include this fact.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to