Created 07-27-2017 04:56 PM
Hi,
I was just wondering if it is ok to perform window operations on dstreams with 1 week as window length. Please let me know if there are any major concerns.
Thanks
Created 07-28-2017 10:01 AM
Did you come across this link?
Spark stores all DStream objects in memory, so you'll obviously need RAM accordingly.
Also DStream rdds are replicated (2 by default) to provide fault tolerance in Spark Streaming which increases memory even more. https://spark.apache.org/docs/latest/streaming-programming-guide.html#background
Though you may be able to disable this but you'll lose tolerance.
The link I mentioned should give you more idea.
Created 07-28-2017 10:01 AM
Did you come across this link?
Spark stores all DStream objects in memory, so you'll obviously need RAM accordingly.
Also DStream rdds are replicated (2 by default) to provide fault tolerance in Spark Streaming which increases memory even more. https://spark.apache.org/docs/latest/streaming-programming-guide.html#background
Though you may be able to disable this but you'll lose tolerance.
The link I mentioned should give you more idea.
Created 07-28-2017 03:23 PM
Thanks. If i not use Window and choose to use Streaming the data on to HDFS, could you suggest how to only store 1 week worth of data. Should i create a cron job to delete HDFS files older than a week. PLease let me know if you have any other suggestions
Created 07-29-2017 04:23 AM
Hi, I'm not very sure but you could use flume to get data into HDFS by using an hdfs sink.
https://flume.apache.org/FlumeUserGuide.html
The location in hdfs is mentioned in flume-agent.conf file, for example:
agent_foo.sinks.hdfs-Cluster1-sink.hdfs.path = hdfs://namenode/flume/webdata
You could write a script to modify this directory with a timestamp and restart the flume agent. And then run that every week through cron.
Created 08-02-2017 05:29 AM
Doesn't seem like streaming data directly to HDFS will make it very easy to find/aggregate at the end of each window? What about creating a key/value store (with reddis, hbase, or elasticSearch for example) and using it to lookup all the keys associated with each window.