Skip to content

Commit

Permalink
Move to log4j 2.17.1 from log4j 1.x (#1570)
Browse files Browse the repository at this point in the history
- update product version to 1.3.1
- update slf4j to 1.7.32
- update jetty to 9.4.44.v20210927
- update gcs-hadoop-connector to hadoop3-2.1.2
- update jackson-mapper-asl and jackson-core-asl to 1.9.14-atlassian-6 having security fixes
- update fastutil to 8.5.6
- update hive-exec to 1.21.2.7.0.3.2-3
- updated example code to handle kafka update
- add some required properties to kafka tests
- removed KafkaTestUtils and instead use the one in snappy-spark

- core module removes all explicit log4j dependencies and is instead designed to work with
  either of log4j 1.x (upstream Spark) or log4j 2.x (snappy-spark)
- switch to log4j2.properties for cluster and dependent modules as well as template shipped
  with product
- removed all other references to log4j 1.x
- explicitly exlude log4j 1.x and slf4j-log4j12 from final product which gets pulled in
  indirectly by hadoop otherwise
- changed programmatic log4j setup in examples to log4j/log4j2.properties files
- removed flume module build
- add stricter exclude for log4j 1.x
- fix log4j test runtime dependencies for core

snappydata core module runs with upstream spark so it should use upstream log4j 1.x
dependencies, hence don't force exclude log4j 1.x for test configurations of snappy-core
  • Loading branch information
sumwale authored Mar 18, 2022
1 parent 85b9010 commit 3594353
Show file tree
Hide file tree
Showing 46 changed files with 1,261 additions and 1,137 deletions.
2 changes: 1 addition & 1 deletion aqp
38 changes: 25 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ buildscript {
classpath 'de.undercouch:gradle-download-task:3.4.3'
classpath 'net.rdrei.android.buildtimetracker:gradle-plugin:0.11.+'
classpath 'com.netflix.nebula:gradle-ospackage-plugin:5.2.+'
// classpath 'org.owasp:dependency-check-gradle:6.5.3'
}
}

apply plugin: 'wrapper'
apply plugin: 'distribution'
apply plugin: 'nebula.ospackage-base'
apply plugin: "nebula.ospackage"
// apply plugin: 'org.owasp.dependencycheck'

// def isEnterpriseProduct = rootProject.hasProperty('snappydata.enterprise')

