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

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

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

    https://github.com/apache/nifi/pull/2468#discussion_r173513519
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
 ---
    @@ -3116,6 +3135,312 @@ public ResourceDTO createResourceDto(final Resource 
resource) {
             return dto;
         }
     
    +    /**
    +     * Creates a ProcessorDiagnosticsDTO from the given Processor and 
status information with some additional supporting information
    +     *
    +     * @param procNode the processor to create diagnostics for
    +     * @param procStatus the status of given processor
    +     * @param bulletinRepo the bulletin repository
    +     * @param flowController flowController
    +     * @param serviceEntityFactory function for creating a 
ControllerServiceEntity from a given ID
    +     * @return ProcessorDiagnosticsDTO for the given Processor
    +     */
    +    public ProcessorDiagnosticsDTO createProcessorDiagnosticsDto(final 
ProcessorNode procNode, final ProcessorStatus procStatus, final 
BulletinRepository bulletinRepo,
    +            final FlowController flowController, final Function<String, 
ControllerServiceEntity> serviceEntityFactory) {
    +
    +        final ProcessorDiagnosticsDTO procDiagnostics = new 
ProcessorDiagnosticsDTO();
    +
    +        
procDiagnostics.setClassLoaderDiagnostics(createClassLoaderDiagnosticsDto(procNode));
    +        
procDiagnostics.setIncomingConnections(procNode.getIncomingConnections().stream()
    +            .map(this::createConnectionDiagnosticsDto)
    +            .collect(Collectors.toSet()));
    +        
procDiagnostics.setOutgoingConnections(procNode.getConnections().stream()
    +            .map(this::createConnectionDiagnosticsDto)
    +            .collect(Collectors.toSet()));
    +        
procDiagnostics.setJvmDiagnostics(createJvmDiagnosticsDto(flowController));
    +        procDiagnostics.setProcessor(createProcessorDto(procNode));
    +        
procDiagnostics.setProcessorStatus(createProcessorStatusDto(procStatus));
    +        procDiagnostics.setThreadDumps(createThreadDumpDtos(procNode));
    --- End diff --
    
    Should thread dumps and classloader diagnostics also require system 
permissions?


> Add REST Endpoint for gathering Processor Diagnostics information
> -----------------------------------------------------------------
>
>                 Key: NIFI-4849
>                 URL: https://issues.apache.org/jira/browse/NIFI-4849
>             Project: Apache NiFi
>          Issue Type: Sub-task
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>             Fix For: 1.6.0
>
>
> We need to add a REST endpoint that will use the appropriate resources to 
> gather the Processor Diagnostics information. Information to return should 
> include things like:
>  * Processor config
>  * Processor status
>  * Garbage Collection info
>  * Repo Sizes
>  * Connection info for connections whose source or destination is the 
> processor
>  * Controller Services that the processor is referencing



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

Reply via email to