data-stream

Apache Flink - Send event if no data was received for x minutes

风流意气都作罢 提交于 2019-12-01 06:20:46
How can I implement an operator with Flink's DataStream API that sends an event when no data was received from a stream for a certain amount of time? Such an operator can be implemented using a ProcessFunction . DataStream<Long> input = env.fromElements(1L, 2L, 3L, 4L); input // use keyBy to have keyed state. // NullByteKeySelector will move all data to one task. You can also use other keys .keyBy(new NullByteKeySelector()) // use process function with 60 seconds timeout .process(new TimeOutFunction(60 * 1000)); The TimeOutFunction is defined as follows. In this example it uses processing time

Java based library for sensor data collection

孤街醉人 提交于 2019-11-29 21:56:37
I'm looking for an embeddable Java library that is suitable for collecting real-time streams of sensor data in a general-purpose way. I plan to use this to develop a "hub" application for reporting on multiple disparate sensor streams, running on a JVM based server (will also be using Clojure for this). Key things it needs to have: Interfaces for various common sensor types / APIs. I'm happy to build what I need myself, but it would be nice if some standard stuff comes out of the box. Suitable for "soft real time" usage, i.e. fairly low latency and low overhead. Ability to monitor and manage

FIFO/Queue buffer specialising in byte streams

徘徊边缘 提交于 2019-11-28 21:26:55
Is there any .NET data structure/combination of classes that allows for byte data to be appended to the end of a buffer but all peeks and reads are from the start, shortening the buffer when I read? The MemoryStream class seems to do part of this, but I need to maintain separate locations for reading and writing, and it doesn't automatically discard the data at the start after it's read. An answer has been posted in reply to this question which is basically what I'm trying to do but I'd prefer something I can do asynchronous I/O on in different components of the same process, just like a

Java based library for sensor data collection

自闭症网瘾萝莉.ら 提交于 2019-11-28 17:56:38
问题 I'm looking for an embeddable Java library that is suitable for collecting real-time streams of sensor data in a general-purpose way. I plan to use this to develop a "hub" application for reporting on multiple disparate sensor streams, running on a JVM based server (will also be using Clojure for this). Key things it needs to have: Interfaces for various common sensor types / APIs. I'm happy to build what I need myself, but it would be nice if some standard stuff comes out of the box.

Streaming data with Node.js

余生颓废 提交于 2019-11-28 03:08:45
I want to know if it is possible to stream data from the server to the client with Node.js. I want to post a single AJAX request to Node.js, then leave the connection open and continuously stream data to the client. The client will receive this stream and update the page continuously. Update: As an update to this answer - I cannot get this to work. The response.write is not sent before you call close . I have set up an example program that I use to achieve this: Node.js: var sys = require('sys'), http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type'

spark ssc.textFileStream is not streamining any files from directory

孤街醉人 提交于 2019-11-27 08:55:48
I am trying to execute below code using eclipse (with maven conf) with 2 worker and each have 2 core or also tried with spark-submit. public class StreamingWorkCount implements Serializable { public static void main(String[] args) { Logger.getLogger("org.apache.spark").setLevel(Level.WARN); JavaStreamingContext jssc = new JavaStreamingContext( "spark://192.168.1.19:7077", "JavaWordCount", new Duration(1000)); JavaDStream<String> trainingData = jssc.textFileStream( "/home/bdi-user/kaushal-drive/spark/data/training").cache(); trainingData.foreach(new Function<JavaRDD<String>, Void>() { public

Hash algorithm for dynamic growing/streaming data?

天涯浪子 提交于 2019-11-27 06:14:20
问题 Are there any algorithms that you can continue hashing from a known hash digest? For example, the client upload a chunk of file to ServerA, I can get a md5 sum of the uploaded content, then the client upload the rest of the file chunk to ServerB, can I transfer the state of md5 internals to ServerB and finish the hashing? There was a cool black magic hack based on md5 I found years ago at comp.lang.python, but it's using ctypes for a specific version of md5.so or _md5.dll , so it's not quite

Streaming data with Node.js

别说谁变了你拦得住时间么 提交于 2019-11-27 05:04:10
问题 I want to know if it is possible to stream data from the server to the client with Node.js. I want to post a single AJAX request to Node.js, then leave the connection open and continuously stream data to the client. The client will receive this stream and update the page continuously. Update: As an update to this answer - I cannot get this to work. The response.write is not sent before you call close . I have set up an example program that I use to achieve this: Node.js: var sys = require(

spark ssc.textFileStream is not streamining any files from directory

こ雲淡風輕ζ 提交于 2019-11-26 16:35:41
问题 I am trying to execute below code using eclipse (with maven conf) with 2 worker and each have 2 core or also tried with spark-submit. public class StreamingWorkCount implements Serializable { public static void main(String[] args) { Logger.getLogger("org.apache.spark").setLevel(Level.WARN); JavaStreamingContext jssc = new JavaStreamingContext( "spark://192.168.1.19:7077", "JavaWordCount", new Duration(1000)); JavaDStream<String> trainingData = jssc.textFileStream( "/home/bdi-user/kaushal