Spark First Function
In Spark, the First capacity generally returns the main component of the dataset. It is like take(1>
.
Example of First function
To open the Spark in Scala mode, follow the below command.
$ spark-shell
scala> val information = sc.parallelize(List(10,20,30,40,50>
>
scala> data.collect
capacity to recover the principal component of the dataset.
scala> val firstfunc = data.first(>