title: Low performance of groupbykey in spark
body: <p>After reading the Spark documentation, I find that <code>groupByKey</code> function has a low performance compared with <code>reduceByKey</code>. But what I need is to get the <code>average</code>, <code>maximum</code> and <code>minimum</code> value of a certain key. I don't think this could be done by <code>reduceByKey</code> method. I can just create an customized <code>reduceByKey</code> function to realize those goals? </p>