Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OB-524 : Adding comments to OnDemandDruidExhaustJob #177

Open
wants to merge 2 commits into
base: release-5.1.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions batch-models/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,14 @@
</filters>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ case class OnDemandDruidResponse(file: List[String], status: String, statusMsg:
case class Metrics(totalRequests: Option[Int], failedRequests: Option[Int], successRequests: Option[Int])

object OnDemandDruidExhaustJob extends BaseReportsJob with Serializable with IJob with OnDemandBaseExhaustJob with BaseDruidQueryProcessor {
/**
* Define implicit variables and constants required for Job
*/
implicit override val className: String = "org.sunbird.analytics.exhaust.OnDemandDruidExhaustJob"

val jobId: String = "druid-dataset"
Expand All @@ -46,6 +49,10 @@ object OnDemandDruidExhaustJob extends BaseReportsJob with Serializable with IJo

implicit val frameworkContext: FrameworkContext = getReportingFrameworkContext()
implicit val conf = spark.sparkContext.hadoopConfiguration
/**
* This code block performs job execution, metrics generation, error handling, and cleanup tasks, ensuring accurate measurement of job performance and logging of relevant information.
* Additionally, it dispatches metric events to a Kafka topic based on configuration settings, enabling further analysis and monitoring of the job's execution.
*/
try {
val res = CommonUtil.time(execute());
// generate metric event and push it to kafka topic
Expand Down