How to assign timestamp for event time in a stream?

2016-09-07 Thread jiecxy
The program is to read the unordered records from a log file, and to print the record in order. But it doesn't change the order, is there anything wrong in my code? Can anyone give me an example? This is my program: Note: the class Tokenizer is to transfer the log to four parts. Like this:

Stream sql query in Flink

2016-09-06 Thread jiecxy
terDataStream("Syslogs", messages, "time, user, process, msg"); Table result = tableEnv.sql( "SELECT STREAM msg FROM Syslogs WHERE msg LIKE '%system%'" ); TableSink sink = new CsvTableSink("/home/jiecx

Apache Flink: How does it handle the backpressure?

2016-09-02 Thread jiecxy
For an operator, the input stream is faster than its output stream, so its input buffer will block the previous operator's output thread that transfers the data to this operator. Right? Do the Flink and the Spark both handle the backpressure by blocking the thread? So what's the difference between