Finally, all we need to do is create an application that will call processRepeatedly with the right parameters.
Create a new class, coinyser.BatchProducerApp, in src/main/scala and type the following:
package coinyserimport java.io.{BufferedReader, InputStreamReader}import java.net.{URI, URL}import cats.effect.{ExitCode, IO, IOApp}import coinyser.BatchProducer.{httpToDomainTransactions, jsonToHttpTransactions}import com.typesafe.scalalogging.StrictLoggingimport org.apache.spark.sql.{Dataset, SparkSession}import scala.io.Sourceclass BatchProducerApp extends IOApp with StrictLogging { implicit val spark: SparkSession = SparkSession.builder.master("local[*]").getOrCreate() implicit val appContext: AppContext