You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "Copilot (via GitHub)" <gi...@apache.org> on 2025/11/21 06:06:52 UTC

Re: [PR] [SPARK-54445][SQL][TESTS] Fix configuration related to `ThresholdFilter` in `log4j2.properties` within `hive-thriftserver` module [spark]

Copilot commented on code in PR #53139:
URL: https://github.com/apache/spark/pull/53139#discussion_r2548645978


##########
sql/hive-thriftserver/src/test/resources/log4j2.properties:
##########
@@ -39,10 +37,8 @@ appender.file.fileName = target/unit-tests.log
 appender.file.layout.type = PatternLayout
 appender.file.layout.pattern = %d{HH:mm:ss.SSS} %t %p %c{1}: %m%n%ex
 
-appender.file.filter.1.type = Filters
-
-appender.file.filter.1.a.type = ThresholdFilter
-appender.file.filter.1.a.level = debug
+appender.file.filter.1.type = ThresholdFilter
+appender.file.filter.1.level = debug

Review Comment:
   The filter naming uses numeric identifiers (`filter.1`) while other log4j2.properties files in the codebase use descriptive names (`filter.threshold`). For consistency with `sql/core/src/test/resources/log4j2.properties` and `sql/hive/src/test/resources/log4j2.properties`, consider using:
   ```
   appender.file.filter.threshold.type = ThresholdFilter
   appender.file.filter.threshold.level = debug
   ```
   ```suggestion
   appender.file.filter.threshold.type = ThresholdFilter
   appender.file.filter.threshold.level = debug
   ```



##########
sql/hive-thriftserver/src/test/resources/log4j2.properties:
##########
@@ -27,10 +27,8 @@ appender.console.target = SYSTEM_OUT
 appender.console.layout.type = PatternLayout
 appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c: %maxLen{%m}{512}%n%ex{8}%n
 
-appender.console.filter.1.type = Filters
-
-appender.console.filter.1.a.type = ThresholdFilter
-appender.console.filter.1.a.level = warn
+appender.console.filter.1.type = ThresholdFilter
+appender.console.filter.1.level = warn

Review Comment:
   The filter naming uses numeric identifiers (`filter.1`) while other log4j2.properties files in the codebase use descriptive names (`filter.threshold`). For consistency with `sql/core/src/test/resources/log4j2.properties` and `sql/hive/src/test/resources/log4j2.properties`, consider using:
   ```
   appender.console.filter.threshold.type = ThresholdFilter
   appender.console.filter.threshold.level = warn
   ```
   and similarly for the file appender:
   ```
   appender.file.filter.threshold.type = ThresholdFilter
   appender.file.filter.threshold.level = debug
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org