val cogroupRDD2 = cogroupRDD.mapValues {
case (viewIter, cartIter, payIter) => {
var viewCnt = 0
val iter1 = viewIter.iterator
if (iter1.hasNext) {
viewCnt = iter1.next()
}
var cartCnt = 0
val iter2 = cartIter.iterator
if (iter2.hasNext) {
cartCnt = iter2.next()
}
var payCnt = 0
val iter3 = payIter.iterator
if (iter3.hasNext) {
payCnt = iter3.next()
}
(viewCnt, cartCnt, payCnt)
}
}
这里case是啥意思,求问