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