Energy Consumption Modeling and Optimization Analysis for MapReduce