use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method removeTopologyProcessor.
public TopologyProcessor removeTopologyProcessor(Long topologyId, Long processorId, Long versionId, boolean removeEdges) {
TopologyProcessor topologyProcessor = getTopologyProcessor(topologyId, processorId, versionId);
if (topologyProcessor != null) {
if (removeEdges) {
removeAllEdges(topologyProcessor);
}
removeProcessorStreamMapping(topologyProcessor);
topologyProcessor = dao.<TopologyProcessor>remove(new StorableKey(TOPOLOGY_PROCESSOR_NAMESPACE, topologyProcessor.getPrimaryKey()));
topologyProcessor.setVersionTimestamp(updateVersionTimestamp(versionId).getTimestamp());
}
return topologyProcessor;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method removeTopologySink.
public TopologySink removeTopologySink(Long topologyId, Long sinkId, Long versionId, boolean removeEdges) {
TopologySink topologySink = getTopologySink(topologyId, sinkId, versionId);
if (topologySink != null) {
if (removeEdges) {
removeAllEdges(topologySink);
}
removeAllTopologyTestSinks(topologySink);
topologySink = dao.<TopologySink>remove(new StorableKey(TOPOLOGY_SINK_NAMESPACE, topologySink.getPrimaryKey()));
topologySink.setVersionTimestamp(updateVersionTimestamp(versionId).getTimestamp());
}
return topologySink;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method getTopologyTestRunCase.
public TopologyTestRunCase getTopologyTestRunCase(Long topologyId, Long testcaseId) {
TopologyTestRunCase testCase = new TopologyTestRunCase();
testCase.setId(testcaseId);
TopologyTestRunCase found = dao.get(new StorableKey(TopologyTestRunCase.NAMESPACE, testCase.getPrimaryKey()));
if (found == null || !found.getTopologyId().equals(topologyId)) {
return null;
}
return found;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method removeTopologyEdge.
public TopologyEdge removeTopologyEdge(Long topologyId, Long edgeId, Long versionId) {
TopologyEdge topologyEdge = getTopologyEdge(topologyId, edgeId, versionId);
if (topologyEdge != null) {
setReconfigureTarget(topologyEdge);
topologyEdge = dao.remove(new StorableKey(TOPOLOGY_EDGE_NAMESPACE, topologyEdge.getPrimaryKey()));
topologyEdge.setVersionTimestamp(updateVersionTimestamp(versionId).getTimestamp());
}
return topologyEdge;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method removeNotifierInfo.
public Notifier removeNotifierInfo(Long notifierId) {
Notifier notifier = new Notifier();
notifier.setId(notifierId);
return dao.remove(new StorableKey(NOTIFIER_INFO_NAMESPACE, notifier.getPrimaryKey()));
}
Aggregations