Expand All @@ -56,10 +58,10 @@ allprojects {

repositories {
mavenCentral()
maven { url 'https://repo.hortonworks.com/content/repositories/releases/' }
maven { url "https://repo.spring.io/libs-release" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url 'https://packages.atlassian.com/maven-3rdparty' }
maven { url 'https://repository.cloudera.com/artifactory/cloudera-repos' }
maven { url 'https://app.camunda.com/nexus/content/repositories/public' }
maven { url "https://repo.spring.io/libs-release" }
}

apply plugin: 'java'
Expand All @@ -70,7 +72,7 @@ allprojects {
apply plugin: "build-time-tracker"

group = 'io.snappydata'
version = '1.3.0.1'
version = '1.3.1'

// apply compiler options
tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -102,32 +104,31 @@ allprojects {
scalaBinaryVersion = '2.11'
scalaVersion = scalaBinaryVersion + '.8'
sparkVersion = '2.1.3'
snappySparkVersion = '2.1.3.1'
snappySparkVersion = '2.1.3.2'
sparkDistName = "spark-${sparkVersion}-bin-hadoop2.7"
sparkCurrentVersion = '2.4.8'
sparkCurrentDistName = "spark-${sparkCurrentVersion}-bin-hadoop2.7"
sparkJobServerVersion = '0.6.2.12'
snappySparkMetricsLibVersion = '2.0.0.1'
log4jVersion = '1.2.17'
log4j2Version = '2.17.1'
slf4jVersion = '1.7.30'
slf4jVersion = '1.7.32'
junitVersion = '4.12'
mockitoVersion = '1.10.19'
hadoopVersion = '3.2.0'
awsSdkVersion = '1.11.375'
gcsHadoop2ConnectorVersion = 'hadoop2-2.0.0'
gcsHadoop3ConnectorVersion = 'hadoop3-2.0.0'
gcsHadoop3ConnectorVersion = 'hadoop3-2.1.2'
sparkAvroVersion = '4.0.0'
sparkXmlVersion = '0.4.1'
scalatestVersion = '2.2.6'
py4jVersion = '0.10.7'
jettyVersion = '9.2.26.v20180806'
jettyVersion = '9.4.44.v20210927'
guavaVersion = '14.0.1'
fastutilVersion = '8.5.4'
fastutilVersion = '8.5.6'
kryoVersion = '4.0.1'
thriftVersion = '0.9.3'
jacksonVersion = '2.9.9'
hiveVersion = '1.21.2.3.1.2.1-1'
jacksonVersion = '2.13.1'
jacksonDatabindVersion = '2.13.1'
hiveVersion = '1.21.2.7.0.3.2-3'
metricsVersion = '4.0.3'
metrics2Version = '2.2.0'
janinoVersion = '3.0.8'
Expand Down Expand Up @@ -771,6 +772,17 @@ subprojects {
"org.apache.hadoop:hadoop-yarn-server-web-proxy:${hadoopVersion}"
exclude(group: 'org.mortbay.jetty', module: 'servlet-api')
}
def projectName = it.name
if (projectName != 'gemfire-shared') {
configurations.all {
if (projectName != 'snappy-core_' + scalaBinaryVersion ||
it.name == 'compileOnly') {
exclude(group: 'log4j', module: 'log4j')
exclude(group: 'log4j', module: 'apache-log4j-extras')
exclude(group: 'org.slf4j', module: 'slf4j-log4j12')
}
}
}
/*
configurations.testRuntime {
// below is included indirectly by hadoop deps and conflicts with embedded 1.5.7 apacheds
Expand Down
7 changes: 2 additions & 5 deletions cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ dependencies {
compile 'org.scala-lang:scala-library:' + scalaVersion
compile 'org.scala-lang:scala-reflect:' + scalaVersion

compile 'org.slf4j:slf4j-api:' + slf4jVersion
compile 'org.slf4j:slf4j-log4j12:' + slf4jVersion
compile 'org.slf4j:jcl-over-slf4j:' + slf4jVersion
compile 'org.slf4j:jul-to-slf4j:' + slf4jVersion

if (new File(rootDir, 'spark/build.gradle').exists()) {
compile project(':snappy-spark:snappy-spark-unsafe_' + scalaBinaryVersion)
compile project(':snappy-spark:snappy-spark-core_' + scalaBinaryVersion)
Expand All @@ -54,6 +49,7 @@ dependencies {

testCompile project(path: ':snappy-spark:snappy-spark-sql_' + scalaBinaryVersion,
configuration: 'testOutput')
testCompile project(path: ':snappy-spark:snappy-spark-sql-kafka-0.10_' + scalaBinaryVersion, configuration: 'testOutput')
} else {
compile 'io.snappydata:snappy-spark-unsafe_' + scalaBinaryVersion + ':' + snappySparkVersion
compile 'io.snappydata:snappy-spark-core_' + scalaBinaryVersion + ':' + snappySparkVersion
Expand All @@ -74,6 +70,7 @@ dependencies {

testCompile group: 'io.snappydata', name: 'snappy-spark-sql_' + scalaBinaryVersion,
version: snappySparkVersion, classifier: 'tests'
testCompile group: 'io.snappydata', name: 'snappy-spark-sql-kafka-0.10_' + scalaBinaryVersion, version: snappySparkVersion, classifier: 'tests'
}

compile (project(':snappy-core_' + scalaBinaryVersion)) {
Expand Down
144 changes: 0 additions & 144 deletions cluster/conf/log4j.properties.template

This file was deleted.

Loading

0 comments on commit 3594353

Please sign in to comment.