use of com.hortonworks.streamline.streams.catalog.TopologyProcessor in project streamline by hortonworks.
the class TopologyProcessorCatalogResource method getTopologyProcessorById.
/**
* <p>
* Gets the 'CURRENT' version of specific topology processor by Id. For example,
* </p>
* <b>GET /api/v1/catalog/topologies/:TOPOLOGY_ID/processors/:PROCESSOR_ID</b>
* <pre>
* {
* "responseCode": 1000,
* "responseMessage": "Success",
* "entity": {
* "id": 1,
* "topologyId": 1,
* "name": "ParserProcessor",
* "config": {
* "properties": {
* "parallelism": 1
* }
* },
* "type": "PARSER",
* "outputStreams": [{stream1 data..}, {stream2 data..}]
* }
* }
* </pre>
*/
@GET
@Path("/topologies/{topologyId}/processors/{id}")
@Timed
public Response getTopologyProcessorById(@PathParam("topologyId") Long topologyId, @PathParam("id") Long processorId, @Context SecurityContext securityContext) {
SecurityUtil.checkRoleOrPermissions(authorizer, securityContext, Roles.ROLE_TOPOLOGY_USER, Topology.NAMESPACE, topologyId, READ);
TopologyProcessor source = catalogService.getTopologyProcessor(topologyId, processorId);
if (source != null) {
return WSUtils.respondEntity(source, OK);
}
throw EntityNotFoundException.byId(buildMessageForCompositeId(topologyId, processorId));
}
Aggregations