Skip to content

Commit

Permalink
Added oppSensor_* as allowed sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineauger committed Jun 29, 2017
1 parent 552ef8e commit fb74672
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/fr/isae/iqas/pipelines/IngestPipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ public Graph<FlowShape<ConsumerRecord<byte[], String>, ProducerRecord<byte[], St

final FlowShape<RawData, RawData> filteredInformationBySensor = builder.add(
Flow.of(RawData.class).filter(r -> {
if (r.getProducer().startsWith("oppSensor_")) {
return true;
}
String[] allowedSensors = getParams().get("allowed_sensors").split(";");
List<String> allowedSensorList = Arrays.asList(allowedSensors);
return allowedSensorList.contains(r.getProducer());
Expand Down

0 comments on commit fb74672

Please sign in to comment.