ReduceByKey Syntax Issue

Hello Folks,

Does anyone know why the 1st code snippet having (acc,val) as the parameters doesn’t work and the second one works?

Nitesh Chainani

@nitesh - val is the keyword used to declare immutable variables in scala. Hence cannot be used in reduceByKey()

1 Like

@SreeswethaGolla :
Good Catch…Thank you :slight_smile:

1 Like