Unverified Commit 4f86ad53 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

fix style issues


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent bf14c219
Pipeline #13080 passed with stages
in 7 minutes and 50 seconds
......@@ -31,6 +31,7 @@ object App extends scala.App with Logging {
val topology = new KafkaTopology
val streams = new KafkaStreams(topology.build(), SettingsFromFile.getKafkaStreamsSettings)
val shutdownGracePeriodMs = 10000
logger.trace("Starting stream processing")
Try(
......@@ -41,6 +42,6 @@ object App extends scala.App with Logging {
}
sys.ShutdownHookThread {
streams.close(Duration.ofSeconds(10))
streams.close(Duration.ofMillis(shutdownGracePeriodMs))
}
}
......@@ -24,8 +24,9 @@ import upickle.default.{Reader, macroRW}
/**
* Terminates a Kafka service when sent downstream
*
* @param processId Id of import process
* @param jobName Name of job inside process
* @param jobName Name of job inside process
*/
case class ServiceTermination(processId: String, jobName: String) {
override def toString: String = s"""{"action":"termination","processId":"$processId","job-name":"$jobName"}"""
......@@ -34,8 +35,8 @@ case class ServiceTermination(processId: String, jobName: String) {
// FIXME: Can eventually be removed
/**
*
* @param id Record id
* @param status Processing result; either SUCCESS or FAILURE
* @param id Record id
* @param status Processing result; either SUCCESS or FAILURE
* @param message Message in case of error
*/
case class ServiceReport(id: String, status: String, message: String)
......@@ -43,6 +44,7 @@ case class ServiceReport(id: String, status: String, message: String)
object ServiceReport {
implicit val reader: Reader[ServiceReport] = macroRW
def apply(msg: String): ServiceReport = {
val json = upickle.default.read[ServiceReport](msg)
new ServiceReport(json.id, json.status, json.message)
......@@ -51,8 +53,9 @@ object ServiceReport {
/**
* Declares the size of a data set to be expected by a job in an import process
* @param processId Id of import process
* @param jobName Name of job inside process
*
* @param processId Id of import process
* @param jobName Name of job inside process
* @param dataSetSize Size of data set
*/
case class DataSetSize(processId: String, jobName: String, dataSetSize: Long)
......@@ -60,8 +63,9 @@ case class DataSetSize(processId: String, jobName: String, dataSetSize: Long)
object DataSetSize {
implicit val reader: Reader[DataSetSize] = macroRW
def apply(msg: String): DataSetSize = {
val json = upickle.default.read[DataSetSize](msg)
new DataSetSize(json.processId, json.jobName, json.dataSetSize)
}
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment