Skip to content

Commit 662f0ff

Browse files
authored
PHOENIX-7600 - Replace commons-logging with slf4j (#179)
1 parent 17f3c37 commit 662f0ff

File tree

7 files changed

+32
-0
lines changed

7 files changed

+32
-0
lines changed

bin/phoenix_queryserver_utils.py

+5
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def setPath():
8686
PHOENIX_LOADBALANCER_JAR_PATTERN = "load-balancer-*[!t][!e][!s][!t][!s].jar"
8787
SQLLINE_WITH_DEPS_PATTERN = "sqlline-*-jar-with-dependencies.jar"
8888
SLF4J_BACKEND_JAR_PATTERN = "log4j-slf4j*.jar"
89+
JCL_OVER_SLF4J_PATTERN = "jcl-over-slf4j*.jar"
8990
LOGGING_JAR_PATTERN = "log4j-core*.jar"
9091
LOGGING_JAR_PATTERN2 = "log4j-api*.jar"
9192
LOGGING_JAR_PATTERN3 = "log4j-1.2-api*.jar"
@@ -173,6 +174,9 @@ def setPath():
173174
if slf4j_backend_jar is None or slf4j_backend_jar == "":
174175
slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_BACKEND_JAR_PATTERN, os.path.join(current_dir, "..","lib"))
175176

177+
global jcl_over_slf4j
178+
jcl_over_slf4j = findFileInPathWithoutRecursion(JCL_OVER_SLF4J_PATTERN, os.path.join(current_dir, "..","lib"))
179+
176180
global logging_jar
177181
logging_jar = os.environ.get(OVERRIDE_LOGGING)
178182
if logging_jar is None or logging_jar == "":
@@ -292,6 +296,7 @@ def common_sqlline_args(parser):
292296
print("phoenix_thin_client_jar:", phoenix_thin_client_jar)
293297
print("sqlline_with_deps_jar", sqlline_with_deps_jar)
294298
print("slf4j_backend_jar:", slf4j_backend_jar)
299+
print("jcl_over_slf4j:", jcl_over_slf4j)
295300
print("java_home:", java_home)
296301
print("java:", java)
297302
print("jvm_module_flags:", jvm_module_flags)

bin/queryserver.py

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def tryQuote(unquoted_input):
108108
hadoop_conf_dir + os.pathsep + \
109109
phoenix_queryserver_utils.slf4j_backend_jar + os.pathsep + \
110110
phoenix_queryserver_utils.logging_jar + os.pathsep + \
111+
phoenix_queryserver_utils.jcl_over_slf4j + os.pathsep + \
111112
phoenix_queryserver_utils.phoenix_client_jar + os.pathsep + \
112113
phoenix_queryserver_utils.phoenix_queryserver_jar + \
113114
" -Dproc_phoenixserver" + \

phoenix-queryserver-assembly/pom.xml

+4
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
<groupId>org.apache.logging.log4j</groupId>
6363
<artifactId>log4j-1.2-api</artifactId>
6464
</dependency>
65+
<dependency>
66+
<groupId>org.slf4j</groupId>
67+
<artifactId>jcl-over-slf4j</artifactId>
68+
</dependency>
6569
</dependencies>
6670

6771
<build>

phoenix-queryserver-assembly/src/assembly/cluster.xml

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<include>org.apache.logging.log4j:log4j-api</include>
6464
<include>org.apache.logging.log4j:log4j-core</include>
6565
<include>org.apache.logging.log4j:log4j-1.2-api</include>
66+
<include>org.slf4j:jcl-over-slf4j</include>
6667
</includes>
6768
</dependencySet>
6869
<dependencySet>

phoenix-queryserver-it/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@
208208
<artifactId>log4j-slf4j-impl</artifactId>
209209
<scope>test</scope>
210210
</dependency>
211+
<dependency>
212+
<groupId>org.slf4j</groupId>
213+
<artifactId>jcl-over-slf4j</artifactId>
214+
<scope>test</scope>
215+
</dependency>
211216
<dependency>
212217
<groupId>org.apache.logging.log4j</groupId>
213218
<artifactId>log4j-1.2-api</artifactId>

phoenix-queryserver-orchestrator/pom.xml

+7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
org.apache.hbase:hbase-it
5050
</ignoredUnusedDeclaredDependency>
5151
</ignoredUnusedDeclaredDependencies>
52+
<!-- dependency:analyze is quite useless for hadoop test dependencies -->
53+
<ignoreNonCompile>true</ignoreNonCompile>
5254
</configuration>
5355
</plugin>
5456
</plugins>
@@ -59,6 +61,11 @@
5961
<groupId>org.slf4j</groupId>
6062
<artifactId>slf4j-api</artifactId>
6163
</dependency>
64+
<dependency>
65+
<groupId>org.slf4j</groupId>
66+
<artifactId>jcl-over-slf4j</artifactId>
67+
<scope>test</scope>
68+
</dependency>
6269
<dependency>
6370
<groupId>net.sourceforge.argparse4j</groupId>
6471
<artifactId>argparse4j</artifactId>

pom.xml

+9
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,11 @@
761761
<artifactId>slf4j-api</artifactId>
762762
<version>${slf4j.version}</version>
763763
</dependency>
764+
<dependency>
765+
<groupId>org.slf4j</groupId>
766+
<artifactId>jcl-over-slf4j</artifactId>
767+
<version>${slf4j.version}</version>
768+
</dependency>
764769
<dependency>
765770
<groupId>org.apache.logging.log4j</groupId>
766771
<artifactId>log4j-api</artifactId>
@@ -809,6 +814,10 @@
809814
<groupId>org.jruby</groupId>
810815
<artifactId>jruby-complete</artifactId>
811816
</exclusion>
817+
<exclusion>
818+
<groupId>commons-logging</groupId>
819+
<artifactId>commons-logging</artifactId>
820+
</exclusion>
812821
</exclusions>
813822
</dependency>
814823
<dependency>

0 commit comments

Comments
 (0)