In many samples of Apache Spark code we can the below code
val input = sc.hadoopFile[Text, Text, KeyValueTextInputFormat](inputFile).map{
case (x, y) => (x.toString, y.toString)
}
Can someone please explain the use of case (x,y) here? I am aware of the use of case statement for class creation and pattern matching. However I am unable to understand the user of case (x,y in map function here.