protected AbstractProcessingElementBuilder(String id, String label, String description, T element) { super(id, label, description, element); this.streamRequirements = new ArrayList<>(); this.stream1Properties = new ArrayList<>(); this.stream2Properties = new ArrayList<>(); this.supportedGrounding = new EventGrounding(); }
protected DataSetBuilder(String id, String label, String description) { super(id, label, description, new SpDataSet()); this.eventProperties = new ArrayList<>(); this.supportedGrounding = new EventGrounding(); }
protected DataStreamBuilder(String id, String label, String description) { super(id, label, description, new SpDataStream()); this.eventProperties = new ArrayList<>(); this.eventGrounding = new EventGrounding(); }
public EventGrounding getEventGrounding() { EventGrounding grounding = new EventGrounding(); grounding.setTransportFormats(Arrays.asList(getFormat())); grounding.setTransportProtocols(Arrays.asList(getProtocol())); return grounding; }
public EventGrounding getEventGrounding() { EventGrounding grounding = new EventGrounding(); grounding.setTransportFormats(Arrays.asList(getFormat())); grounding.setTransportProtocols(Arrays.asList(getProtocol())); return grounding; }
public AdapterDescription() { super(); this.rules = new ArrayList<>(); this.eventGrounding = new EventGrounding(); this.config = new ArrayList<>(); // TODO move to another place TransportProtocol tp = new KafkaTransportProtocol(); tp.setTopicDefinition(new SimpleTopicDefinition("bb")); this.eventGrounding.setTransportProtocol(tp); // this.eventGrounding.setTransportFormats(Arrays.asList(Formats.jsonFormat())); }
public SpDataSet(SpDataSet other) { super(other); this.datasetInvocationId = other.getDatasetInvocationId(); if (other.getSupportedGrounding() != null) this.supportedGrounding = new EventGrounding(other.getSupportedGrounding()); }
public static EventGrounding makeDummyGrounding() { EventGrounding grounding = new EventGrounding(); grounding.setTransportFormats(Arrays.asList(new TransportFormat())); grounding.setTransportProtocol(ProtocolGenerator.makeDummyProtocol()); return grounding; } }
public static EventGrounding createEventGrounding(String kafkaHost, int kafkaPort, EventSchema eventSchema) { EventGrounding eventGrounding = new EventGrounding(); KafkaTransportProtocol transportProtocol = new KafkaTransportProtocol(); transportProtocol.setBrokerHostname(kafkaHost); transportProtocol.setKafkaPort(kafkaPort); String topic = "org.streampipes.connect." + UUID.randomUUID(); System.out.println("Topic: " + topic); TopicDefinition topicDefinition = new SimpleTopicDefinition(topic); transportProtocol.setTopicDefinition(topicDefinition); eventGrounding.setTransportProtocol(transportProtocol); return eventGrounding; } }
public static EventGrounding createEventGrounding(String kafkaHost, int kafkaPort, EventSchema eventSchema) { EventGrounding eventGrounding = new EventGrounding(); KafkaTransportProtocol transportProtocol = new KafkaTransportProtocol(); transportProtocol.setBrokerHostname(kafkaHost); transportProtocol.setKafkaPort(kafkaPort); String topic = "org.streampipes.connect." + UUID.randomUUID(); System.out.println("Topic: " + topic); TopicDefinition topicDefinition = new SimpleTopicDefinition(topic); transportProtocol.setTopicDefinition(topicDefinition); eventGrounding.setTransportProtocol(transportProtocol); return eventGrounding; } }
public static EventGrounding getSupportedGrounding() { EventGrounding grounding = new EventGrounding(); grounding.setTransportFormats(standardFormat()); grounding.setTransportProtocols(standardProtocols()); return grounding; } }
public SpDataStream(SpDataStream other) { super(other); if (other.getEventGrounding() != null) this.eventGrounding = new EventGrounding(other.getEventGrounding()); if (other.getEventSchema() != null) this.eventSchema = new EventSchema(other.getEventSchema()); if (other.getHasEventStreamQualities() != null) this.hasEventStreamQualities = other.getHasEventStreamQualities().stream().map(EventStreamQualityDefinition::new).collect(Collectors.toCollection(ArrayList::new)); if (other.getRequiresEventStreamQualities() != null) this.requiresEventStreamQualities = other.getRequiresEventStreamQualities().stream().map(EventStreamQualityRequirement::new).collect(Collectors.toCollection(ArrayList::new)); if (other.getMeasurementCapability() != null) this.measurementCapability = new Cloner().mc(other.getMeasurementCapability()); if (other.getMeasurementObject() != null) this.measurementObject = new Cloner().mo(other.getMeasurementObject()); }
public DataSetModificationMessage selectGrounding() { // TODO grounding negotiation TransportProtocol protocol = new KafkaTransportProtocol(BackendConfig.INSTANCE.getKafkaHost(), BackendConfig.INSTANCE.getKafkaPort(), TopicGenerator.generateRandomTopic(), BackendConfig.INSTANCE.getZookeeperHost(), BackendConfig.INSTANCE.getZookeeperPort()); TransportFormat format = spDataSet.getSupportedGrounding().getTransportFormats().get(0); EventGrounding outputGrounding = new EventGrounding(); outputGrounding.setTransportProtocol(protocol); outputGrounding.setTransportFormats(Arrays.asList(format)); return new DataSetModificationMessage(outputGrounding,RandomStringUtils.randomAlphanumeric(10)); } }
public DataSetModificationMessage selectGrounding() { // TODO grounding negotiation TransportProtocol protocol = new KafkaTransportProtocol(BackendConfig.INSTANCE.getKafkaHost(), BackendConfig.INSTANCE.getKafkaPort(), TopicGenerator.generateRandomTopic(), BackendConfig.INSTANCE.getZookeeperHost(), BackendConfig.INSTANCE.getZookeeperPort()); TransportFormat format = spDataSet.getSupportedGrounding().getTransportFormats().get(0); EventGrounding outputGrounding = new EventGrounding(); outputGrounding.setTransportProtocol(protocol); outputGrounding.setTransportFormats(Arrays.asList(format)); return new DataSetModificationMessage(outputGrounding,RandomStringUtils.randomAlphanumeric(10)); } }
public AdapterDescription(AdapterDescription other) { super(other); this.adapterId = other.getAdapterId(); this.userName = other.getUserName(); this.rules = other.getRules(); this.adapterType = other.getAdapterType(); this.icon = other.getIcon(); if (other.getEventGrounding() != null) this.eventGrounding = new EventGrounding(other.getEventGrounding()); }
public ConsumableStreamPipesEntity(ConsumableStreamPipesEntity other) { super(other); if (other.getSpDataStreams() != null) this.spDataStreams = new Cloner().streams(other.getSpDataStreams()); this.staticProperties = new Cloner().staticProperties(other.getStaticProperties()); if (other.getSupportedGrounding() != null) this.supportedGrounding = new EventGrounding(other.getSupportedGrounding()); }
if (adapterDescription instanceof AdapterSetDescription) { ds = ((AdapterSetDescription) adapterDescription).getDataSet(); EventGrounding eg = new EventGrounding(); eg.setTransportProtocol(SupportedProtocols.kafka()); eg.setTransportFormats(Arrays.asList(SupportedFormats.jsonFormat())); EventGrounding eg = new EventGrounding(); eg.setTransportFormats(Arrays.asList(Formats.jsonFormat())); eg.setTransportProtocol(tp);
public InvocableStreamPipesEntity(InvocableStreamPipesEntity other) { super(other); this.belongsTo = other.getBelongsTo(); this.correspondingPipeline = other.getCorrespondingPipeline(); this.inputStreams = new Cloner().streams(other.getInputStreams()); this.configured = other.isConfigured(); if (other.getStreamRequirements() != null) this.streamRequirements = new Cloner().streams(other.getStreamRequirements()); if (other.getStaticProperties() != null) this.staticProperties = new Cloner().staticProperties(other.getStaticProperties()); this.DOM = other.getDOM(); if (other.getSupportedGrounding() != null) this.supportedGrounding = new EventGrounding(other.getSupportedGrounding()); }