Spark app for selecting a sample from the original data and selecting the labeled data