Due to a scheduled upgrade to version 14.10, GitLab will be unavailabe on Monday 30.05., from 19:00 until 20:00.

Unverified Commit 43cde44f authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

remove memobase-service-utilities dependency

parent 7b721737
Pipeline #22147 passed with stages
in 4 minutes and 7 seconds
...@@ -26,13 +26,12 @@ lazy val root = (project in file(".")) ...@@ -26,13 +26,12 @@ lazy val root = (project in file("."))
"Memobase Utils" at "https://dl.bintray.com/memoriav/memobase" "Memobase Utils" at "https://dl.bintray.com/memoriav/memobase"
), ),
libraryDependencies ++= Seq( libraryDependencies ++= Seq(
elastic4s exclude("com.fasterxml.jackson.module", "jackson-module-scala_2.12"), elastic4s,
kafkaClients, kafkaClients,
log4jApi, log4jApi,
log4jCore, log4jCore,
log4jSlf4j, log4jSlf4j,
log4jScala, log4jScala,
memobaseServiceUtils,
mariadbJavaClient, mariadbJavaClient,
upickle, upickle,
scalaTest % Test scalaTest % Test
......
...@@ -31,8 +31,6 @@ object Dependencies { ...@@ -31,8 +31,6 @@ object Dependencies {
lazy val log4jSlf4j = "org.apache.logging.log4j" % "log4j-slf4j-impl" % log4jV lazy val log4jSlf4j = "org.apache.logging.log4j" % "log4j-slf4j-impl" % log4jV
lazy val mariadbJavaClient = lazy val mariadbJavaClient =
"org.mariadb.jdbc" % "mariadb-java-client" % "2.7.0" "org.mariadb.jdbc" % "mariadb-java-client" % "2.7.0"
lazy val memobaseServiceUtils =
"org.memobase" % "memobase-service-utilities" % "1.4.1"
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.2.2" lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.2.2"
lazy val upickle = "com.lihaoyi" %% "upickle" % "0.9.5" lazy val upickle = "com.lihaoyi" %% "upickle" % "0.9.5"
} }
...@@ -18,50 +18,54 @@ ...@@ -18,50 +18,54 @@
package ch.memobase package ch.memobase
import org.memobase.settings.SettingsLoader
import java.util.Properties import java.util.Properties
import scala.collection.JavaConverters._
trait AppSettings { trait AppSettings {
val settingsLoader = new SettingsLoader( val clientId: String = sys.env("CLIENT_ID")
List( val producerProps: Properties = {
"esIndex", val props = new Properties()
"esHost", props.put("bootstrap.servers", sys.env("KAFKA_BOOTSTRAP_SERVERS"))
"mariadbHost", props.put(
"mariadbPassword", "key.serializer",
"mariadbTables", "org.apache.kafka.common.serialization.StringSerializer"
"mariadbUser", )
"mediaFolderRootPath" props.put(
).asJava, "value.serializer",
"app.yml", "org.apache.kafka.common.serialization.StringSerializer"
true, )
false, props.put("batch.size", "131072")
true, props.put("compression.type", "gzip")
false props
) }
val clientId: String = val consumerProps: Properties = {
settingsLoader.getKafkaProducerSettings.getProperty("client.id") val props = new Properties()
val producerProps: Properties = settingsLoader.getKafkaProducerSettings props.put("bootstrap.servers", sys.env("KAFKA_BOOTSTRAP_SERVERS"))
val consumerProps: Properties = settingsLoader.getKafkaConsumerSettings props.put(
val inputTopic: String = settingsLoader.getInputTopic "key.deserializer",
val reportingTopic: String = settingsLoader.getProcessReportTopic "org.apache.kafka.common.serialization.StringDeserializer"
val esHost: String = )
settingsLoader.getAppSettings.getProperty("esHost") props.put(
val esIndex: String = "value.deserializer",
settingsLoader.getAppSettings.getProperty("esIndex") "org.apache.kafka.common.serialization.StringDeserializer"
val mariaDBHost: String = )
settingsLoader.getAppSettings.getProperty("mariadbHost") props.put("fetch.min.bytes", "1048576")
val mariaDBPassword: String = props.put("group.id", clientId)
settingsLoader.getAppSettings.getProperty("mariadbPassword") props.put("allow.auto.create.topics", "false")
val mariaDBTables: List[String] = props.put("auto.offset.reset", "earliest")
settingsLoader.getAppSettings props.put("max.poll.records", "5000")
.getProperty("mariadbTables") props
.split(", *") }
.toList val inputTopic: String = sys.env("TOPIC_IN")
val mariaDBUser: String = val reportingTopic: String = sys.env("TOPIC_PROCESS")
settingsLoader.getAppSettings.getProperty("mariadbUser") val esHost: String = sys.env("ES_HOST")
val mediaFolderRootPath: String = val esIndex: String = sys.env("ES_INDEX")
settingsLoader.getAppSettings.getProperty("mediaFolderRootPath") val mariaDBHost: String = sys.env("MARIADB_HOST")
val mariaDBPassword: String = sys.env("MARIADB_PASSWORD")
val mariaDBTables: List[String] = sys
.env("MARIADB_TABLES")
.split(", *")
.toList
val mariaDBUser: String = sys.env("MARIADB_USER")
val mediaFolderRootPath: String = sys.env("MEDIA_FOLDER_ROOT_PATH")
} }
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