Hi Sven, Feel free to send a link to the blog directly to my email. I’ll add it to Ignite’s blog feed: https://ignite.apache.org/blogs.html <https://ignite.apache.org/blogs.html>
— Denis > On Dec 5, 2017, at 8:10 AM, svonn <[email protected]> wrote: > > Hello Nikolai, > > Since I'm already pretty lost in the deeps of Ignite I will start another > topic with more information, code and questions soon - in this case, here's > one fo the extractors I'm currently using: > > public class AccelerationPointExtractor implements > StreamSingleTupleExtractor<SinkRecord, IgniteKey, AccelerationPoint> { > @Override public Map.Entry<IgniteKey, > AccelerationPoint>extract(SinkRecord msg) { > String key = (String) msg.key(); > AccelerationPoint accelerationPoint = (AccelerationPoint) > msg.value(); > String deviceId = ((String) msg.key()).split(":")[0]; > long measurementId = Long.parseLong(((String) > msg.key()).split(":")[1]); > accelerationPoint.setDeviceId(deviceId); > accelerationPoint.setMeasurementId(measurementId); > return new AbstractMap.SimpleEntry<>(new IgniteKey(deviceId, > measurementId, accelerationPoint.getTimestamp()), accelerationPoint); > } > > } > > Best regards, > Sven > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/
