Master branch updates from beta September 2023 #337
|
@ -0,0 +1,3 @@
|
||||||
|
package eu.dnetlib.dhp.application.dedup.log
|
||||||
|
|
||||||
|
case class DedupLogModel(tag:String, configuration:String, entity:String, startTS:Long, endTS:Long, totalMs:Long ) {}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package eu.dnetlib.dhp.application.dedup.log
|
||||||
|
|
||||||
|
import org.apache.spark.sql.{SaveMode, SparkSession}
|
||||||
|
|
||||||
|
class DedupLogWriter (path:String) {
|
||||||
|
|
||||||
|
|
||||||
|
def appendLog(dedupLogModel: DedupLogModel, spark:SparkSession): Unit = {
|
||||||
|
import spark.implicits._
|
||||||
|
val df = spark.createDataset[DedupLogModel](data = List(dedupLogModel))
|
||||||
|
df.write.mode(SaveMode.Append).save(path)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue