public CustomProcessorInfo addCustomProcessorInfoAsBundle(CustomProcessorInfo customProcessorInfo, InputStream jarFile) throws IOException,
ComponentConfigException, NoSuchAlgorithmException {
List<QueryParam> queryParams = new ArrayList<>();
queryParams.add(new QueryParam(CustomProcessorInfo.NAME, customProcessorInfo.getName()));
Collection<TopologyComponentBundle> result = this.listCustomProcessorBundlesWithFilter(queryParams);
if (!result.isEmpty()) {
throw new IOException("Custom processor already exists with name:" + customProcessorInfo.getName());
}
this.handleCustomProcessorJar(jarFile, customProcessorInfo, true);
TopologyComponentBundle topologyComponentBundle = customProcessorInfo.toTopologyComponentBundle();
this.addTopologyComponentBundle(topologyComponentBundle, null);
return customProcessorInfo;
}