diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusteSummaryEntity.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterSummaryEntity.java similarity index 96% rename from nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusteSummaryEntity.java rename to nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterSummaryEntity.java index d2631200c2fa..e81177793c54 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusteSummaryEntity.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ClusterSummaryEntity.java @@ -24,7 +24,7 @@ * A serialized representation of this class can be placed in the entity body of a request or response to or from the API. This particular entity holds a reference to a ClusterSummaryDTO. */ @XmlRootElement(name = "clusterSummaryEntity") -public class ClusteSummaryEntity extends Entity { +public class ClusterSummaryEntity extends Entity { private ClusterSummaryDTO clusterSummary; diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java index ddad726a14fe..916d47270bee 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java @@ -75,8 +75,8 @@ import org.apache.nifi.web.api.entity.ActivateControllerServicesEntity; import org.apache.nifi.web.api.entity.BannerEntity; import org.apache.nifi.web.api.entity.BulletinBoardEntity; -import org.apache.nifi.web.api.entity.ClusteSummaryEntity; import org.apache.nifi.web.api.entity.ClusterSearchResultsEntity; +import org.apache.nifi.web.api.entity.ClusterSummaryEntity; import org.apache.nifi.web.api.entity.ComponentHistoryEntity; import org.apache.nifi.web.api.entity.ConnectionStatisticsEntity; import org.apache.nifi.web.api.entity.ConnectionStatusEntity; @@ -1211,7 +1211,7 @@ public Response getControllerStatus() throws InterruptedException { @Path("cluster/summary") @ApiOperation( value = "The cluster summary for this NiFi", - response = ClusteSummaryEntity.class, + response = ClusterSummaryEntity.class, authorizations = { @Authorization(value = "Read - /flow") } @@ -1249,7 +1249,7 @@ public Response getClusterSummary() { clusterConfiguration.setConnectedToCluster(isConnectedToCluster()); // create the response entity - final ClusteSummaryEntity entity = new ClusteSummaryEntity(); + final ClusterSummaryEntity entity = new ClusterSummaryEntity(); entity.setClusterSummary(clusterConfiguration); // generate the response diff --git a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/NiFiSystemIT.java b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/NiFiSystemIT.java index 5168a152c5e0..227bcf9647eb 100644 --- a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/NiFiSystemIT.java +++ b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/NiFiSystemIT.java @@ -26,8 +26,8 @@ import org.apache.nifi.web.api.dto.NodeDTO; import org.apache.nifi.web.api.dto.status.ConnectionStatusSnapshotDTO; import org.apache.nifi.web.api.dto.status.ProcessGroupStatusSnapshotDTO; -import org.apache.nifi.web.api.entity.ClusteSummaryEntity; import org.apache.nifi.web.api.entity.ClusterEntity; +import org.apache.nifi.web.api.entity.ClusterSummaryEntity; import org.apache.nifi.web.api.entity.ConnectionEntity; import org.apache.nifi.web.api.entity.ConnectionStatusEntity; import org.apache.nifi.web.api.entity.ConnectionStatusSnapshotEntity; @@ -268,7 +268,7 @@ protected void waitForAllNodesConnected(final int expectedNumberOfNodes, final l while (true) { int connectedNodeCount = -1; try { - final ClusteSummaryEntity clusterSummary = client.getFlowClient().getClusterSummary(); + final ClusterSummaryEntity clusterSummary = client.getFlowClient().getClusterSummary(); connectedNodeCount = clusterSummary.getClusterSummary().getConnectedNodeCount(); if (connectedNodeCount == expectedNumberOfNodes) { logger.info("Wait successful, {} nodes connected", expectedNumberOfNodes); diff --git a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/NodeRestartWithNewNodeIdIT.java b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/NodeRestartWithNewNodeIdIT.java index c558e2662e43..61b555fbf6ee 100644 --- a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/NodeRestartWithNewNodeIdIT.java +++ b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/NodeRestartWithNewNodeIdIT.java @@ -21,7 +21,7 @@ import org.apache.nifi.tests.system.NiFiSystemIT; import org.apache.nifi.toolkit.cli.impl.client.nifi.NiFiClientException; import org.apache.nifi.web.api.dto.NodeDTO; -import org.apache.nifi.web.api.entity.ClusteSummaryEntity; +import org.apache.nifi.web.api.entity.ClusterSummaryEntity; import org.junit.jupiter.api.Test; import java.io.File; @@ -57,7 +57,7 @@ public void testRestartNodeWithDifferentNodeId() throws IOException, NiFiClientE // Wait for the second node to reconnect. waitForAllNodesConnected(); - final ClusteSummaryEntity clusterSummary = getNifiClient().getFlowClient().getClusterSummary(); + final ClusterSummaryEntity clusterSummary = getNifiClient().getFlowClient().getClusterSummary(); // 2/2 because we replaced the state directory with a different state that had a different identifier. This will result in // 2 nodes each with a different UUID but the same hostname & port, but we should see that the cluster removes the old Node // Identifier, so we will have only 2 nodes total. diff --git a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/RestartWithDifferentPort.java b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/RestartWithDifferentPort.java index b9126df4920d..c6ccb7c2262a 100644 --- a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/RestartWithDifferentPort.java +++ b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/RestartWithDifferentPort.java @@ -21,8 +21,8 @@ import org.apache.nifi.tests.system.NiFiSystemIT; import org.apache.nifi.toolkit.cli.impl.client.nifi.NiFiClientException; import org.apache.nifi.web.api.dto.NodeDTO; -import org.apache.nifi.web.api.entity.ClusteSummaryEntity; import org.apache.nifi.web.api.entity.ClusterEntity; +import org.apache.nifi.web.api.entity.ClusterSummaryEntity; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -58,7 +58,7 @@ public void testRestartWithDifferentPortKeepsNodeIdUnchanged() throws IOExceptio waitForAllNodesConnected(getNumberOfNodes(true), 2000L); // Wait for the second node to reconnect. - final ClusteSummaryEntity clusterSummary = getNifiClient().getFlowClient().getClusterSummary(); + final ClusterSummaryEntity clusterSummary = getNifiClient().getFlowClient().getClusterSummary(); assertEquals("2 / 2", clusterSummary.getClusterSummary().getConnectedNodes()); // Ensure that the Node UUID's are the same and that we now have 2 nodes: localhost:5671 and localhost:5673, but NOT localhost:5672 diff --git a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/SimpleNodeRestartIT.java b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/SimpleNodeRestartIT.java index 2a8ff9000730..141a9b3ed6e1 100644 --- a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/SimpleNodeRestartIT.java +++ b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/clustering/SimpleNodeRestartIT.java @@ -20,7 +20,7 @@ import org.apache.nifi.tests.system.NiFiInstanceFactory; import org.apache.nifi.tests.system.NiFiSystemIT; import org.apache.nifi.toolkit.cli.impl.client.nifi.NiFiClientException; -import org.apache.nifi.web.api.entity.ClusteSummaryEntity; +import org.apache.nifi.web.api.entity.ClusterSummaryEntity; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -43,7 +43,7 @@ public void testRestartNode() throws NiFiClientException, IOException { secondNode.start(); waitForAllNodesConnected(); - final ClusteSummaryEntity clusterSummary = getNifiClient().getFlowClient().getClusterSummary(); + final ClusterSummaryEntity clusterSummary = getNifiClient().getFlowClient().getClusterSummary(); assertEquals("2 / 2", clusterSummary.getClusterSummary().getConnectedNodes()); } } diff --git a/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/client/nifi/FlowClient.java b/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/client/nifi/FlowClient.java index ef1231b15a8a..3946be72a9c2 100644 --- a/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/client/nifi/FlowClient.java +++ b/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/client/nifi/FlowClient.java @@ -18,7 +18,7 @@ import org.apache.nifi.flow.VersionedReportingTaskSnapshot; import org.apache.nifi.web.api.entity.ActivateControllerServicesEntity; -import org.apache.nifi.web.api.entity.ClusteSummaryEntity; +import org.apache.nifi.web.api.entity.ClusterSummaryEntity; import org.apache.nifi.web.api.entity.ConnectionStatusEntity; import org.apache.nifi.web.api.entity.ControllerServicesEntity; import org.apache.nifi.web.api.entity.CurrentUserEntity; @@ -107,7 +107,7 @@ VersionedFlowSnapshotMetadataSetEntity getVersions(String registryId, String buc * * @return cluster summary response */ - ClusteSummaryEntity getClusterSummary() throws NiFiClientException, IOException; + ClusterSummaryEntity getClusterSummary() throws NiFiClientException, IOException; /** * Retrieves the controller services for the reporting tasks. diff --git a/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/client/nifi/impl/JerseyFlowClient.java b/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/client/nifi/impl/JerseyFlowClient.java index 8065ed6cca5c..369c953a85f4 100644 --- a/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/client/nifi/impl/JerseyFlowClient.java +++ b/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/client/nifi/impl/JerseyFlowClient.java @@ -26,7 +26,7 @@ import org.apache.nifi.web.api.dto.flow.FlowDTO; import org.apache.nifi.web.api.dto.flow.ProcessGroupFlowDTO; import org.apache.nifi.web.api.entity.ActivateControllerServicesEntity; -import org.apache.nifi.web.api.entity.ClusteSummaryEntity; +import org.apache.nifi.web.api.entity.ClusterSummaryEntity; import org.apache.nifi.web.api.entity.ComponentEntity; import org.apache.nifi.web.api.entity.ConnectionStatusEntity; import org.apache.nifi.web.api.entity.ControllerServicesEntity; @@ -224,10 +224,10 @@ public ActivateControllerServicesEntity activateControllerServices(final Activat } @Override - public ClusteSummaryEntity getClusterSummary() throws NiFiClientException, IOException { + public ClusterSummaryEntity getClusterSummary() throws NiFiClientException, IOException { return executeAction("Error retrieving cluster summary", () -> { final WebTarget target = flowTarget.path("cluster/summary"); - return getRequestBuilder(target).get(ClusteSummaryEntity.class); + return getRequestBuilder(target).get(ClusterSummaryEntity.class); }); } diff --git a/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/command/nifi/flow/ClusterSummary.java b/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/command/nifi/flow/ClusterSummary.java index 98c6453294db..f24e2e5ce46d 100644 --- a/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/command/nifi/flow/ClusterSummary.java +++ b/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/command/nifi/flow/ClusterSummary.java @@ -21,7 +21,7 @@ import org.apache.nifi.toolkit.cli.impl.client.nifi.NiFiClientException; import org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand; import org.apache.nifi.toolkit.cli.impl.result.nifi.ClusterSummaryEntityResult; -import org.apache.nifi.web.api.entity.ClusteSummaryEntity; +import org.apache.nifi.web.api.entity.ClusterSummaryEntity; import java.io.IOException; import java.util.Properties; @@ -41,7 +41,7 @@ public String getDescription() { public ClusterSummaryEntityResult doExecute(NiFiClient client, Properties properties) throws NiFiClientException, IOException { final FlowClient flowClient = client.getFlowClient(); - final ClusteSummaryEntity clusterSummary = flowClient.getClusterSummary(); + final ClusterSummaryEntity clusterSummary = flowClient.getClusterSummary(); return new ClusterSummaryEntityResult(getResultType(properties), clusterSummary); } } diff --git a/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/result/nifi/ClusterSummaryEntityResult.java b/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/result/nifi/ClusterSummaryEntityResult.java index 7b7bfb4f1b13..504b4a148b34 100644 --- a/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/result/nifi/ClusterSummaryEntityResult.java +++ b/nifi-toolkit/nifi-toolkit-cli/src/main/java/org/apache/nifi/toolkit/cli/impl/result/nifi/ClusterSummaryEntityResult.java @@ -18,7 +18,7 @@ import org.apache.nifi.toolkit.cli.api.ResultType; import org.apache.nifi.toolkit.cli.impl.result.AbstractWritableResult; -import org.apache.nifi.web.api.entity.ClusteSummaryEntity; +import org.apache.nifi.web.api.entity.ClusterSummaryEntity; import java.io.PrintStream; import java.util.Objects; @@ -26,17 +26,17 @@ /** * Result for CurrentUserEntity from NiFi. */ -public class ClusterSummaryEntityResult extends AbstractWritableResult { +public class ClusterSummaryEntityResult extends AbstractWritableResult { - private final ClusteSummaryEntity clusteSummaryEntity; + private final ClusterSummaryEntity clusteSummaryEntity; - public ClusterSummaryEntityResult(final ResultType resultType, final ClusteSummaryEntity clusteSummaryEntity) { + public ClusterSummaryEntityResult(final ResultType resultType, final ClusterSummaryEntity clusteSummaryEntity) { super(resultType); this.clusteSummaryEntity = Objects.requireNonNull(clusteSummaryEntity); } @Override - public ClusteSummaryEntity getResult() { + public ClusterSummaryEntity getResult() { return clusteSummaryEntity; }