Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import java.nio.file.{FileSystems, Files, Paths}
import scala.util.Try

object RunnerCommons {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

/**
* The method parses command line parameters and returns workflow configs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ case class BookkeeperConfig(
)

object BookkeeperConfig {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val BOOKKEEPING_PARENT = "pramen.bookkeeping"
val BOOKKEEPING_ENABLED = "pramen.bookkeeping.enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ object HookConfig {
val STARTUP_HOOK_CLASS_KEY = "pramen.hook.startup.class"
val SHUTDOWN_HOOK_CLASS_KEY = "pramen.hook.shutdown.class"

private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

def fromConfig(conf: Config): HookConfig = {
val startupHookClass = ConfigUtils.getOptionString(conf, STARTUP_HOOK_CLASS_KEY).filter(_.nonEmpty)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ case class RuntimeConfig(
)

object RuntimeConfig {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val INFORMATION_DATE_FORMAT_APP = "pramen.information.date.format"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ trait Bookkeeper extends AutoCloseable {
}

object Bookkeeper {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

def fromConfig(bookkeepingConfig: BookkeeperConfig,
runtimeConfig: RuntimeConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ object BookkeeperDynamoDb {

val MODEL_VERSION = 1

private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

/**
* Builder for creating BookkeeperDynamoDb instances.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ object Keys {
"spark.yarn.dist.files",
"spline.mongodb.url",
"sun.boot.class.path",
"sun.java.command"
"sun.java.command",
"log4j2.discardThreshold" // This option is usually equals to ERROR and its presence confuses log error scanners
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import scala.collection.mutable.ListBuffer
import scala.util.control.NonFatal

object TokenLockRegistry {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))
private var currentLocks = new ListBuffer[TokenLock]
private val registryLock = new ReentrantLock()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class MetastoreImpl(appConfig: Config,
}

object MetastoreImpl {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val METASTORE_KEY = "pramen.metastore.tables"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ case class MetaTable(
)

object MetaTable {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val NAME_KEY = "name"
val NAME_DESCRIPTION = "description"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class MetastorePersistenceIceberg(table: CatalogTable,
}

object MetastorePersistenceIceberg {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

def addGeneratedColumnPartition(table: String,
infoDateColumn: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ class MetastorePersistenceRaw(path: String,
}

object MetastorePersistenceRaw {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val MEGABYTE: Long = 1024L * 1024L
val RAW_PATH_FIELD_KEY = "path"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import scala.collection.mutable.ListBuffer
import scala.util.Random

object TransientTableManager {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

private val rawDataframes = new mutable.HashMap[MetastorePartition, DataFrame]()
private val cachedDataframes = new mutable.HashMap[MetastorePartition, DataFrame]()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ case class OperationDef(
)

object OperationDef {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val NAME_KEY = "name"
val TYPE_KEY = "type"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ object OperationSplitter {
val NOTIFICATION_KEY = "notification"
val DISABLE_COUNT_QUERY = "disable.count.query"

private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

private[core] def getNotificationTarget(appConf: Config,
targetName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import za.co.absa.pramen.core.utils.{AlgorithmUtils, ConfigUtils}
import scala.collection.JavaConverters._

object SinkTableParser {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val METATABLE_TABLE_KEY = "input.metastore.table"
val JOB_METASTORE_OUTPUT_TABLE_KEY = "job.metastore.table"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ package za.co.absa.pramen.core.pipeline

import com.typesafe.config.Config
import org.slf4j.LoggerFactory
import za.co.absa.pramen.api.jobdef.{SourceTable, TransformExpression}
import za.co.absa.pramen.api.jobdef.SourceTable
import za.co.absa.pramen.core.model.QueryBuilder
import za.co.absa.pramen.core.pipeline.OperationDef.WARN_MAXIMUM_EXECUTION_TIME_SECONDS_KEY
import za.co.absa.pramen.core.utils.{AlgorithmUtils, ConfigUtils}

import scala.collection.JavaConverters._

object SourceTableParser {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val METATABLE_TABLE_KEY = "output.metastore.table"
val DATE_FROM_KEY = "date.from"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import java.time.LocalDate
import scala.collection.JavaConverters._

object TransferTableParser {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val JOB_METASTORE_OUTPUT_TABLE_KEY = "job.metastore.table"
val DATE_FROM_KEY = "date.from"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class PramenDb(val jdbcConfig: JdbcConfig,
}

object PramenDb {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))
private val conf = Pramen.getConfig

val MODEL_VERSION = 13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ case class TableReaderJdbcConfig(
)

object TableReaderJdbcConfig {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val HAS_INFO_DATE = "has.information.date.column"
val INFORMATION_DATE_COLUMN = "information.date.column"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object AppRunner {
val ERROR_CODE_FAILURE = 1
private var bannerShown = false

private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

/**
* Runs the pipeline defined in the given config.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import za.co.absa.pramen.core.pipeline.PipelineDef.PIPELINE_NAME_KEY
import za.co.absa.pramen.core.utils.ConfigUtils

object PipelineSparkSessionBuilder {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val SPARK_APP_NAME_KEY = "pramen.spark.app.name"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package za.co.absa.pramen.core.runner.splitter

import org.slf4j.LoggerFactory
import za.co.absa.pramen.api.jobdef.Schedule
import za.co.absa.pramen.api.status.{MetastoreDependency, TaskRunReason}
import za.co.absa.pramen.bulkload.BulkLoadStateManager
Expand All @@ -28,7 +29,7 @@ import za.co.absa.pramen.core.runner.splitter.ScheduleStrategyUtils._
import java.time.LocalDate

class ScheduleStrategyIncremental(lastInfoDateProcessedOpt: Option[LocalDate], hasInfoDateColumn: Boolean) extends ScheduleStrategy {
private val log = org.slf4j.LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass)

override def getDaysToRun(
outputTable: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package za.co.absa.pramen.core.runner.splitter

import org.slf4j.LoggerFactory
import za.co.absa.pramen.api.jobdef.Schedule
import za.co.absa.pramen.api.status.{MetastoreDependency, TaskRunReason}
import za.co.absa.pramen.bulkload.BulkLoadStateManager
Expand All @@ -37,7 +38,7 @@ import java.time.LocalDate
* @param hasInfoDateColumn If true, the output table has an info date column and is treated as a table containing immutable events.
*/
class ScheduleStrategySourcing(hasInfoDateColumn: Boolean) extends ScheduleStrategy {
private val log = org.slf4j.LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass)

override def getDaysToRun(
outputTable: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package za.co.absa.pramen.core.runner.splitter

import org.slf4j.LoggerFactory
import za.co.absa.pramen.api.RunMode
import za.co.absa.pramen.api.jobdef.Schedule
import za.co.absa.pramen.api.status.TaskRunReason
Expand All @@ -33,7 +34,7 @@ import scala.collection.mutable
import scala.collection.mutable.ListBuffer

object ScheduleStrategyUtils {
private val log = org.slf4j.LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val RUN_DATE_VAR1 = "runDate"
val RUN_DATE_VAR2 = "date"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import scala.collection.JavaConverters._
import scala.util.control.NonFatal

object ThreadClosableRegistry {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))
private val closeables = new java.util.LinkedList[(Long, AutoCloseable)]

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import org.apache.spark.sql.{DataFrame, SparkSession}
import org.slf4j.LoggerFactory
import za.co.absa.pramen.api.{ExternalChannelFactory, MetastoreReader, Sink, SinkResult}
import za.co.absa.pramen.core.config.Keys.KEYS_TO_REDACT
import za.co.absa.pramen.core.reader.TableReaderJdbcNative
import za.co.absa.pramen.core.sink.SparkSinkFormat.{ConnectionFormat, PathFormat, TableFormat}
import za.co.absa.pramen.core.source.SparkSource.resolveQueryString
import za.co.absa.pramen.core.utils.{AlgorithmUtils, ConfigUtils, FsUtils}
Expand Down Expand Up @@ -226,7 +225,7 @@ class SparkSink(format: String,
}

object SparkSink extends ExternalChannelFactory[SparkSink] {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val OUTPUT_PATH_KEY = "path"
val OUTPUT_TABLE_KEY = "table"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class RawFileSource(val sourceConfig: Config,
}

object RawFileSource extends ExternalChannelFactory[RawFileSource] {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val FILE_PREFIX = "file"
val FILE_PATTERN_CASE_SENSITIVE_KEY = "file.pattern.case.sensitive"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import za.co.absa.pramen.api._
import za.co.absa.pramen.api.offset.{OffsetInfo, OffsetValue}
import za.co.absa.pramen.api.sql.SqlColumnType
import za.co.absa.pramen.core.config.Keys.KEYS_TO_REDACT
import za.co.absa.pramen.core.reader.{TableReaderJdbcNative, TableReaderSpark}
import za.co.absa.pramen.core.reader.model.OffsetInfoParser
import za.co.absa.pramen.core.reader.model.TableReaderJdbcConfig._
import za.co.absa.pramen.core.reader.{TableReaderJdbcNative, TableReaderSpark}
import za.co.absa.pramen.core.utils.{ConfigUtils, FsUtils}

import java.time.LocalDate
Expand Down Expand Up @@ -126,7 +126,7 @@ class SparkSource(val format: Option[String],
}

object SparkSource extends ExternalChannelFactory[SparkSource] {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val FORMAT = "format"
val SCHEMA = "schema"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import java.time.format.DateTimeFormatter
import java.time.{LocalDate, LocalDateTime}

object SqlGeneratorDatabricks {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

/**
* This is required for Spark to be able to handle data that comes from Databricks JDBC drivers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import java.time.format.DateTimeFormatter
import java.time.{LocalDate, LocalTime, ZonedDateTime}

object SqlGeneratorDenodo {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

/**
* This is required for Spark to be able to handle data that comes from Denodo JDBC drivers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import java.time.format.DateTimeFormatter
import java.time.{LocalDate, LocalDateTime}

object SqlGeneratorHive {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

/**
* This is required for Spark to be able to handle data that comes from Hive JDBC drivers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import org.slf4j.LoggerFactory
import za.co.absa.pramen.api.sql.{SqlConfig, SqlGenerator}

object SqlGeneratorLoader {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

/**
* Loads an SQL generator, If SQL configuration contains a generator class name, it will be loaded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import java.util.Locale
import scala.collection.mutable.ListBuffer

object SqlGeneratorSas {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

/**
* This is required for Spark to be able to handle data that comes from Sas JDBC drivers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import scala.collection.mutable
import scala.collection.mutable.ListBuffer

object ConfigUtils {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

def getOptionBoolean(conf: Config, path: String): Option[Boolean] = {
if (conf.hasPath(path)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import scala.util.control.NonFatal
* change the state of the database and is not idempotent (inserts, updates, deletes).
*/
object JdbcNativeUtils {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

final val DEFAULT_CONNECTION_TIMEOUT_SECONDS = 60
final val JDBC_WORDS_TO_REDACT = Set("password", "secret", "pwd", "token", "key", "api_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import java.sql.{Connection, DatabaseMetaData, ResultSet, ResultSetMetaData}
import scala.collection.mutable.ListBuffer

object JdbcSparkUtils {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

val MAXIMUM_VARCHAR_LENGTH = 8192
val MAXIMUM_UUID_LENGTH = 50
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import java.time.{Instant, LocalDate, ZoneId, ZonedDateTime}
import scala.collection.mutable.ListBuffer

object ScheduleUtils {
private val log = LoggerFactory.getLogger(this.getClass)
private val log = LoggerFactory.getLogger(this.getClass.getName.stripSuffix("$"))

/**
* Converts a moment in time into a date by applying local time zone.
Expand Down
Loading
Loading