/**dateHourMap[String,Long] -----------> dateHourCountMap[String,hourCount[String,Long]]
* 将<yyyy-MM-dd_HH, count>格式的数据,转化为<yyyy-MM-dd, <HH, count>>
*/
var dateHourCountMap:mutable.HashMap[String,mutable.HashMap[String,Long]] = new mutable.HashMap[String,mutable.HashMap[String,Long]]()
for((dateHour,count) <- dateHourMap){
val date = dateHour.split("_")(0)
val hour = dateHour.split("_")(1)
//提取当天date对应的每个小时的count对应数据
var hourCount:mutable.HashMap[String,Long] = dateHourCountMap.getOrElse(date,null)
if(hourCount == null){
hourCount = new mutable.HashMap[String,Long]()
dateHourCountMap.put(date,hourCount)
}
hourCount.put(hour,count)
}