Örnek
Şöyle yaparız
//Convert object to string for KNS keyFunctionEx<Log, String> keyFn = l -> l.service(); //Convert object to byte[] for KNS value FunctionEx<Log, byte[]> valueFn = l -> l.message().getBytes(); Sink<Log> sink = KinesisSinks.kinesis("stream", keyFn, valueFn).build(); p.readFrom(Sources.files("home/logs")) //read lines of text from log files .map(line -> LogParser.parse(line)) //parse lines into Log data objects .writeTo(sink);
Hiç yorum yok:
Yorum Gönder