Search in sources :

Example 1 with ActiveThreadInfo

use of org.apache.nifi.controller.ActiveThreadInfo in project nifi by apache.

the class DtoFactory method createThreadDumpDtos.

private List<ThreadDumpDTO> createThreadDumpDtos(final ProcessorNode procNode) {
    final List<ThreadDumpDTO> threadDumps = new ArrayList<>();
    final List<ActiveThreadInfo> activeThreads = procNode.getActiveThreads();
    for (final ActiveThreadInfo threadInfo : activeThreads) {
        final ThreadDumpDTO dto = new ThreadDumpDTO();
        dto.setStackTrace(threadInfo.getStackTrace());
        dto.setThreadActiveMillis(threadInfo.getActiveMillis());
        dto.setThreadName(threadInfo.getThreadName());
        dto.setTaskTerminated(threadInfo.isTerminated());
        threadDumps.add(dto);
    }
    return threadDumps;
}
Also used : ThreadDumpDTO(org.apache.nifi.web.api.dto.diagnostics.ThreadDumpDTO) ActiveThreadInfo(org.apache.nifi.controller.ActiveThreadInfo) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 ActiveThreadInfo (org.apache.nifi.controller.ActiveThreadInfo)1 ThreadDumpDTO (org.apache.nifi.web.api.dto.diagnostics.ThreadDumpDTO)1