Pierre Villard created NIFI-3393: ------------------------------------ Summary: REST API - Inconsistency on /controller/cluster/nodes/{id} Key: NIFI-3393 URL: https://issues.apache.org/jira/browse/NIFI-3393 Project: Apache NiFi Issue Type: Bug Components: Extensions Reporter: Pierre Villard Priority: Minor
According to which node is requested through the REST API, the end point {noformat} /controller/cluster/nodes/{id} {noformat} will not return the same result. This is due to the fact that in {{ControllerResource}}, the request is not replicated to the cluster coordinator. If this is not the expected behavior, the following code should be added: {noformat} if (isReplicateRequest()) { return replicate(HttpMethod.GET, getClusterCoordinatorNode()); } {noformat} At the moment, if requesting the cluster coordinator, I get something like: {noformat} {u'node': {u'status': u'CONNECTED', u'roles': [], u'nodeId': u'd403e2c0-44a7-4c1c-aaa4-fed2ee3d6993', u'apiPort': 8443, u'events': [.....], u'nodeStartTime': u'01/25/2017 10:21:38 CET', u'address': u'node-1', u'heartbeat': u'01/25/2017 11:24:47 CET', u'queued': u'0 / 0 bytes', u'activeThreadCount': 0}} {noformat} And, on another node: {noformat} {u'node': {u'status': u'CONNECTED', u'roles': [], u'nodeId': u'd403e2c0-44a7-4c1c-aaa4-fed2ee3d6993', u'apiPort': 8443, u'address': u'node-1', u'events': []}} {noformat} In other words, all this part is missing: {noformat} // only connected nodes have heartbeats if (nodeHeartbeat != null) { final Date heartbeat = new Date(nodeHeartbeat.getTimestamp()); nodeDto.setHeartbeat(heartbeat); nodeDto.setNodeStartTime(new Date(nodeHeartbeat.getSystemStartTime())); nodeDto.setActiveThreadCount(nodeHeartbeat.getActiveThreadCount()); nodeDto.setQueued(FormatUtils.formatCount(nodeHeartbeat.getFlowFileCount()) + " / " + FormatUtils.formatDataSize(nodeHeartbeat.getFlowFileBytes())); } {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)