[
https://issues.apache.org/jira/browse/HIVE-29182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stamatis Zampetakis resolved HIVE-29182.
----------------------------------------
Fix Version/s: 4.2.0
Resolution: Fixed
Fixed in
https://github.com/apache/hive/commit/2be939c1b841a8f8306183112ebd7dc0f88c2da0
> Upgrade maven-checkstyle-plugin version from 2.17 to 3.5.0
> ----------------------------------------------------------
>
> Key: HIVE-29182
> URL: https://issues.apache.org/jira/browse/HIVE-29182
> Project: Hive
> Issue Type: Bug
> Reporter: Stamatis Zampetakis
> Assignee: Stamatis Zampetakis
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.2.0
>
>
> The majority of the modules (except Iceberg) use a pretty old version of the
> plugin. The 2.17 was [released on
> 2015-10-15|https://maven.apache.org/plugins/maven-checkstyle-plugin/history.html]
> and by default it uses Checkstyle 6.11.2, which is also very old.
> The 2.17/6.11.2 version has various bugs that prevent the checks from running
> in many modules. Currently the following command fails on master: (commit
> 97a9677f6ca5561eceab0b6bb5fa14b6c9818803).
> {noformat}
> $ mvn clean install -DskipTests -Pitests
> $ mvn checkstyle:checkstyle -Pitests -fn
> ...
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-checkstyle-plugin:2.17:checkstyle
> (default-cli) on project hive-common: An error has occurred in Checkstyle
> report generation.: Failed during checkstyle configuration:
> TokenStreamRecognitionException occurred during the analysis of file
> /home/zabetak/Projects/Apache/hive/common/src/java/org/apache/hadoop/hive/common/format/datetime/HiveSqlDateTimeFormatter.java.
> unexpected char: 0xA -> [Help 1]
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-checkstyle-plugin:2.17:checkstyle
> (default-cli) on project hive-standalone-metastore-client: An error has
> occurred in Checkstyle report generation.: Failed during checkstyle
> execution: Unable to find configuration file at location:
> /home/zabetak/Projects/Apache/hive/standalone-metastore/metastore-client/./checkstyle/checkstyle.xml:
> Could not find resource
> '/home/zabetak/Projects/Apache/hive/standalone-metastore/metastore-client/./checkstyle/checkstyle.xml'.
> -> [Help 1]
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-checkstyle-plugin:2.17:checkstyle
> (default-cli) on project hive-standalone-metastore-server: An error has
> occurred in Checkstyle report generation.: Failed during checkstyle
> configuration: MismatchedTokenException occurred during the analysis of file
> /home/zabetak/Projects/Apache/hive/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/MetastoreRuleFactory.java.
> expecting EOF, found 'case' -> [Help 1]
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-checkstyle-plugin:2.17:checkstyle
> (default-cli) on project hive-exec: An error has occurred in Checkstyle
> report generation.: Failed during checkstyle configuration:
> MismatchedTokenException occurred during the analysis of file
> /home/zabetak/Projects/Apache/hive/ql/src/java/org/apache/hadoop/hive/ql/io/CombineHiveInputFormat.java.
> expecting EOF, found '}' -> [Help 1]
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-checkstyle-plugin:2.17:checkstyle
> (default-cli) on project hive-hcatalog-core: An error has occurred in
> Checkstyle report generation.: Failed during checkstyle configuration:
> MismatchedTokenException occurred during the analysis of file
> /home/zabetak/Projects/Apache/hive/hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HCatUtil.java.
> expecting EOF, found 'case' -> [Help 1]
> {noformat}
> Upgrading to 3.5.0 resolves most of the errors above and allows us to take
> advantage all the recent improvements done in the plugin and Checkstyle. The
> 3.5.0 version is also the one used currently in the Iceberg modules so it
> makes the entire handling more uniform.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)