Commit b3cb7b08 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Style updates

parent d30d5a01
......@@ -18,10 +18,10 @@
package org.memobase
import kotlin.system.exitProcess
import org.apache.kafka.streams.KafkaStreams
import org.apache.logging.log4j.LogManager
import org.memobase.settings.SettingsLoader
import kotlin.system.exitProcess
class App {
companion object {
......
......@@ -18,4 +18,4 @@
package org.memobase
class InvalidInputException(message: String) : Exception(message)
\ No newline at end of file
class InvalidInputException(message: String) : Exception(message)
......@@ -22,6 +22,8 @@ import com.beust.klaxon.JsonObject
import com.beust.klaxon.Klaxon
import com.beust.klaxon.json
import com.github.doyaaaaaken.kotlincsv.dsl.csvReader
import java.io.File
import java.io.StringReader
import org.apache.kafka.streams.KeyValue
import org.apache.kafka.streams.StreamsBuilder
import org.apache.kafka.streams.Topology
......@@ -30,8 +32,6 @@ import org.apache.kafka.streams.kstream.Predicate
import org.apache.logging.log4j.LogManager
import org.memobase.settings.SettingsLoader
import org.memobase.sftp.SftpClient
import java.io.File
import java.io.StringReader
class KafkaTopology(private val settings: SettingsLoader) {
private val log = LogManager.getLogger("KafkaTopology")
......@@ -115,7 +115,7 @@ class KafkaTopology(private val settings: SettingsLoader) {
return Klaxon().parseJsonObject(StringReader(value))
}
private fun errorWrapper(key: String, value: JsonObject): Pair<List<Pair<Pair<String, JsonObject>, Report>>, Report> {
private fun errorWrapper(key: String, value: JsonObject): Pair<List<Pair<Pair<String, JsonObject>, Report>>, Report> {
return try {
val result = csvMapper(value)
Pair(result, Report(key, "SUCCESS", "Transformed table data into ${result.count()} records."))
......@@ -152,7 +152,6 @@ class KafkaTopology(private val settings: SettingsLoader) {
throw InvalidInputException("Invalid property name $property on row $count in column ${index + 1}! You may not use the any of the following characters: + , . ")
}
}
}
continue
}
......
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