Skip to content

Commit 3594353

Browse files
author
Sumedh Wale
authored
Move to log4j 2.17.1 from log4j 1.x (#1570)
- 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
1 parent 85b9010 commit 3594353

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1261
-1137
lines changed

build.gradle

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ buildscript {
3030
classpath 'de.undercouch:gradle-download-task:3.4.3'
3131
classpath 'net.rdrei.android.buildtimetracker:gradle-plugin:0.11.+'
3232
classpath 'com.netflix.nebula:gradle-ospackage-plugin:5.2.+'
33+
// classpath 'org.owasp:dependency-check-gradle:6.5.3'
3334
}
3435
}
3536

3637
apply plugin: 'wrapper'
3738
apply plugin: 'distribution'
3839
apply plugin: 'nebula.ospackage-base'
3940
apply plugin: "nebula.ospackage"
41+
// apply plugin: 'org.owasp.dependencycheck'
4042

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

@@ -56,10 +58,10 @@ allprojects {
5658

5759
repositories {
5860
mavenCentral()
59-
maven { url 'https://repo.hortonworks.com/content/repositories/releases/' }
60-
maven { url "https://repo.spring.io/libs-release" }
61-
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
61+
maven { url 'https://packages.atlassian.com/maven-3rdparty' }
62+
maven { url 'https://repository.cloudera.com/artifactory/cloudera-repos' }
6263
maven { url 'https://app.camunda.com/nexus/content/repositories/public' }
64+
maven { url "https://repo.spring.io/libs-release" }
6365
}
6466

6567
apply plugin: 'java'
@@ -70,7 +72,7 @@ allprojects {
7072
apply plugin: "build-time-tracker"
7173

7274
group = 'io.snappydata'
73-
version = '1.3.0.1'
75+
version = '1.3.1'
7476

7577
// apply compiler options
7678
tasks.withType(JavaCompile) {
@@ -102,32 +104,31 @@ allprojects {
102104
scalaBinaryVersion = '2.11'
103105
scalaVersion = scalaBinaryVersion + '.8'
104106
sparkVersion = '2.1.3'
105-
snappySparkVersion = '2.1.3.1'
107+
snappySparkVersion = '2.1.3.2'
106108
sparkDistName = "spark-${sparkVersion}-bin-hadoop2.7"
107109
sparkCurrentVersion = '2.4.8'
108110
sparkCurrentDistName = "spark-${sparkCurrentVersion}-bin-hadoop2.7"
109111
sparkJobServerVersion = '0.6.2.12'
110112
snappySparkMetricsLibVersion = '2.0.0.1'
111-
log4jVersion = '1.2.17'
112113
log4j2Version = '2.17.1'
113-
slf4jVersion = '1.7.30'
114+
slf4jVersion = '1.7.32'
114115
junitVersion = '4.12'
115116
mockitoVersion = '1.10.19'
116117
hadoopVersion = '3.2.0'
117118
awsSdkVersion = '1.11.375'
118-
gcsHadoop2ConnectorVersion = 'hadoop2-2.0.0'
119-
gcsHadoop3ConnectorVersion = 'hadoop3-2.0.0'
119+
gcsHadoop3ConnectorVersion = 'hadoop3-2.1.2'
120120
sparkAvroVersion = '4.0.0'
121121
sparkXmlVersion = '0.4.1'
122122
scalatestVersion = '2.2.6'
123123
py4jVersion = '0.10.7'
124-
jettyVersion = '9.2.26.v20180806'
124+
jettyVersion = '9.4.44.v20210927'
125125
guavaVersion = '14.0.1'
126-
fastutilVersion = '8.5.4'
126+
fastutilVersion = '8.5.6'
127127
kryoVersion = '4.0.1'
128128
thriftVersion = '0.9.3'
129-
jacksonVersion = '2.9.9'
130-
hiveVersion = '1.21.2.3.1.2.1-1'
129+
jacksonVersion = '2.13.1'
130+
jacksonDatabindVersion = '2.13.1'
131+
hiveVersion = '1.21.2.7.0.3.2-3'
131132
metricsVersion = '4.0.3'
132133
metrics2Version = '2.2.0'
133134
janinoVersion = '3.0.8'
@@ -771,6 +772,17 @@ subprojects {
771772
"org.apache.hadoop:hadoop-yarn-server-web-proxy:${hadoopVersion}"
772773
exclude(group: 'org.mortbay.jetty', module: 'servlet-api')
773774
}
775+
def projectName = it.name
776+
if (projectName != 'gemfire-shared') {
777+
configurations.all {
778+
if (projectName != 'snappy-core_' + scalaBinaryVersion ||
779+
it.name == 'compileOnly') {
780+
exclude(group: 'log4j', module: 'log4j')
781+
exclude(group: 'log4j', module: 'apache-log4j-extras')
782+
exclude(group: 'org.slf4j', module: 'slf4j-log4j12')
783+
}
784+
}
785+
}
774786
/*
775787
configurations.testRuntime {
776788
// below is included indirectly by hadoop deps and conflicts with embedded 1.5.7 apacheds

cluster/build.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ dependencies {
2929
compile 'org.scala-lang:scala-library:' + scalaVersion
3030
compile 'org.scala-lang:scala-reflect:' + scalaVersion
3131

32-
compile 'org.slf4j:slf4j-api:' + slf4jVersion
33-
compile 'org.slf4j:slf4j-log4j12:' + slf4jVersion
34-
compile 'org.slf4j:jcl-over-slf4j:' + slf4jVersion
35-
compile 'org.slf4j:jul-to-slf4j:' + slf4jVersion
36-
3732
if (new File(rootDir, 'spark/build.gradle').exists()) {
3833
compile project(':snappy-spark:snappy-spark-unsafe_' + scalaBinaryVersion)
3934
compile project(':snappy-spark:snappy-spark-core_' + scalaBinaryVersion)
@@ -54,6 +49,7 @@ dependencies {
5449

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

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

7976
compile (project(':snappy-core_' + scalaBinaryVersion)) {

cluster/conf/log4j.properties.template

Lines changed: 0 additions & 144 deletions
This file was deleted.

0 commit comments

Comments
 (0)