From aed862d21eb2efa9cd568757e31e4e24bf782d7d Mon Sep 17 00:00:00 2001 From: Assaf Liebstein Date: Tue, 8 Dec 2020 17:34:01 +0200 Subject: [PATCH] add-sleep --- src/main/resources/lineage.properties | 0 src/main/scala/com/yotpo/metorikku/metric/Metric.scala | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 src/main/resources/lineage.properties diff --git a/src/main/resources/lineage.properties b/src/main/resources/lineage.properties new file mode 100644 index 000000000..e69de29bb diff --git a/src/main/scala/com/yotpo/metorikku/metric/Metric.scala b/src/main/scala/com/yotpo/metorikku/metric/Metric.scala index 3032f7052..59d249e9b 100644 --- a/src/main/scala/com/yotpo/metorikku/metric/Metric.scala +++ b/src/main/scala/com/yotpo/metorikku/metric/Metric.scala @@ -100,6 +100,9 @@ case class Metric(configuration: Configuration, metricDir: Option[File], metricN log.info(s"Starting to Write results of ${dataFrameName}") try { writer.write(dataFrame) + //TODO: wait for the hook + val millis = 20000 + Thread.sleep(millis) outputConfig.reportLag match { case Some(true) => new MetricReporting().reportLagTime(dataFrame, outputConfig.reportLagTimeColumn, outputConfig.reportLagTimeColumnUnits, instrumentationProvider)