Skip to content

HIVE-29755: Standardize ASF license headers across Hive source Java files - #6668

Open
hemanthumashankar0511 wants to merge 9 commits into
apache:masterfrom
hemanthumashankar0511:asf_licence_headers
Open

HIVE-29755: Standardize ASF license headers across Hive source Java files#6668
hemanthumashankar0511 wants to merge 9 commits into
apache:masterfrom
hemanthumashankar0511:asf_licence_headers

Conversation

@hemanthumashankar0511

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

@okumin

okumin commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Can you remove the following files and ensure CI/CD passes?

I originally started the normalization with an incremental approach because no one can review a big rewrite. I'm happy to review and merge your change if you could.

@hemanthumashankar0511

hemanthumashankar0511 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@okumin I've deleted the three files and the ci passes right now

@okumin

okumin commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

@hemanthumashankar0511 Thank you! Would you mind if I asked you to apply the following changes.

diff --git a/checkstyle/checkstyle.xml b/checkstyle/checkstyle.xml
index 306f8845a5..8448baa630 100644
--- a/checkstyle/checkstyle.xml
+++ b/checkstyle/checkstyle.xml
@@ -62,6 +62,7 @@
   <module name="Translation"/>
 
   <module name="Header">
+    <property name="severity" value="error"/>
     <property name="headerFile" value="${config_loc}/asf.header"/>
   </module>
 
diff --git a/standalone-metastore/checkstyle/checkstyle.xml b/standalone-metastore/checkstyle/checkstyle.xml
index f21bb3a068..0c5558a252 100644
--- a/standalone-metastore/checkstyle/checkstyle.xml
+++ b/standalone-metastore/checkstyle/checkstyle.xml
@@ -62,6 +62,7 @@
   <module name="Translation"/>
 
   <module name="Header">
+    <property name="severity" value="error"/>
     <property name="headerFile" value="${config_loc}/asf.header"/>
   </module>
 
diff --git a/storage-api/checkstyle/checkstyle.xml b/storage-api/checkstyle/checkstyle.xml
index a920085b9b..7fee2c5cf9 100644
--- a/storage-api/checkstyle/checkstyle.xml
+++ b/storage-api/checkstyle/checkstyle.xml
@@ -62,6 +62,7 @@
   <module name="Translation"/>
 
   <module name="Header">
+    <property name="severity" value="error"/>
     <property name="headerFile" value="${config_loc}/asf.header"/>
   </module>

and then to run mvn checkstyle:check? It will let you know the remaining violations.

@hemanthumashankar0511

Copy link
Copy Markdown
Contributor Author

@hemanthumashankar0511 Thank you! Would you mind if I asked you to apply the following changes.

diff --git a/checkstyle/checkstyle.xml b/checkstyle/checkstyle.xml
index 306f8845a5..8448baa630 100644
--- a/checkstyle/checkstyle.xml
+++ b/checkstyle/checkstyle.xml
@@ -62,6 +62,7 @@
   <module name="Translation"/>
 
   <module name="Header">
+    <property name="severity" value="error"/>
     <property name="headerFile" value="${config_loc}/asf.header"/>
   </module>
 
diff --git a/standalone-metastore/checkstyle/checkstyle.xml b/standalone-metastore/checkstyle/checkstyle.xml
index f21bb3a068..0c5558a252 100644
--- a/standalone-metastore/checkstyle/checkstyle.xml
+++ b/standalone-metastore/checkstyle/checkstyle.xml
@@ -62,6 +62,7 @@
   <module name="Translation"/>
 
   <module name="Header">
+    <property name="severity" value="error"/>
     <property name="headerFile" value="${config_loc}/asf.header"/>
   </module>
 
diff --git a/storage-api/checkstyle/checkstyle.xml b/storage-api/checkstyle/checkstyle.xml
index a920085b9b..7fee2c5cf9 100644
--- a/storage-api/checkstyle/checkstyle.xml
+++ b/storage-api/checkstyle/checkstyle.xml
@@ -62,6 +62,7 @@
   <module name="Translation"/>
 
   <module name="Header">
+    <property name="severity" value="error"/>
     <property name="headerFile" value="${config_loc}/asf.header"/>
   </module>

and then to run mvn checkstyle:check? It will let you know the remaining violations.

@okumin One thing I noticed, the Header module seems to expect /* style
comments even for .properties files (e.g. log4j2.properties), which isn't
valid syntax for that file type. Should these be excluded via fileExtensions,
or is there a separate header format expected for non-Java files?

@okumin

okumin commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@hemanthumashankar0511
It likely means our current checkstyle.xml doesn't validate those files anyway. Therefore, I would add fileExtensions in this script, include java, and then create a follow-up ticket to address other extensions such as *.properties. It is incremental, and no degradation happens.
Thank you!

Comment thread .mvn/develocity.xml
specific language governing permissions and limitations
under the License.

Unless required by applicable law or agreed to in writing, software

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to choose the correctly formatted asf header present here https://www.apache.org/legal/src-headers.html#headers
BOTTOM part i.e. after http://www.apache.org/licenses/LICENSE-2.0 has line breaks after different words

ASF website header:

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.    

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Aggarwal-Raghav Thanks for pointing it out. I’ve updated the canonical asf.header to match the ASF website’s wrapped footer formatting and re-aligned the Java headers accordingly. Non-Java headers (e.g. .mvn/develocity.xml, poms, configs) will be handled in a follow-up JIRA.

@hemanthumashankar0511 hemanthumashankar0511 changed the title HIVE-29755: Standardize ASF license headers across Hive source files HIVE-29755: Standardize ASF license headers across Hive source Java files Aug 12, 2026

@okumin okumin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Please check the minor comment and accept the suggesion if I'm not wrong 👍

Comment thread checkstyle/suppressions.xml Outdated
Comment thread checkstyle/suppressions.xml Outdated
hemanthumashankar0511 and others added 2 commits August 12, 2026 20:32
Co-authored-by: Shohei Okumiya <okumin@apache.org>
Co-authored-by: Shohei Okumiya <okumin@apache.org>
@hemanthumashankar0511

Copy link
Copy Markdown
Contributor Author

Created follow up jira to address non java source files: HIVE-29812

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants