Java Heap Space Problem general solution:
Sets the set io.sort.mb=10; The amount of memory used by the sort, the default value is 100M, and mapred.child.java.opts corresponds, opts default:-xmx200m, MB cannot exceed 200M, otherwise it will be oom.
Sets the set hive.map.aggr=true; If aggregation is done on the map side, the default is true, and a partial data-side aggregation operation is performed on the map side.
(optional) Hive.groupby.mapaggr.checkinterval = 100000; The data entry for the aggregation operation on the map side, optionally set if appropriate.
Sets the set hive.groupby.skewindata=true; When set to True, hive is automatically load balanced when data is tilted.
When the Hive.groupby.skewindata option is set to True, the query plan will have two Mr Jobs. In the first Mr Job, the output set of map is randomly distributed to reduce, and each reduce does a partial aggregation operation and outputs the result, so the result is that the same Group by key may be distributed to different reduce to achieve load balancing purposes; the second The MR Job is then distributed to reduce in accordance with the data results of preprocessing (this process guarantees that the same group by Key is distributed to the same reduce) and finally completes the aggregation operation.
HIVE Error:java Heap Space Solution