Skip to content

Commit

Permalink
Imports
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianfr committed Mar 1, 2024
1 parent 9c9e9b5 commit c0fb7b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spark/src/main/scala/ai/chronon/spark/streaming/GroupBy.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import java.time.{Instant, ZoneId, ZoneOffset}
import java.util.Base64
import scala.collection.JavaConverters._
import scala.concurrent.duration.DurationInt
import scala.util.{Success, Try}
import scala.util.{Success, Failure}

class GroupBy(inputStream: DataFrame,
session: SparkSession,
Expand Down Expand Up @@ -78,11 +78,11 @@ class GroupBy(inputStream: DataFrame,
def run(local: Boolean = false): StreamingQuery = {
val fetcher = onlineImpl.buildFetcher(local)
fetcher.getGroupByServingInfo(groupByConf.getMetaData.getName) match {
case scala.util.Failure(exception) =>
case Failure(exception) =>
logger.error(s"Failed to retrieve groupByServingInfo: ${exception.getMessage}")
session.stop()
sys.exit(1)
case scala.util.Success(groupByServingInfo) =>
case Success(groupByServingInfo) =>
buildDataStream(groupByServingInfo).start()
}
}
Expand Down

0 comments on commit c0fb7b3

Please sign in to comment.