how many mappers and reduces will get created for a partitoned table in hive

Mappers: Number of mappers depends on various factors such as how the data is distributed among nodes, input format, execution engine and configuration params. See also here: https://cwiki.apache.org/confluence/display/TEZ/How+initial+task+parallelism+works MR uses CombineInputFormat, while Tez uses grouped splits. Tez: set tez.grouping.min-size=16777216; — 16 MB min split set tez.grouping.max-size=1073741824; — 1 GB max split MapReduce: set mapreduce.input.fileinputformat.split.minsize=16777216; — … Read more

Hadoop speculative task execution

One problem with the Hadoop system is that by dividing the tasks across many nodes, it is possible for a few slow nodes to rate-limit the rest of the program. Tasks may be slow for various reasons, including hardware degradation, or software mis-configuration, but the causes may be hard to detect since the tasks still … Read more

Find all duplicate documents in a MongoDB collection by a key field

The accepted answer is terribly slow on large collections, and doesn’t return the _ids of the duplicate records. Aggregation is much faster and can return the _ids: db.collection.aggregate([ { $group: { _id: { name: “$name” }, // replace `name` here twice uniqueIds: { $addToSet: “$_id” }, count: { $sum: 1 } } }, { $match: … Read more