Skip to content

Commit

Permalink
downgrade guava to avoid kinesis producer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nextdude committed Jun 4, 2019
1 parent 2433076 commit 402c140
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ val V = new {
val http4s = "0.20.0-M5"
val enumeratum = "1.5.13"
val typesafeConfig = "1.3.3"
val guava = "27.0.1-jre"
// val guava = "27.0.1-jre"
val guava = "24.1-jre"
val squants = "1.3.0"
val antlr4 = "4.7.1"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.epiphanous.flinkrunner.operator

import java.util.concurrent.Executors
import java.util.concurrent.{Executors, TimeUnit}

import cats.effect.{ContextShift, IO, Timer}
import com.google.common.cache.{CacheBuilder, CacheLoader}
Expand Down Expand Up @@ -107,11 +107,13 @@ abstract class EnrichmentAsyncFunction[IN, OUT, CV <: AnyRef](

@transient
lazy val cache = {
val expireAfter = config.getDuration(s"$configPrefix.cache.expire.after")
val builder = CacheBuilder
.newBuilder()
.concurrencyLevel(config.getInt(s"$configPrefix.cache.concurrency.level"))
.maximumSize(config.getInt(s"$configPrefix.cache.max.size"))
.expireAfterWrite(config.getDuration(s"$configPrefix.cache.expire.after"))
.expireAfterWrite(expireAfter.toMillis, TimeUnit.MILLISECONDS)
// .expireAfterWrite(expireAfter) // for guava 27
if (!config.getBoolean(s"$configPrefix.cache.use.strong.keys"))
builder.weakKeys()
if (config.getBoolean(s"$configPrefix.cache.record.stats"))
Expand Down

0 comments on commit 402c140

Please sign in to comment.