This project is based on Spark 2.0.2 API which uses Dataset approach instead of Traditional RDDs.
This project describes capibilities of Spark Aggegrate User Defined Functions which can be used to extend default available aggregate features.
Input Datasource is in below format:
Which is available in below project location. /src/main/resources/user_activities.txt
and my expected output is:
Which is Aggregation on user(swid) and for each user its finding total_time_spent, total_video_starts and also device usage distribution in terms of percentage. This gives us more insight to understand user’s device usage. This can be used to build user usage driven recommendation system.
You need to also provide S3 location or HDFS location of the input file.
How to run this:
spark-submit –class com.parmarh.driver.UserAggDriver spark-java-udf-demo-0.0.1-SNAPSHOT.jar