66 points · by santhoshkumar3 · 6y ago · 31 comments
At the end of the day, most places just want something to point PowerBI at etc.
If you start from the assumption that you've been ingesting data and storing it in a compressed columnar format like Parquet or ORC, then you're already locked into a solution that exists in the Hadoop ecosystem. This turns out to be an effective way to deal with terabytes of data because depending on the query you want to execute, the file format (and a smart partitioning structure) helps turn your problem of reading terabytes into one of reading gigabytes. And, everything in Hadoop land is generally a query, so you're going to need a query engine like Hive, Impala, Spark, etc. AND, you probably need something like Hive metadata so that you're not crawling some directory structure for the schema and input files every time you start up a new process to run a query.
You _could_ write something on your own that just forks out a bunch of threads in a single process to rip through the data, but why? Think about what you're effectively implementing - a bespoke query engine that runs one query plan. Spark has already written an API and a query engine (multi-process distributed, unlike whatever you're likely to hand-roll) and lots of input/output code. You can spark-submit --master local[*] and use up all of the cores and ram everything into one monster JVM if you really wanted to.
Finally, you could stuff all of this in memory, but at what cost, and what are you going to use to do it? (Worse, what happens if the VM goes down - those terabytes are going to take their sweet time reloading over a network link.)
https://www.quora.com/Big-data-is-like-teenage-sex-everyone-...
Azure Event Hubs icon - https://images.app.goo.gl/NLu8jSKWYPwMyTtD9
Azure Marketplace icon - https://images.app.goo.gl/X9vZeWWAR2TDsawe8
Azure Service Health icon - https://images.app.goo.gl/fJcUZqwUWbzK7tC99
They probably should change that...
Our workflow with it is:
1. Stream new data into a partitioned S3 bucket available as a table in metastore.
2. Use Hudi to create a copy-on-write compacted version of the table (think SELECT * FROM (SELECT *, row_number() over (partition by uuid order by ts desc) as rnum) WHERE rnum=1).
Now people who are interested on the snapshot of the table rather than the event log can query the Hudi table instead of the raw event log tables.
This has improved perf for the common use-cases while allowing us to use a common pipeline. Earlier we would have to dump such data into an RDS (Aurora Postgres) with UPSERT but that meant table bloat was an issue and cost was high depending on the date-range we wanted to store compacted.