use of com.thinkbiganalytics.nifi.rest.model.NiFiClusterSummary in project kylo by Teradata.
the class NifiIntegrationRestController method getAbout.
@GET
@Path("/status")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Retrieves details about NiFi.")
@ApiResponses({ @ApiResponse(code = 200, message = "Returns details about NiFi.", response = AboutDTO.class), @ApiResponse(code = 500, message = "NiFi is unavailable.", response = RestResponseStatus.class) })
public Response getAbout() {
final AboutDTO about = nifiRestClient.about();
final NiFiClusterSummary clusterSummary = nifiRestClient.clusterSummary();
return Response.ok(ImmutableMap.of("version", about.getVersion(), "clustered", clusterSummary.getClustered())).build();
}
use of com.thinkbiganalytics.nifi.rest.model.NiFiClusterSummary in project kylo by Teradata.
the class NiFiRestClientV1 method clusterSummary.
@Nonnull
@Override
public NiFiClusterSummary clusterSummary() {
final ClusterSummaryDTO dto = get("/flow/cluster/summary", null, ClusteSummaryEntity.class).getClusterSummary();
final NiFiClusterSummary clusterSummary = new NiFiClusterSummary();
clusterSummary.setClustered(dto.getClustered());
clusterSummary.setConnectedNodeCount(dto.getConnectedNodeCount());
clusterSummary.setConnectedNodes(dto.getConnectedNodes());
clusterSummary.setConnectedToCluster(dto.getConnectedToCluster());
clusterSummary.setTotalNodeCount(dto.getTotalNodeCount());
return clusterSummary;
}
use of com.thinkbiganalytics.nifi.rest.model.NiFiClusterSummary in project kylo by Teradata.
the class ImportReusableTemplate method isClustered.
private boolean isClustered() {
if (clustered == null) {
NiFiClusterSummary clusterSummary = nifiRestClient.getNiFiRestClient().clusterSummary();
clustered = clusterSummary.getClustered();
}
return clustered != null ? clustered : false;
}
Aggregations