You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by Nihal Jain <ni...@apache.org> on 2025/04/10 11:13:42 UTC

Re: [DISCUSS] Use spotless to auto format pom and java code

Hello everyone,

The PR to add spotless to Phoenix is ready for review. We plan to do this in 3 steps as discussed here before i.e.
- Add spotless plugin to format code in phoenix: Please review PR at https://github.com/apache/phoenix/pull/2023
- Run spotless:apply to format code in phoenix: Please review PR at https://github.com/apache/phoenix/pull/2024
- Add spotless phoenix pre commit check: We will raise a new PR with yetus related change at https://github.com/apache/phoenix/commit/5c6da6415a9230715e8d7d732060a44c735de8b0 to automate. Once this final PR gets in, builds will require developers to fix spotless issues before changes are merged. 

Please go over the above-mentioned PRs once and let us know if any objections or any changes are needed.

Regrads,
Nihal

On 2025/01/09 06:44:35 Istvan Toth wrote:
> When we apply the big bang reformat step, we should also make sure that
> spotless is included in the Yetus CI checks.
> 
> I'm not sure if Yetus would applies spotless automatically if it is present
> in the maven, or if some changes are needed.
> If changes are needed, I may be able to assist with them.
> 
> Istvan
> 
> On Mon, Oct 21, 2024 at 9:25 PM Nihal Jain <ni...@apache.org> wrote:
> 
> > Updated https://issues.apache.org/jira/browse/PHOENIX-6851 with a list of
> > sub-tasks as summarised previously.
> >
> > On 2024/10/18 17:20:18 Istvan Toth wrote:
> > > Thank you Nihal, I support the plan.
> > >
> > > I only ask that we delay landing the changes on 5.2 until after we have
> > > released 5.2.1.
> > > ( I really hope to cut the next RC next week, as all HBase 2.6.1 related
> > > issues seem to be fixed.)
> > >
> > > On Fri, Oct 18, 2024 at 6:09 PM Nihal Jain <ni...@gmail.com>
> > wrote:
> > >
> > > > Hi all,
> > > >
> > > > Following  previous discussions on this thread and recent discussion
> > in PR
> > > > https://github.com/apache/phoenix/pull/1995, I would like to revisit
> > the
> > > > topic of implementing the Spotless plugin for code formatting in
> > Phoenix.
> > > > The goal is to improve code consistency across the project and make it
> > > > easier for new contributors to onboard.
> > > >
> > > > Here is a summary of the proposed plan based on recent discussions and
> > past
> > > > experiences:
> > > >
> > > > 1) Integrate the Spotless plugin and update the code template:
> > > >
> > > > * Integrate the Spotless plugin into the Phoenix project. This will
> > allow
> > > > us to standardize code formatting through Maven, reducing reliance on
> > > > IDE-specific formatting rules.
> > > >
> > > > * Update the development template (dev/PhoenixCodeTemplate.xml) to
> > sync the
> > > > formatting standards used in HBase.
> > > >
> > > > * Align the license header with the one used by HBase for consistency.
> > > >
> > > > 2) Apply Spotless to reformat the entire codebase:
> > > >
> > > > * Apply the Spotless plugin to reformat the entire codebase. This will
> > be
> > > > done in a single commit to minimize noise in future patches.
> > > >
> > > > * No manual changes should be made in this PR, for ease of review
> > > >
> > > > 3) Add Spotless to the pre-commit checks:
> > > >
> > > > * Integrate Spotless checks into the pre-commit process to ensure code
> > > > consistency moving forward.
> > > >
> > > > * We may want to add this step only after the initial reformatting is
> > > > complete to avoid build failures and ease of backport to other
> > branches.
> > > >
> > > > Hence we plan to create 3 separate JIRA sub-tasks to handle each of
> > above
> > > > memtioned steps independently and repeat for all active branches i.e
> > 5.1,
> > > > 5.2 and master.
> > > >
> > > > I want to acknowledge that Aman Poonia initially raised this topic and
> > > > began the work. My involvement was unintentional, and I am grateful
> > for the
> > > > foundation laid by Aman.
> > > >
> > > > Additionally, I would like to thank Istvan Toth and Lars Francke for
> > their
> > > > interest and for pointing me to the right resources. Your feedback and
> > > > suggestions are crucial.
> > > >
> > > > Please let me know if you have any concerns or additional points to
> > > > consider.
> > > >
> > > > Best regards,
> > > >
> > > > Nihal Jain
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, 18 Oct 2024 at 5:07 PM, Lars Francke <la...@gmail.com>
> > > > wrote:
> > > >
> > > > > Ah! Excellent, I managed to miss that in my research. Thank you very
> > > > much.
> > > > >
> > > > > On Fri, Oct 18, 2024 at 1:26 PM Istvan Toth
> > <st...@cloudera.com.invalid>
> > > > > wrote:
> > > > > >
> > > > > > Nihal Jain has taken this up recently, and has opened
> > > > > >
> > > > > > https://github.com/apache/phoenix/pull/1995
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Fri, Oct 18, 2024 at 12:50 PM Lars Francke <
> > larsfrancke@apache.org>
> > > > > > wrote:
> > > > > >
> > > > > > > Sorry to dig up this old thread.
> > > > > > >
> > > > > > > I'm working with the Phoenix source code for the first time in
> > years
> > > > > and
> > > > > > > as Istvan said: The current codebase is not great in terms of
> > > > > consistency.
> > > > > > > It makes life for new contributors harder than it needs to be.
> > > > > > >
> > > > > > > I actually checked and there are old Eclipse style files checked
> > in.
> > > > I
> > > > > > > can't load them in recent versions of IntelliJ and I suspect most
> > > > > people
> > > > > > > don't look at this at all....
> > > > > > >
> > > > > > > Aman, can I ask about your plans on this? Do you plan on pushing
> > this
> > > > > > > forward? If not, I might try to take over.
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > *Email*: stoty@cloudera.com
> > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> > [image:
> > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image:
> > > > > Cloudera
> > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > ------------------------------
> > > > > > ------------------------------
> > > > >
> > > >
> > >
> > >
> > > --
> > > *István Tóth* | Sr. Staff Software Engineer
> > > *Email*: stoty@cloudera.com
> > > cloudera.com <https://www.cloudera.com>
> > > [image: Cloudera] <https://www.cloudera.com/>
> > > [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> > > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image:
> > Cloudera
> > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > ------------------------------
> > > ------------------------------
> > >
> >
> 
> 
> -- 
> *István Tóth* | Sr. Staff Software Engineer
> *Email*: stoty@cloudera.com
> cloudera.com <https://www.cloudera.com>
> [image: Cloudera] <https://www.cloudera.com/>
> [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
> on LinkedIn] <https://www.linkedin.com/company/cloudera>
> ------------------------------
> ------------------------------
> 

Re: [DISCUSS] Use spotless to auto format pom and java code

Posted by Nihal Jain <ni...@apache.org>.
Hello everyone,

All the changes needed for spotless has been merged to branches 5.2 and 5.1 as well. Going forward if any spotless issues are detected, build will fail on these branches too. 

Please ensure to run `mvn spotless:apply` to fix these.

Thank you to all those who participated here.

Regards,
Nihal

On 2025/07/30 20:28:35 Nihal Jain wrote:
> Hi Istvan,
> 
> >  Do you plan to apply this to 5.2 and 5.1 now that it's finished on master ?
> 
> Yes I do plan to apply this on all active branches i.e. 5.2 and 5.1
> 
> AFAIK spotless is running stable on master now. Let me put up backport PRs in next few days.
> 
> Regards,
> Nihal
> 
> On 2025/07/28 06:32:15 Istvan Toth wrote:
> > Thanks a lot Nihal.
> > 
> > The consensus seems to be that we should do this on all active branches.
> > 
> > Do you plan to apply this to 5.2 and 5.1 now that it's finished on master ?
> > 
> > Istvan
> > 
> > On Mon, Jul 21, 2025 at 5:29 PM Nihal Jain <ni...@apache.org> wrote:
> > 
> > > Hi Rahul,
> > >
> > > Thanks for bringing to our attention, filed
> > > https://issues.apache.org/jira/browse/PHOENIX-7676 and raised
> > > https://github.com/apache/phoenix/pull/2240 with a fix.
> > >
> > > Regards,
> > > Nihal
> > >
> > > On 2025/07/21 06:48:16 Rahul Kumar wrote:
> > > > Hi Nihal,
> > > >
> > > > Shouldn't we disable checkstyle validation for PR going forward ? I see,
> > > > for the changes where spotless checks are being applied, it is failing
> > > > checkstyle validation.
> > > > Checkstyle validation failure :
> > > >
> > > https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-2238/2/artifact/yetus-general-check/output/results-checkstyle-phoenix-core-client.txt
> > > >
> > > > Thanks
> > > > Rahul
> > > >
> > > > On Mon, Jul 21, 2025 at 10:39 AM Nihal Jain <ni...@apache.org>
> > > wrote:
> > > >
> > > > > Hello everyone,
> > > > >
> > > > > All the changes needed for spotless has been merged in master of
> > > > > apache-phoenix. Going forward build will fail, if any spotless issues
> > > are
> > > > > detected, on master. Please ensure to run `mvn spotless:apply` to fix
> > > > > these.
> > > > >
> > > > > For any new PRs:  we should run `mvn spotless:apply`  before raising
> > > them,
> > > > > else spotless check will fail during build, if any issues are detected!
> > > > >
> > > > > For existing PRs: please rebase to latest code and run spotless before
> > > we
> > > > > merge.
> > > > >
> > > > > I would like to thank Istvan, Viraj and Lars for all the reviews and
> > > help.
> > > > >
> > > > > We may need to discuss / pull this in all active branches to keep
> > > > > backports easier.
> > > > >
> > > > > Regards,
> > > > > Nihal
> > > > >
> > > > > On 2025/04/16 14:38:10 Nihal Jain wrote:
> > > > > > Hi all,
> > > > > >
> > > > > > Updating the thread with the progress and requesting for reviews.
> > > > > >
> > > > > > > - Add spotless plugin to format code in phoenix: Please review PR
> > > at
> > > > > https://github.com/apache/phoenix/pull/2023
> > > > > >
> > > > > > PR to add spotless has been merged to codebase. Thank you Istvan for
> > > the
> > > > > help.
> > > > > >
> > > > > > > - Run spotless:apply to format code in phoenix: Please review PR at
> > > > > https://github.com/apache/phoenix/pull/2024
> > > > > >
> > > > > > We still need more reviewers for the spotless reformat using "mvn
> > > > > spotless:apply" on the entire code base which is done as part of
> > > > > https://github.com/apache/phoenix/pull/2024 (as the change is very
> > > huge).
> > > > > >
> > > > > > > - Add spotless phoenix pre commit check:
> > > > > >
> > > > > > Also I have raised PR for automated spotless check in pre commit at
> > > > > https://github.com/apache/phoenix/pull/2119
> > > > > >
> > > > > > Regards,
> > > > > > Nihal
> > > > > >
> > > > > > On 2025/04/10 11:13:42 Nihal Jain wrote:
> > > > > > > Hello everyone,
> > > > > > >
> > > > > > > The PR to add spotless to Phoenix is ready for review. We plan to
> > > do
> > > > > this in 3 steps as discussed here before i.e.
> > > > > > > - Add spotless plugin to format code in phoenix: Please review PR
> > > at
> > > > > https://github.com/apache/phoenix/pull/2023
> > > > > > > - Run spotless:apply to format code in phoenix: Please review PR at
> > > > > https://github.com/apache/phoenix/pull/2024
> > > > > > > - Add spotless phoenix pre commit check: We will raise a new PR
> > > with
> > > > > yetus related change at
> > > > >
> > > https://github.com/apache/phoenix/commit/5c6da6415a9230715e8d7d732060a44c735de8b0
> > > > > to automate. Once this final PR gets in, builds will require
> > > developers to
> > > > > fix spotless issues before changes are merged.
> > > > > > >
> > > > > > > Please go over the above-mentioned PRs once and let us know if any
> > > > > objections or any changes are needed.
> > > > > > >
> > > > > > > Regrads,
> > > > > > > Nihal
> > > > > > >
> > > > > > > On 2025/01/09 06:44:35 Istvan Toth wrote:
> > > > > > > > When we apply the big bang reformat step, we should also make
> > > sure
> > > > > that
> > > > > > > > spotless is included in the Yetus CI checks.
> > > > > > > >
> > > > > > > > I'm not sure if Yetus would applies spotless automatically if it
> > > is
> > > > > present
> > > > > > > > in the maven, or if some changes are needed.
> > > > > > > > If changes are needed, I may be able to assist with them.
> > > > > > > >
> > > > > > > > Istvan
> > > > > > > >
> > > > > > > > On Mon, Oct 21, 2024 at 9:25 PM Nihal Jain <nihaljain@apache.org
> > > >
> > > > > wrote:
> > > > > > > >
> > > > > > > > > Updated https://issues.apache.org/jira/browse/PHOENIX-6851
> > > with a
> > > > > list of
> > > > > > > > > sub-tasks as summarised previously.
> > > > > > > > >
> > > > > > > > > On 2024/10/18 17:20:18 Istvan Toth wrote:
> > > > > > > > > > Thank you Nihal, I support the plan.
> > > > > > > > > >
> > > > > > > > > > I only ask that we delay landing the changes on 5.2 until
> > > after
> > > > > we have
> > > > > > > > > > released 5.2.1.
> > > > > > > > > > ( I really hope to cut the next RC next week, as all HBase
> > > 2.6.1
> > > > > related
> > > > > > > > > > issues seem to be fixed.)
> > > > > > > > > >
> > > > > > > > > > On Fri, Oct 18, 2024 at 6:09 PM Nihal Jain <
> > > > > nihaljain.cs@gmail.com>
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Hi all,
> > > > > > > > > > >
> > > > > > > > > > > Following  previous discussions on this thread and recent
> > > > > discussion
> > > > > > > > > in PR
> > > > > > > > > > > https://github.com/apache/phoenix/pull/1995, I would like
> > > to
> > > > > revisit
> > > > > > > > > the
> > > > > > > > > > > topic of implementing the Spotless plugin for code
> > > formatting
> > > > > in
> > > > > > > > > Phoenix.
> > > > > > > > > > > The goal is to improve code consistency across the project
> > > and
> > > > > make it
> > > > > > > > > > > easier for new contributors to onboard.
> > > > > > > > > > >
> > > > > > > > > > > Here is a summary of the proposed plan based on recent
> > > > > discussions and
> > > > > > > > > past
> > > > > > > > > > > experiences:
> > > > > > > > > > >
> > > > > > > > > > > 1) Integrate the Spotless plugin and update the code
> > > template:
> > > > > > > > > > >
> > > > > > > > > > > * Integrate the Spotless plugin into the Phoenix project.
> > > This
> > > > > will
> > > > > > > > > allow
> > > > > > > > > > > us to standardize code formatting through Maven, reducing
> > > > > reliance on
> > > > > > > > > > > IDE-specific formatting rules.
> > > > > > > > > > >
> > > > > > > > > > > * Update the development template
> > > > > (dev/PhoenixCodeTemplate.xml) to
> > > > > > > > > sync the
> > > > > > > > > > > formatting standards used in HBase.
> > > > > > > > > > >
> > > > > > > > > > > * Align the license header with the one used by HBase for
> > > > > consistency.
> > > > > > > > > > >
> > > > > > > > > > > 2) Apply Spotless to reformat the entire codebase:
> > > > > > > > > > >
> > > > > > > > > > > * Apply the Spotless plugin to reformat the entire
> > > codebase.
> > > > > This will
> > > > > > > > > be
> > > > > > > > > > > done in a single commit to minimize noise in future
> > > patches.
> > > > > > > > > > >
> > > > > > > > > > > * No manual changes should be made in this PR, for ease of
> > > > > review
> > > > > > > > > > >
> > > > > > > > > > > 3) Add Spotless to the pre-commit checks:
> > > > > > > > > > >
> > > > > > > > > > > * Integrate Spotless checks into the pre-commit process to
> > > > > ensure code
> > > > > > > > > > > consistency moving forward.
> > > > > > > > > > >
> > > > > > > > > > > * We may want to add this step only after the initial
> > > > > reformatting is
> > > > > > > > > > > complete to avoid build failures and ease of backport to
> > > other
> > > > > > > > > branches.
> > > > > > > > > > >
> > > > > > > > > > > Hence we plan to create 3 separate JIRA sub-tasks to handle
> > > > > each of
> > > > > > > > > above
> > > > > > > > > > > memtioned steps independently and repeat for all active
> > > > > branches i.e
> > > > > > > > > 5.1,
> > > > > > > > > > > 5.2 and master.
> > > > > > > > > > >
> > > > > > > > > > > I want to acknowledge that Aman Poonia initially raised
> > > this
> > > > > topic and
> > > > > > > > > > > began the work. My involvement was unintentional, and I am
> > > > > grateful
> > > > > > > > > for the
> > > > > > > > > > > foundation laid by Aman.
> > > > > > > > > > >
> > > > > > > > > > > Additionally, I would like to thank Istvan Toth and Lars
> > > > > Francke for
> > > > > > > > > their
> > > > > > > > > > > interest and for pointing me to the right resources. Your
> > > > > feedback and
> > > > > > > > > > > suggestions are crucial.
> > > > > > > > > > >
> > > > > > > > > > > Please let me know if you have any concerns or additional
> > > > > points to
> > > > > > > > > > > consider.
> > > > > > > > > > >
> > > > > > > > > > > Best regards,
> > > > > > > > > > >
> > > > > > > > > > > Nihal Jain
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Fri, 18 Oct 2024 at 5:07 PM, Lars Francke <
> > > > > lars.francke@gmail.com>
> > > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Ah! Excellent, I managed to miss that in my research.
> > > Thank
> > > > > you very
> > > > > > > > > > > much.
> > > > > > > > > > > >
> > > > > > > > > > > > On Fri, Oct 18, 2024 at 1:26 PM Istvan Toth
> > > > > > > > > <st...@cloudera.com.invalid>
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Nihal Jain has taken this up recently, and has opened
> > > > > > > > > > > > >
> > > > > > > > > > > > > https://github.com/apache/phoenix/pull/1995
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Fri, Oct 18, 2024 at 12:50 PM Lars Francke <
> > > > > > > > > larsfrancke@apache.org>
> > > > > > > > > > > > > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > Sorry to dig up this old thread.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I'm working with the Phoenix source code for the
> > > first
> > > > > time in
> > > > > > > > > years
> > > > > > > > > > > > and
> > > > > > > > > > > > > > as Istvan said: The current codebase is not great in
> > > > > terms of
> > > > > > > > > > > > consistency.
> > > > > > > > > > > > > > It makes life for new contributors harder than it
> > > needs
> > > > > to be.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I actually checked and there are old Eclipse style
> > > files
> > > > > checked
> > > > > > > > > in.
> > > > > > > > > > > I
> > > > > > > > > > > > > > can't load them in recent versions of IntelliJ and I
> > > > > suspect most
> > > > > > > > > > > > people
> > > > > > > > > > > > > > don't look at this at all....
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Aman, can I ask about your plans on this? Do you
> > > plan on
> > > > > pushing
> > > > > > > > > this
> > > > > > > > > > > > > > forward? If not, I might try to take over.
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > --
> > > > > > > > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > > > > > > > *Email*: stoty@cloudera.com
> > > > > > > > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > > > > > > > [image: Cloudera on Twitter] <
> > > https://twitter.com/cloudera
> > > > > >
> > > > > > > > > [image:
> > > > > > > > > > > > > Cloudera on Facebook] <
> > > https://www.facebook.com/cloudera>
> > > > > [image:
> > > > > > > > > > > > Cloudera
> > > > > > > > > > > > > on LinkedIn] <
> > > https://www.linkedin.com/company/cloudera>
> > > > > > > > > > > > > ------------------------------
> > > > > > > > > > > > > ------------------------------
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > > > > *Email*: stoty@cloudera.com
> > > > > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> > > > > [image:
> > > > > > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera>
> > > > > [image:
> > > > > > > > > Cloudera
> > > > > > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > > > > > ------------------------------
> > > > > > > > > > ------------------------------
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > > *Email*: stoty@cloudera.com
> > > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> > > [image:
> > > > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera>
> > > [image:
> > > > > Cloudera
> > > > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > > > ------------------------------
> > > > > > > > ------------------------------
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > 
> > 
> > -- 
> > *István Tóth* | Sr. Staff Software Engineer
> > *Email*: stoty@cloudera.com
> > cloudera.com <https://www.cloudera.com>
> > [image: Cloudera] <https://www.cloudera.com/>
> > [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
> > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > ------------------------------
> > ------------------------------
> > 
> 

Re: [DISCUSS] Use spotless to auto format pom and java code

Posted by Nihal Jain <ni...@apache.org>.
Hi Istvan,

>  Do you plan to apply this to 5.2 and 5.1 now that it's finished on master ?

Yes I do plan to apply this on all active branches i.e. 5.2 and 5.1

AFAIK spotless is running stable on master now. Let me put up backport PRs in next few days.

Regards,
Nihal

On 2025/07/28 06:32:15 Istvan Toth wrote:
> Thanks a lot Nihal.
> 
> The consensus seems to be that we should do this on all active branches.
> 
> Do you plan to apply this to 5.2 and 5.1 now that it's finished on master ?
> 
> Istvan
> 
> On Mon, Jul 21, 2025 at 5:29 PM Nihal Jain <ni...@apache.org> wrote:
> 
> > Hi Rahul,
> >
> > Thanks for bringing to our attention, filed
> > https://issues.apache.org/jira/browse/PHOENIX-7676 and raised
> > https://github.com/apache/phoenix/pull/2240 with a fix.
> >
> > Regards,
> > Nihal
> >
> > On 2025/07/21 06:48:16 Rahul Kumar wrote:
> > > Hi Nihal,
> > >
> > > Shouldn't we disable checkstyle validation for PR going forward ? I see,
> > > for the changes where spotless checks are being applied, it is failing
> > > checkstyle validation.
> > > Checkstyle validation failure :
> > >
> > https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-2238/2/artifact/yetus-general-check/output/results-checkstyle-phoenix-core-client.txt
> > >
> > > Thanks
> > > Rahul
> > >
> > > On Mon, Jul 21, 2025 at 10:39 AM Nihal Jain <ni...@apache.org>
> > wrote:
> > >
> > > > Hello everyone,
> > > >
> > > > All the changes needed for spotless has been merged in master of
> > > > apache-phoenix. Going forward build will fail, if any spotless issues
> > are
> > > > detected, on master. Please ensure to run `mvn spotless:apply` to fix
> > > > these.
> > > >
> > > > For any new PRs:  we should run `mvn spotless:apply`  before raising
> > them,
> > > > else spotless check will fail during build, if any issues are detected!
> > > >
> > > > For existing PRs: please rebase to latest code and run spotless before
> > we
> > > > merge.
> > > >
> > > > I would like to thank Istvan, Viraj and Lars for all the reviews and
> > help.
> > > >
> > > > We may need to discuss / pull this in all active branches to keep
> > > > backports easier.
> > > >
> > > > Regards,
> > > > Nihal
> > > >
> > > > On 2025/04/16 14:38:10 Nihal Jain wrote:
> > > > > Hi all,
> > > > >
> > > > > Updating the thread with the progress and requesting for reviews.
> > > > >
> > > > > > - Add spotless plugin to format code in phoenix: Please review PR
> > at
> > > > https://github.com/apache/phoenix/pull/2023
> > > > >
> > > > > PR to add spotless has been merged to codebase. Thank you Istvan for
> > the
> > > > help.
> > > > >
> > > > > > - Run spotless:apply to format code in phoenix: Please review PR at
> > > > https://github.com/apache/phoenix/pull/2024
> > > > >
> > > > > We still need more reviewers for the spotless reformat using "mvn
> > > > spotless:apply" on the entire code base which is done as part of
> > > > https://github.com/apache/phoenix/pull/2024 (as the change is very
> > huge).
> > > > >
> > > > > > - Add spotless phoenix pre commit check:
> > > > >
> > > > > Also I have raised PR for automated spotless check in pre commit at
> > > > https://github.com/apache/phoenix/pull/2119
> > > > >
> > > > > Regards,
> > > > > Nihal
> > > > >
> > > > > On 2025/04/10 11:13:42 Nihal Jain wrote:
> > > > > > Hello everyone,
> > > > > >
> > > > > > The PR to add spotless to Phoenix is ready for review. We plan to
> > do
> > > > this in 3 steps as discussed here before i.e.
> > > > > > - Add spotless plugin to format code in phoenix: Please review PR
> > at
> > > > https://github.com/apache/phoenix/pull/2023
> > > > > > - Run spotless:apply to format code in phoenix: Please review PR at
> > > > https://github.com/apache/phoenix/pull/2024
> > > > > > - Add spotless phoenix pre commit check: We will raise a new PR
> > with
> > > > yetus related change at
> > > >
> > https://github.com/apache/phoenix/commit/5c6da6415a9230715e8d7d732060a44c735de8b0
> > > > to automate. Once this final PR gets in, builds will require
> > developers to
> > > > fix spotless issues before changes are merged.
> > > > > >
> > > > > > Please go over the above-mentioned PRs once and let us know if any
> > > > objections or any changes are needed.
> > > > > >
> > > > > > Regrads,
> > > > > > Nihal
> > > > > >
> > > > > > On 2025/01/09 06:44:35 Istvan Toth wrote:
> > > > > > > When we apply the big bang reformat step, we should also make
> > sure
> > > > that
> > > > > > > spotless is included in the Yetus CI checks.
> > > > > > >
> > > > > > > I'm not sure if Yetus would applies spotless automatically if it
> > is
> > > > present
> > > > > > > in the maven, or if some changes are needed.
> > > > > > > If changes are needed, I may be able to assist with them.
> > > > > > >
> > > > > > > Istvan
> > > > > > >
> > > > > > > On Mon, Oct 21, 2024 at 9:25 PM Nihal Jain <nihaljain@apache.org
> > >
> > > > wrote:
> > > > > > >
> > > > > > > > Updated https://issues.apache.org/jira/browse/PHOENIX-6851
> > with a
> > > > list of
> > > > > > > > sub-tasks as summarised previously.
> > > > > > > >
> > > > > > > > On 2024/10/18 17:20:18 Istvan Toth wrote:
> > > > > > > > > Thank you Nihal, I support the plan.
> > > > > > > > >
> > > > > > > > > I only ask that we delay landing the changes on 5.2 until
> > after
> > > > we have
> > > > > > > > > released 5.2.1.
> > > > > > > > > ( I really hope to cut the next RC next week, as all HBase
> > 2.6.1
> > > > related
> > > > > > > > > issues seem to be fixed.)
> > > > > > > > >
> > > > > > > > > On Fri, Oct 18, 2024 at 6:09 PM Nihal Jain <
> > > > nihaljain.cs@gmail.com>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Hi all,
> > > > > > > > > >
> > > > > > > > > > Following  previous discussions on this thread and recent
> > > > discussion
> > > > > > > > in PR
> > > > > > > > > > https://github.com/apache/phoenix/pull/1995, I would like
> > to
> > > > revisit
> > > > > > > > the
> > > > > > > > > > topic of implementing the Spotless plugin for code
> > formatting
> > > > in
> > > > > > > > Phoenix.
> > > > > > > > > > The goal is to improve code consistency across the project
> > and
> > > > make it
> > > > > > > > > > easier for new contributors to onboard.
> > > > > > > > > >
> > > > > > > > > > Here is a summary of the proposed plan based on recent
> > > > discussions and
> > > > > > > > past
> > > > > > > > > > experiences:
> > > > > > > > > >
> > > > > > > > > > 1) Integrate the Spotless plugin and update the code
> > template:
> > > > > > > > > >
> > > > > > > > > > * Integrate the Spotless plugin into the Phoenix project.
> > This
> > > > will
> > > > > > > > allow
> > > > > > > > > > us to standardize code formatting through Maven, reducing
> > > > reliance on
> > > > > > > > > > IDE-specific formatting rules.
> > > > > > > > > >
> > > > > > > > > > * Update the development template
> > > > (dev/PhoenixCodeTemplate.xml) to
> > > > > > > > sync the
> > > > > > > > > > formatting standards used in HBase.
> > > > > > > > > >
> > > > > > > > > > * Align the license header with the one used by HBase for
> > > > consistency.
> > > > > > > > > >
> > > > > > > > > > 2) Apply Spotless to reformat the entire codebase:
> > > > > > > > > >
> > > > > > > > > > * Apply the Spotless plugin to reformat the entire
> > codebase.
> > > > This will
> > > > > > > > be
> > > > > > > > > > done in a single commit to minimize noise in future
> > patches.
> > > > > > > > > >
> > > > > > > > > > * No manual changes should be made in this PR, for ease of
> > > > review
> > > > > > > > > >
> > > > > > > > > > 3) Add Spotless to the pre-commit checks:
> > > > > > > > > >
> > > > > > > > > > * Integrate Spotless checks into the pre-commit process to
> > > > ensure code
> > > > > > > > > > consistency moving forward.
> > > > > > > > > >
> > > > > > > > > > * We may want to add this step only after the initial
> > > > reformatting is
> > > > > > > > > > complete to avoid build failures and ease of backport to
> > other
> > > > > > > > branches.
> > > > > > > > > >
> > > > > > > > > > Hence we plan to create 3 separate JIRA sub-tasks to handle
> > > > each of
> > > > > > > > above
> > > > > > > > > > memtioned steps independently and repeat for all active
> > > > branches i.e
> > > > > > > > 5.1,
> > > > > > > > > > 5.2 and master.
> > > > > > > > > >
> > > > > > > > > > I want to acknowledge that Aman Poonia initially raised
> > this
> > > > topic and
> > > > > > > > > > began the work. My involvement was unintentional, and I am
> > > > grateful
> > > > > > > > for the
> > > > > > > > > > foundation laid by Aman.
> > > > > > > > > >
> > > > > > > > > > Additionally, I would like to thank Istvan Toth and Lars
> > > > Francke for
> > > > > > > > their
> > > > > > > > > > interest and for pointing me to the right resources. Your
> > > > feedback and
> > > > > > > > > > suggestions are crucial.
> > > > > > > > > >
> > > > > > > > > > Please let me know if you have any concerns or additional
> > > > points to
> > > > > > > > > > consider.
> > > > > > > > > >
> > > > > > > > > > Best regards,
> > > > > > > > > >
> > > > > > > > > > Nihal Jain
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Fri, 18 Oct 2024 at 5:07 PM, Lars Francke <
> > > > lars.francke@gmail.com>
> > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Ah! Excellent, I managed to miss that in my research.
> > Thank
> > > > you very
> > > > > > > > > > much.
> > > > > > > > > > >
> > > > > > > > > > > On Fri, Oct 18, 2024 at 1:26 PM Istvan Toth
> > > > > > > > <st...@cloudera.com.invalid>
> > > > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Nihal Jain has taken this up recently, and has opened
> > > > > > > > > > > >
> > > > > > > > > > > > https://github.com/apache/phoenix/pull/1995
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > On Fri, Oct 18, 2024 at 12:50 PM Lars Francke <
> > > > > > > > larsfrancke@apache.org>
> > > > > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > Sorry to dig up this old thread.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I'm working with the Phoenix source code for the
> > first
> > > > time in
> > > > > > > > years
> > > > > > > > > > > and
> > > > > > > > > > > > > as Istvan said: The current codebase is not great in
> > > > terms of
> > > > > > > > > > > consistency.
> > > > > > > > > > > > > It makes life for new contributors harder than it
> > needs
> > > > to be.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I actually checked and there are old Eclipse style
> > files
> > > > checked
> > > > > > > > in.
> > > > > > > > > > I
> > > > > > > > > > > > > can't load them in recent versions of IntelliJ and I
> > > > suspect most
> > > > > > > > > > > people
> > > > > > > > > > > > > don't look at this at all....
> > > > > > > > > > > > >
> > > > > > > > > > > > > Aman, can I ask about your plans on this? Do you
> > plan on
> > > > pushing
> > > > > > > > this
> > > > > > > > > > > > > forward? If not, I might try to take over.
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > > > > > > *Email*: stoty@cloudera.com
> > > > > > > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > > > > > > [image: Cloudera on Twitter] <
> > https://twitter.com/cloudera
> > > > >
> > > > > > > > [image:
> > > > > > > > > > > > Cloudera on Facebook] <
> > https://www.facebook.com/cloudera>
> > > > [image:
> > > > > > > > > > > Cloudera
> > > > > > > > > > > > on LinkedIn] <
> > https://www.linkedin.com/company/cloudera>
> > > > > > > > > > > > ------------------------------
> > > > > > > > > > > > ------------------------------
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > > > *Email*: stoty@cloudera.com
> > > > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> > > > [image:
> > > > > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera>
> > > > [image:
> > > > > > > > Cloudera
> > > > > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > > > > ------------------------------
> > > > > > > > > ------------------------------
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > *Email*: stoty@cloudera.com
> > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> > [image:
> > > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera>
> > [image:
> > > > Cloudera
> > > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > > ------------------------------
> > > > > > > ------------------------------
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 
> 
> -- 
> *István Tóth* | Sr. Staff Software Engineer
> *Email*: stoty@cloudera.com
> cloudera.com <https://www.cloudera.com>
> [image: Cloudera] <https://www.cloudera.com/>
> [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
> on LinkedIn] <https://www.linkedin.com/company/cloudera>
> ------------------------------
> ------------------------------
> 

Re: [DISCUSS] Use spotless to auto format pom and java code

Posted by Istvan Toth <st...@cloudera.com.INVALID>.
Thanks a lot Nihal.

The consensus seems to be that we should do this on all active branches.

Do you plan to apply this to 5.2 and 5.1 now that it's finished on master ?

Istvan

On Mon, Jul 21, 2025 at 5:29 PM Nihal Jain <ni...@apache.org> wrote:

> Hi Rahul,
>
> Thanks for bringing to our attention, filed
> https://issues.apache.org/jira/browse/PHOENIX-7676 and raised
> https://github.com/apache/phoenix/pull/2240 with a fix.
>
> Regards,
> Nihal
>
> On 2025/07/21 06:48:16 Rahul Kumar wrote:
> > Hi Nihal,
> >
> > Shouldn't we disable checkstyle validation for PR going forward ? I see,
> > for the changes where spotless checks are being applied, it is failing
> > checkstyle validation.
> > Checkstyle validation failure :
> >
> https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-2238/2/artifact/yetus-general-check/output/results-checkstyle-phoenix-core-client.txt
> >
> > Thanks
> > Rahul
> >
> > On Mon, Jul 21, 2025 at 10:39 AM Nihal Jain <ni...@apache.org>
> wrote:
> >
> > > Hello everyone,
> > >
> > > All the changes needed for spotless has been merged in master of
> > > apache-phoenix. Going forward build will fail, if any spotless issues
> are
> > > detected, on master. Please ensure to run `mvn spotless:apply` to fix
> > > these.
> > >
> > > For any new PRs:  we should run `mvn spotless:apply`  before raising
> them,
> > > else spotless check will fail during build, if any issues are detected!
> > >
> > > For existing PRs: please rebase to latest code and run spotless before
> we
> > > merge.
> > >
> > > I would like to thank Istvan, Viraj and Lars for all the reviews and
> help.
> > >
> > > We may need to discuss / pull this in all active branches to keep
> > > backports easier.
> > >
> > > Regards,
> > > Nihal
> > >
> > > On 2025/04/16 14:38:10 Nihal Jain wrote:
> > > > Hi all,
> > > >
> > > > Updating the thread with the progress and requesting for reviews.
> > > >
> > > > > - Add spotless plugin to format code in phoenix: Please review PR
> at
> > > https://github.com/apache/phoenix/pull/2023
> > > >
> > > > PR to add spotless has been merged to codebase. Thank you Istvan for
> the
> > > help.
> > > >
> > > > > - Run spotless:apply to format code in phoenix: Please review PR at
> > > https://github.com/apache/phoenix/pull/2024
> > > >
> > > > We still need more reviewers for the spotless reformat using "mvn
> > > spotless:apply" on the entire code base which is done as part of
> > > https://github.com/apache/phoenix/pull/2024 (as the change is very
> huge).
> > > >
> > > > > - Add spotless phoenix pre commit check:
> > > >
> > > > Also I have raised PR for automated spotless check in pre commit at
> > > https://github.com/apache/phoenix/pull/2119
> > > >
> > > > Regards,
> > > > Nihal
> > > >
> > > > On 2025/04/10 11:13:42 Nihal Jain wrote:
> > > > > Hello everyone,
> > > > >
> > > > > The PR to add spotless to Phoenix is ready for review. We plan to
> do
> > > this in 3 steps as discussed here before i.e.
> > > > > - Add spotless plugin to format code in phoenix: Please review PR
> at
> > > https://github.com/apache/phoenix/pull/2023
> > > > > - Run spotless:apply to format code in phoenix: Please review PR at
> > > https://github.com/apache/phoenix/pull/2024
> > > > > - Add spotless phoenix pre commit check: We will raise a new PR
> with
> > > yetus related change at
> > >
> https://github.com/apache/phoenix/commit/5c6da6415a9230715e8d7d732060a44c735de8b0
> > > to automate. Once this final PR gets in, builds will require
> developers to
> > > fix spotless issues before changes are merged.
> > > > >
> > > > > Please go over the above-mentioned PRs once and let us know if any
> > > objections or any changes are needed.
> > > > >
> > > > > Regrads,
> > > > > Nihal
> > > > >
> > > > > On 2025/01/09 06:44:35 Istvan Toth wrote:
> > > > > > When we apply the big bang reformat step, we should also make
> sure
> > > that
> > > > > > spotless is included in the Yetus CI checks.
> > > > > >
> > > > > > I'm not sure if Yetus would applies spotless automatically if it
> is
> > > present
> > > > > > in the maven, or if some changes are needed.
> > > > > > If changes are needed, I may be able to assist with them.
> > > > > >
> > > > > > Istvan
> > > > > >
> > > > > > On Mon, Oct 21, 2024 at 9:25 PM Nihal Jain <nihaljain@apache.org
> >
> > > wrote:
> > > > > >
> > > > > > > Updated https://issues.apache.org/jira/browse/PHOENIX-6851
> with a
> > > list of
> > > > > > > sub-tasks as summarised previously.
> > > > > > >
> > > > > > > On 2024/10/18 17:20:18 Istvan Toth wrote:
> > > > > > > > Thank you Nihal, I support the plan.
> > > > > > > >
> > > > > > > > I only ask that we delay landing the changes on 5.2 until
> after
> > > we have
> > > > > > > > released 5.2.1.
> > > > > > > > ( I really hope to cut the next RC next week, as all HBase
> 2.6.1
> > > related
> > > > > > > > issues seem to be fixed.)
> > > > > > > >
> > > > > > > > On Fri, Oct 18, 2024 at 6:09 PM Nihal Jain <
> > > nihaljain.cs@gmail.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Hi all,
> > > > > > > > >
> > > > > > > > > Following  previous discussions on this thread and recent
> > > discussion
> > > > > > > in PR
> > > > > > > > > https://github.com/apache/phoenix/pull/1995, I would like
> to
> > > revisit
> > > > > > > the
> > > > > > > > > topic of implementing the Spotless plugin for code
> formatting
> > > in
> > > > > > > Phoenix.
> > > > > > > > > The goal is to improve code consistency across the project
> and
> > > make it
> > > > > > > > > easier for new contributors to onboard.
> > > > > > > > >
> > > > > > > > > Here is a summary of the proposed plan based on recent
> > > discussions and
> > > > > > > past
> > > > > > > > > experiences:
> > > > > > > > >
> > > > > > > > > 1) Integrate the Spotless plugin and update the code
> template:
> > > > > > > > >
> > > > > > > > > * Integrate the Spotless plugin into the Phoenix project.
> This
> > > will
> > > > > > > allow
> > > > > > > > > us to standardize code formatting through Maven, reducing
> > > reliance on
> > > > > > > > > IDE-specific formatting rules.
> > > > > > > > >
> > > > > > > > > * Update the development template
> > > (dev/PhoenixCodeTemplate.xml) to
> > > > > > > sync the
> > > > > > > > > formatting standards used in HBase.
> > > > > > > > >
> > > > > > > > > * Align the license header with the one used by HBase for
> > > consistency.
> > > > > > > > >
> > > > > > > > > 2) Apply Spotless to reformat the entire codebase:
> > > > > > > > >
> > > > > > > > > * Apply the Spotless plugin to reformat the entire
> codebase.
> > > This will
> > > > > > > be
> > > > > > > > > done in a single commit to minimize noise in future
> patches.
> > > > > > > > >
> > > > > > > > > * No manual changes should be made in this PR, for ease of
> > > review
> > > > > > > > >
> > > > > > > > > 3) Add Spotless to the pre-commit checks:
> > > > > > > > >
> > > > > > > > > * Integrate Spotless checks into the pre-commit process to
> > > ensure code
> > > > > > > > > consistency moving forward.
> > > > > > > > >
> > > > > > > > > * We may want to add this step only after the initial
> > > reformatting is
> > > > > > > > > complete to avoid build failures and ease of backport to
> other
> > > > > > > branches.
> > > > > > > > >
> > > > > > > > > Hence we plan to create 3 separate JIRA sub-tasks to handle
> > > each of
> > > > > > > above
> > > > > > > > > memtioned steps independently and repeat for all active
> > > branches i.e
> > > > > > > 5.1,
> > > > > > > > > 5.2 and master.
> > > > > > > > >
> > > > > > > > > I want to acknowledge that Aman Poonia initially raised
> this
> > > topic and
> > > > > > > > > began the work. My involvement was unintentional, and I am
> > > grateful
> > > > > > > for the
> > > > > > > > > foundation laid by Aman.
> > > > > > > > >
> > > > > > > > > Additionally, I would like to thank Istvan Toth and Lars
> > > Francke for
> > > > > > > their
> > > > > > > > > interest and for pointing me to the right resources. Your
> > > feedback and
> > > > > > > > > suggestions are crucial.
> > > > > > > > >
> > > > > > > > > Please let me know if you have any concerns or additional
> > > points to
> > > > > > > > > consider.
> > > > > > > > >
> > > > > > > > > Best regards,
> > > > > > > > >
> > > > > > > > > Nihal Jain
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Fri, 18 Oct 2024 at 5:07 PM, Lars Francke <
> > > lars.francke@gmail.com>
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Ah! Excellent, I managed to miss that in my research.
> Thank
> > > you very
> > > > > > > > > much.
> > > > > > > > > >
> > > > > > > > > > On Fri, Oct 18, 2024 at 1:26 PM Istvan Toth
> > > > > > > <st...@cloudera.com.invalid>
> > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > Nihal Jain has taken this up recently, and has opened
> > > > > > > > > > >
> > > > > > > > > > > https://github.com/apache/phoenix/pull/1995
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Fri, Oct 18, 2024 at 12:50 PM Lars Francke <
> > > > > > > larsfrancke@apache.org>
> > > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Sorry to dig up this old thread.
> > > > > > > > > > > >
> > > > > > > > > > > > I'm working with the Phoenix source code for the
> first
> > > time in
> > > > > > > years
> > > > > > > > > > and
> > > > > > > > > > > > as Istvan said: The current codebase is not great in
> > > terms of
> > > > > > > > > > consistency.
> > > > > > > > > > > > It makes life for new contributors harder than it
> needs
> > > to be.
> > > > > > > > > > > >
> > > > > > > > > > > > I actually checked and there are old Eclipse style
> files
> > > checked
> > > > > > > in.
> > > > > > > > > I
> > > > > > > > > > > > can't load them in recent versions of IntelliJ and I
> > > suspect most
> > > > > > > > > > people
> > > > > > > > > > > > don't look at this at all....
> > > > > > > > > > > >
> > > > > > > > > > > > Aman, can I ask about your plans on this? Do you
> plan on
> > > pushing
> > > > > > > this
> > > > > > > > > > > > forward? If not, I might try to take over.
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > > > > > *Email*: stoty@cloudera.com
> > > > > > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > > > > > [image: Cloudera on Twitter] <
> https://twitter.com/cloudera
> > > >
> > > > > > > [image:
> > > > > > > > > > > Cloudera on Facebook] <
> https://www.facebook.com/cloudera>
> > > [image:
> > > > > > > > > > Cloudera
> > > > > > > > > > > on LinkedIn] <
> https://www.linkedin.com/company/cloudera>
> > > > > > > > > > > ------------------------------
> > > > > > > > > > > ------------------------------
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > > *Email*: stoty@cloudera.com
> > > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> > > [image:
> > > > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera>
> > > [image:
> > > > > > > Cloudera
> > > > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > > > ------------------------------
> > > > > > > > ------------------------------
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > *Email*: stoty@cloudera.com
> > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> [image:
> > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera>
> [image:
> > > Cloudera
> > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > ------------------------------
> > > > > > ------------------------------
> > > > > >
> > > > >
> > > >
> > >
> >
>


-- 
*István Tóth* | Sr. Staff Software Engineer
*Email*: stoty@cloudera.com
cloudera.com <https://www.cloudera.com>
[image: Cloudera] <https://www.cloudera.com/>
[image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
on LinkedIn] <https://www.linkedin.com/company/cloudera>
------------------------------
------------------------------

Re: [DISCUSS] Use spotless to auto format pom and java code

Posted by Nihal Jain <ni...@apache.org>.
Hi Rahul,

Thanks for bringing to our attention, filed https://issues.apache.org/jira/browse/PHOENIX-7676 and raised https://github.com/apache/phoenix/pull/2240 with a fix. 

Regards,
Nihal

On 2025/07/21 06:48:16 Rahul Kumar wrote:
> Hi Nihal,
> 
> Shouldn't we disable checkstyle validation for PR going forward ? I see,
> for the changes where spotless checks are being applied, it is failing
> checkstyle validation.
> Checkstyle validation failure :
> https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-2238/2/artifact/yetus-general-check/output/results-checkstyle-phoenix-core-client.txt
> 
> Thanks
> Rahul
> 
> On Mon, Jul 21, 2025 at 10:39 AM Nihal Jain <ni...@apache.org> wrote:
> 
> > Hello everyone,
> >
> > All the changes needed for spotless has been merged in master of
> > apache-phoenix. Going forward build will fail, if any spotless issues are
> > detected, on master. Please ensure to run `mvn spotless:apply` to fix
> > these.
> >
> > For any new PRs:  we should run `mvn spotless:apply`  before raising them,
> > else spotless check will fail during build, if any issues are detected!
> >
> > For existing PRs: please rebase to latest code and run spotless before we
> > merge.
> >
> > I would like to thank Istvan, Viraj and Lars for all the reviews and help.
> >
> > We may need to discuss / pull this in all active branches to keep
> > backports easier.
> >
> > Regards,
> > Nihal
> >
> > On 2025/04/16 14:38:10 Nihal Jain wrote:
> > > Hi all,
> > >
> > > Updating the thread with the progress and requesting for reviews.
> > >
> > > > - Add spotless plugin to format code in phoenix: Please review PR at
> > https://github.com/apache/phoenix/pull/2023
> > >
> > > PR to add spotless has been merged to codebase. Thank you Istvan for the
> > help.
> > >
> > > > - Run spotless:apply to format code in phoenix: Please review PR at
> > https://github.com/apache/phoenix/pull/2024
> > >
> > > We still need more reviewers for the spotless reformat using "mvn
> > spotless:apply" on the entire code base which is done as part of
> > https://github.com/apache/phoenix/pull/2024 (as the change is very huge).
> > >
> > > > - Add spotless phoenix pre commit check:
> > >
> > > Also I have raised PR for automated spotless check in pre commit at
> > https://github.com/apache/phoenix/pull/2119
> > >
> > > Regards,
> > > Nihal
> > >
> > > On 2025/04/10 11:13:42 Nihal Jain wrote:
> > > > Hello everyone,
> > > >
> > > > The PR to add spotless to Phoenix is ready for review. We plan to do
> > this in 3 steps as discussed here before i.e.
> > > > - Add spotless plugin to format code in phoenix: Please review PR at
> > https://github.com/apache/phoenix/pull/2023
> > > > - Run spotless:apply to format code in phoenix: Please review PR at
> > https://github.com/apache/phoenix/pull/2024
> > > > - Add spotless phoenix pre commit check: We will raise a new PR with
> > yetus related change at
> > https://github.com/apache/phoenix/commit/5c6da6415a9230715e8d7d732060a44c735de8b0
> > to automate. Once this final PR gets in, builds will require developers to
> > fix spotless issues before changes are merged.
> > > >
> > > > Please go over the above-mentioned PRs once and let us know if any
> > objections or any changes are needed.
> > > >
> > > > Regrads,
> > > > Nihal
> > > >
> > > > On 2025/01/09 06:44:35 Istvan Toth wrote:
> > > > > When we apply the big bang reformat step, we should also make sure
> > that
> > > > > spotless is included in the Yetus CI checks.
> > > > >
> > > > > I'm not sure if Yetus would applies spotless automatically if it is
> > present
> > > > > in the maven, or if some changes are needed.
> > > > > If changes are needed, I may be able to assist with them.
> > > > >
> > > > > Istvan
> > > > >
> > > > > On Mon, Oct 21, 2024 at 9:25 PM Nihal Jain <ni...@apache.org>
> > wrote:
> > > > >
> > > > > > Updated https://issues.apache.org/jira/browse/PHOENIX-6851 with a
> > list of
> > > > > > sub-tasks as summarised previously.
> > > > > >
> > > > > > On 2024/10/18 17:20:18 Istvan Toth wrote:
> > > > > > > Thank you Nihal, I support the plan.
> > > > > > >
> > > > > > > I only ask that we delay landing the changes on 5.2 until after
> > we have
> > > > > > > released 5.2.1.
> > > > > > > ( I really hope to cut the next RC next week, as all HBase 2.6.1
> > related
> > > > > > > issues seem to be fixed.)
> > > > > > >
> > > > > > > On Fri, Oct 18, 2024 at 6:09 PM Nihal Jain <
> > nihaljain.cs@gmail.com>
> > > > > > wrote:
> > > > > > >
> > > > > > > > Hi all,
> > > > > > > >
> > > > > > > > Following  previous discussions on this thread and recent
> > discussion
> > > > > > in PR
> > > > > > > > https://github.com/apache/phoenix/pull/1995, I would like to
> > revisit
> > > > > > the
> > > > > > > > topic of implementing the Spotless plugin for code formatting
> > in
> > > > > > Phoenix.
> > > > > > > > The goal is to improve code consistency across the project and
> > make it
> > > > > > > > easier for new contributors to onboard.
> > > > > > > >
> > > > > > > > Here is a summary of the proposed plan based on recent
> > discussions and
> > > > > > past
> > > > > > > > experiences:
> > > > > > > >
> > > > > > > > 1) Integrate the Spotless plugin and update the code template:
> > > > > > > >
> > > > > > > > * Integrate the Spotless plugin into the Phoenix project. This
> > will
> > > > > > allow
> > > > > > > > us to standardize code formatting through Maven, reducing
> > reliance on
> > > > > > > > IDE-specific formatting rules.
> > > > > > > >
> > > > > > > > * Update the development template
> > (dev/PhoenixCodeTemplate.xml) to
> > > > > > sync the
> > > > > > > > formatting standards used in HBase.
> > > > > > > >
> > > > > > > > * Align the license header with the one used by HBase for
> > consistency.
> > > > > > > >
> > > > > > > > 2) Apply Spotless to reformat the entire codebase:
> > > > > > > >
> > > > > > > > * Apply the Spotless plugin to reformat the entire codebase.
> > This will
> > > > > > be
> > > > > > > > done in a single commit to minimize noise in future patches.
> > > > > > > >
> > > > > > > > * No manual changes should be made in this PR, for ease of
> > review
> > > > > > > >
> > > > > > > > 3) Add Spotless to the pre-commit checks:
> > > > > > > >
> > > > > > > > * Integrate Spotless checks into the pre-commit process to
> > ensure code
> > > > > > > > consistency moving forward.
> > > > > > > >
> > > > > > > > * We may want to add this step only after the initial
> > reformatting is
> > > > > > > > complete to avoid build failures and ease of backport to other
> > > > > > branches.
> > > > > > > >
> > > > > > > > Hence we plan to create 3 separate JIRA sub-tasks to handle
> > each of
> > > > > > above
> > > > > > > > memtioned steps independently and repeat for all active
> > branches i.e
> > > > > > 5.1,
> > > > > > > > 5.2 and master.
> > > > > > > >
> > > > > > > > I want to acknowledge that Aman Poonia initially raised this
> > topic and
> > > > > > > > began the work. My involvement was unintentional, and I am
> > grateful
> > > > > > for the
> > > > > > > > foundation laid by Aman.
> > > > > > > >
> > > > > > > > Additionally, I would like to thank Istvan Toth and Lars
> > Francke for
> > > > > > their
> > > > > > > > interest and for pointing me to the right resources. Your
> > feedback and
> > > > > > > > suggestions are crucial.
> > > > > > > >
> > > > > > > > Please let me know if you have any concerns or additional
> > points to
> > > > > > > > consider.
> > > > > > > >
> > > > > > > > Best regards,
> > > > > > > >
> > > > > > > > Nihal Jain
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Fri, 18 Oct 2024 at 5:07 PM, Lars Francke <
> > lars.francke@gmail.com>
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Ah! Excellent, I managed to miss that in my research. Thank
> > you very
> > > > > > > > much.
> > > > > > > > >
> > > > > > > > > On Fri, Oct 18, 2024 at 1:26 PM Istvan Toth
> > > > > > <st...@cloudera.com.invalid>
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > Nihal Jain has taken this up recently, and has opened
> > > > > > > > > >
> > > > > > > > > > https://github.com/apache/phoenix/pull/1995
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Fri, Oct 18, 2024 at 12:50 PM Lars Francke <
> > > > > > larsfrancke@apache.org>
> > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Sorry to dig up this old thread.
> > > > > > > > > > >
> > > > > > > > > > > I'm working with the Phoenix source code for the first
> > time in
> > > > > > years
> > > > > > > > > and
> > > > > > > > > > > as Istvan said: The current codebase is not great in
> > terms of
> > > > > > > > > consistency.
> > > > > > > > > > > It makes life for new contributors harder than it needs
> > to be.
> > > > > > > > > > >
> > > > > > > > > > > I actually checked and there are old Eclipse style files
> > checked
> > > > > > in.
> > > > > > > > I
> > > > > > > > > > > can't load them in recent versions of IntelliJ and I
> > suspect most
> > > > > > > > > people
> > > > > > > > > > > don't look at this at all....
> > > > > > > > > > >
> > > > > > > > > > > Aman, can I ask about your plans on this? Do you plan on
> > pushing
> > > > > > this
> > > > > > > > > > > forward? If not, I might try to take over.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > > > > *Email*: stoty@cloudera.com
> > > > > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera
> > >
> > > > > > [image:
> > > > > > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera>
> > [image:
> > > > > > > > > Cloudera
> > > > > > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > > > > > ------------------------------
> > > > > > > > > > ------------------------------
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > *Email*: stoty@cloudera.com
> > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> > [image:
> > > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera>
> > [image:
> > > > > > Cloudera
> > > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > > ------------------------------
> > > > > > > ------------------------------
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > *Email*: stoty@cloudera.com
> > > > > cloudera.com <https://www.cloudera.com>
> > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image:
> > Cloudera
> > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > ------------------------------
> > > > > ------------------------------
> > > > >
> > > >
> > >
> >
> 

Re: [DISCUSS] Use spotless to auto format pom and java code

Posted by Rahul Kumar <rk...@gmail.com>.
Hi Nihal,

Shouldn't we disable checkstyle validation for PR going forward ? I see,
for the changes where spotless checks are being applied, it is failing
checkstyle validation.
Checkstyle validation failure :
https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-2238/2/artifact/yetus-general-check/output/results-checkstyle-phoenix-core-client.txt

Thanks
Rahul

On Mon, Jul 21, 2025 at 10:39 AM Nihal Jain <ni...@apache.org> wrote:

> Hello everyone,
>
> All the changes needed for spotless has been merged in master of
> apache-phoenix. Going forward build will fail, if any spotless issues are
> detected, on master. Please ensure to run `mvn spotless:apply` to fix
> these.
>
> For any new PRs:  we should run `mvn spotless:apply`  before raising them,
> else spotless check will fail during build, if any issues are detected!
>
> For existing PRs: please rebase to latest code and run spotless before we
> merge.
>
> I would like to thank Istvan, Viraj and Lars for all the reviews and help.
>
> We may need to discuss / pull this in all active branches to keep
> backports easier.
>
> Regards,
> Nihal
>
> On 2025/04/16 14:38:10 Nihal Jain wrote:
> > Hi all,
> >
> > Updating the thread with the progress and requesting for reviews.
> >
> > > - Add spotless plugin to format code in phoenix: Please review PR at
> https://github.com/apache/phoenix/pull/2023
> >
> > PR to add spotless has been merged to codebase. Thank you Istvan for the
> help.
> >
> > > - Run spotless:apply to format code in phoenix: Please review PR at
> https://github.com/apache/phoenix/pull/2024
> >
> > We still need more reviewers for the spotless reformat using "mvn
> spotless:apply" on the entire code base which is done as part of
> https://github.com/apache/phoenix/pull/2024 (as the change is very huge).
> >
> > > - Add spotless phoenix pre commit check:
> >
> > Also I have raised PR for automated spotless check in pre commit at
> https://github.com/apache/phoenix/pull/2119
> >
> > Regards,
> > Nihal
> >
> > On 2025/04/10 11:13:42 Nihal Jain wrote:
> > > Hello everyone,
> > >
> > > The PR to add spotless to Phoenix is ready for review. We plan to do
> this in 3 steps as discussed here before i.e.
> > > - Add spotless plugin to format code in phoenix: Please review PR at
> https://github.com/apache/phoenix/pull/2023
> > > - Run spotless:apply to format code in phoenix: Please review PR at
> https://github.com/apache/phoenix/pull/2024
> > > - Add spotless phoenix pre commit check: We will raise a new PR with
> yetus related change at
> https://github.com/apache/phoenix/commit/5c6da6415a9230715e8d7d732060a44c735de8b0
> to automate. Once this final PR gets in, builds will require developers to
> fix spotless issues before changes are merged.
> > >
> > > Please go over the above-mentioned PRs once and let us know if any
> objections or any changes are needed.
> > >
> > > Regrads,
> > > Nihal
> > >
> > > On 2025/01/09 06:44:35 Istvan Toth wrote:
> > > > When we apply the big bang reformat step, we should also make sure
> that
> > > > spotless is included in the Yetus CI checks.
> > > >
> > > > I'm not sure if Yetus would applies spotless automatically if it is
> present
> > > > in the maven, or if some changes are needed.
> > > > If changes are needed, I may be able to assist with them.
> > > >
> > > > Istvan
> > > >
> > > > On Mon, Oct 21, 2024 at 9:25 PM Nihal Jain <ni...@apache.org>
> wrote:
> > > >
> > > > > Updated https://issues.apache.org/jira/browse/PHOENIX-6851 with a
> list of
> > > > > sub-tasks as summarised previously.
> > > > >
> > > > > On 2024/10/18 17:20:18 Istvan Toth wrote:
> > > > > > Thank you Nihal, I support the plan.
> > > > > >
> > > > > > I only ask that we delay landing the changes on 5.2 until after
> we have
> > > > > > released 5.2.1.
> > > > > > ( I really hope to cut the next RC next week, as all HBase 2.6.1
> related
> > > > > > issues seem to be fixed.)
> > > > > >
> > > > > > On Fri, Oct 18, 2024 at 6:09 PM Nihal Jain <
> nihaljain.cs@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > > Hi all,
> > > > > > >
> > > > > > > Following  previous discussions on this thread and recent
> discussion
> > > > > in PR
> > > > > > > https://github.com/apache/phoenix/pull/1995, I would like to
> revisit
> > > > > the
> > > > > > > topic of implementing the Spotless plugin for code formatting
> in
> > > > > Phoenix.
> > > > > > > The goal is to improve code consistency across the project and
> make it
> > > > > > > easier for new contributors to onboard.
> > > > > > >
> > > > > > > Here is a summary of the proposed plan based on recent
> discussions and
> > > > > past
> > > > > > > experiences:
> > > > > > >
> > > > > > > 1) Integrate the Spotless plugin and update the code template:
> > > > > > >
> > > > > > > * Integrate the Spotless plugin into the Phoenix project. This
> will
> > > > > allow
> > > > > > > us to standardize code formatting through Maven, reducing
> reliance on
> > > > > > > IDE-specific formatting rules.
> > > > > > >
> > > > > > > * Update the development template
> (dev/PhoenixCodeTemplate.xml) to
> > > > > sync the
> > > > > > > formatting standards used in HBase.
> > > > > > >
> > > > > > > * Align the license header with the one used by HBase for
> consistency.
> > > > > > >
> > > > > > > 2) Apply Spotless to reformat the entire codebase:
> > > > > > >
> > > > > > > * Apply the Spotless plugin to reformat the entire codebase.
> This will
> > > > > be
> > > > > > > done in a single commit to minimize noise in future patches.
> > > > > > >
> > > > > > > * No manual changes should be made in this PR, for ease of
> review
> > > > > > >
> > > > > > > 3) Add Spotless to the pre-commit checks:
> > > > > > >
> > > > > > > * Integrate Spotless checks into the pre-commit process to
> ensure code
> > > > > > > consistency moving forward.
> > > > > > >
> > > > > > > * We may want to add this step only after the initial
> reformatting is
> > > > > > > complete to avoid build failures and ease of backport to other
> > > > > branches.
> > > > > > >
> > > > > > > Hence we plan to create 3 separate JIRA sub-tasks to handle
> each of
> > > > > above
> > > > > > > memtioned steps independently and repeat for all active
> branches i.e
> > > > > 5.1,
> > > > > > > 5.2 and master.
> > > > > > >
> > > > > > > I want to acknowledge that Aman Poonia initially raised this
> topic and
> > > > > > > began the work. My involvement was unintentional, and I am
> grateful
> > > > > for the
> > > > > > > foundation laid by Aman.
> > > > > > >
> > > > > > > Additionally, I would like to thank Istvan Toth and Lars
> Francke for
> > > > > their
> > > > > > > interest and for pointing me to the right resources. Your
> feedback and
> > > > > > > suggestions are crucial.
> > > > > > >
> > > > > > > Please let me know if you have any concerns or additional
> points to
> > > > > > > consider.
> > > > > > >
> > > > > > > Best regards,
> > > > > > >
> > > > > > > Nihal Jain
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Fri, 18 Oct 2024 at 5:07 PM, Lars Francke <
> lars.francke@gmail.com>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > Ah! Excellent, I managed to miss that in my research. Thank
> you very
> > > > > > > much.
> > > > > > > >
> > > > > > > > On Fri, Oct 18, 2024 at 1:26 PM Istvan Toth
> > > > > <st...@cloudera.com.invalid>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > Nihal Jain has taken this up recently, and has opened
> > > > > > > > >
> > > > > > > > > https://github.com/apache/phoenix/pull/1995
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Fri, Oct 18, 2024 at 12:50 PM Lars Francke <
> > > > > larsfrancke@apache.org>
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Sorry to dig up this old thread.
> > > > > > > > > >
> > > > > > > > > > I'm working with the Phoenix source code for the first
> time in
> > > > > years
> > > > > > > > and
> > > > > > > > > > as Istvan said: The current codebase is not great in
> terms of
> > > > > > > > consistency.
> > > > > > > > > > It makes life for new contributors harder than it needs
> to be.
> > > > > > > > > >
> > > > > > > > > > I actually checked and there are old Eclipse style files
> checked
> > > > > in.
> > > > > > > I
> > > > > > > > > > can't load them in recent versions of IntelliJ and I
> suspect most
> > > > > > > > people
> > > > > > > > > > don't look at this at all....
> > > > > > > > > >
> > > > > > > > > > Aman, can I ask about your plans on this? Do you plan on
> pushing
> > > > > this
> > > > > > > > > > forward? If not, I might try to take over.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > > > *Email*: stoty@cloudera.com
> > > > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera
> >
> > > > > [image:
> > > > > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera>
> [image:
> > > > > > > > Cloudera
> > > > > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > > > > ------------------------------
> > > > > > > > > ------------------------------
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > *Email*: stoty@cloudera.com
> > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> [image:
> > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera>
> [image:
> > > > > Cloudera
> > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > ------------------------------
> > > > > > ------------------------------
> > > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > *István Tóth* | Sr. Staff Software Engineer
> > > > *Email*: stoty@cloudera.com
> > > > cloudera.com <https://www.cloudera.com>
> > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> > > > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image:
> Cloudera
> > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > ------------------------------
> > > > ------------------------------
> > > >
> > >
> >
>

Re: [DISCUSS] Use spotless to auto format pom and java code

Posted by Nihal Jain <ni...@apache.org>.
Hello everyone,

All the changes needed for spotless has been merged in master of apache-phoenix. Going forward build will fail, if any spotless issues are detected, on master. Please ensure to run `mvn spotless:apply` to fix these. 

For any new PRs:  we should run `mvn spotless:apply`  before raising them, else spotless check will fail during build, if any issues are detected!

For existing PRs: please rebase to latest code and run spotless before we merge.

I would like to thank Istvan, Viraj and Lars for all the reviews and help.

We may need to discuss / pull this in all active branches to keep backports easier.

Regards,
Nihal

On 2025/04/16 14:38:10 Nihal Jain wrote:
> Hi all,
> 
> Updating the thread with the progress and requesting for reviews.
> 
> > - Add spotless plugin to format code in phoenix: Please review PR at https://github.com/apache/phoenix/pull/2023
> 
> PR to add spotless has been merged to codebase. Thank you Istvan for the help.
> 
> > - Run spotless:apply to format code in phoenix: Please review PR at https://github.com/apache/phoenix/pull/2024
> 
> We still need more reviewers for the spotless reformat using "mvn spotless:apply" on the entire code base which is done as part of https://github.com/apache/phoenix/pull/2024 (as the change is very huge).
> 
> > - Add spotless phoenix pre commit check:
> 
> Also I have raised PR for automated spotless check in pre commit at https://github.com/apache/phoenix/pull/2119
> 
> Regards,
> Nihal
> 
> On 2025/04/10 11:13:42 Nihal Jain wrote:
> > Hello everyone,
> > 
> > The PR to add spotless to Phoenix is ready for review. We plan to do this in 3 steps as discussed here before i.e.
> > - Add spotless plugin to format code in phoenix: Please review PR at https://github.com/apache/phoenix/pull/2023
> > - Run spotless:apply to format code in phoenix: Please review PR at https://github.com/apache/phoenix/pull/2024
> > - Add spotless phoenix pre commit check: We will raise a new PR with yetus related change at https://github.com/apache/phoenix/commit/5c6da6415a9230715e8d7d732060a44c735de8b0 to automate. Once this final PR gets in, builds will require developers to fix spotless issues before changes are merged. 
> > 
> > Please go over the above-mentioned PRs once and let us know if any objections or any changes are needed.
> > 
> > Regrads,
> > Nihal
> > 
> > On 2025/01/09 06:44:35 Istvan Toth wrote:
> > > When we apply the big bang reformat step, we should also make sure that
> > > spotless is included in the Yetus CI checks.
> > > 
> > > I'm not sure if Yetus would applies spotless automatically if it is present
> > > in the maven, or if some changes are needed.
> > > If changes are needed, I may be able to assist with them.
> > > 
> > > Istvan
> > > 
> > > On Mon, Oct 21, 2024 at 9:25 PM Nihal Jain <ni...@apache.org> wrote:
> > > 
> > > > Updated https://issues.apache.org/jira/browse/PHOENIX-6851 with a list of
> > > > sub-tasks as summarised previously.
> > > >
> > > > On 2024/10/18 17:20:18 Istvan Toth wrote:
> > > > > Thank you Nihal, I support the plan.
> > > > >
> > > > > I only ask that we delay landing the changes on 5.2 until after we have
> > > > > released 5.2.1.
> > > > > ( I really hope to cut the next RC next week, as all HBase 2.6.1 related
> > > > > issues seem to be fixed.)
> > > > >
> > > > > On Fri, Oct 18, 2024 at 6:09 PM Nihal Jain <ni...@gmail.com>
> > > > wrote:
> > > > >
> > > > > > Hi all,
> > > > > >
> > > > > > Following  previous discussions on this thread and recent discussion
> > > > in PR
> > > > > > https://github.com/apache/phoenix/pull/1995, I would like to revisit
> > > > the
> > > > > > topic of implementing the Spotless plugin for code formatting in
> > > > Phoenix.
> > > > > > The goal is to improve code consistency across the project and make it
> > > > > > easier for new contributors to onboard.
> > > > > >
> > > > > > Here is a summary of the proposed plan based on recent discussions and
> > > > past
> > > > > > experiences:
> > > > > >
> > > > > > 1) Integrate the Spotless plugin and update the code template:
> > > > > >
> > > > > > * Integrate the Spotless plugin into the Phoenix project. This will
> > > > allow
> > > > > > us to standardize code formatting through Maven, reducing reliance on
> > > > > > IDE-specific formatting rules.
> > > > > >
> > > > > > * Update the development template (dev/PhoenixCodeTemplate.xml) to
> > > > sync the
> > > > > > formatting standards used in HBase.
> > > > > >
> > > > > > * Align the license header with the one used by HBase for consistency.
> > > > > >
> > > > > > 2) Apply Spotless to reformat the entire codebase:
> > > > > >
> > > > > > * Apply the Spotless plugin to reformat the entire codebase. This will
> > > > be
> > > > > > done in a single commit to minimize noise in future patches.
> > > > > >
> > > > > > * No manual changes should be made in this PR, for ease of review
> > > > > >
> > > > > > 3) Add Spotless to the pre-commit checks:
> > > > > >
> > > > > > * Integrate Spotless checks into the pre-commit process to ensure code
> > > > > > consistency moving forward.
> > > > > >
> > > > > > * We may want to add this step only after the initial reformatting is
> > > > > > complete to avoid build failures and ease of backport to other
> > > > branches.
> > > > > >
> > > > > > Hence we plan to create 3 separate JIRA sub-tasks to handle each of
> > > > above
> > > > > > memtioned steps independently and repeat for all active branches i.e
> > > > 5.1,
> > > > > > 5.2 and master.
> > > > > >
> > > > > > I want to acknowledge that Aman Poonia initially raised this topic and
> > > > > > began the work. My involvement was unintentional, and I am grateful
> > > > for the
> > > > > > foundation laid by Aman.
> > > > > >
> > > > > > Additionally, I would like to thank Istvan Toth and Lars Francke for
> > > > their
> > > > > > interest and for pointing me to the right resources. Your feedback and
> > > > > > suggestions are crucial.
> > > > > >
> > > > > > Please let me know if you have any concerns or additional points to
> > > > > > consider.
> > > > > >
> > > > > > Best regards,
> > > > > >
> > > > > > Nihal Jain
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Fri, 18 Oct 2024 at 5:07 PM, Lars Francke <la...@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > > > Ah! Excellent, I managed to miss that in my research. Thank you very
> > > > > > much.
> > > > > > >
> > > > > > > On Fri, Oct 18, 2024 at 1:26 PM Istvan Toth
> > > > <st...@cloudera.com.invalid>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > Nihal Jain has taken this up recently, and has opened
> > > > > > > >
> > > > > > > > https://github.com/apache/phoenix/pull/1995
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Fri, Oct 18, 2024 at 12:50 PM Lars Francke <
> > > > larsfrancke@apache.org>
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Sorry to dig up this old thread.
> > > > > > > > >
> > > > > > > > > I'm working with the Phoenix source code for the first time in
> > > > years
> > > > > > > and
> > > > > > > > > as Istvan said: The current codebase is not great in terms of
> > > > > > > consistency.
> > > > > > > > > It makes life for new contributors harder than it needs to be.
> > > > > > > > >
> > > > > > > > > I actually checked and there are old Eclipse style files checked
> > > > in.
> > > > > > I
> > > > > > > > > can't load them in recent versions of IntelliJ and I suspect most
> > > > > > > people
> > > > > > > > > don't look at this at all....
> > > > > > > > >
> > > > > > > > > Aman, can I ask about your plans on this? Do you plan on pushing
> > > > this
> > > > > > > > > forward? If not, I might try to take over.
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > > *Email*: stoty@cloudera.com
> > > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> > > > [image:
> > > > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image:
> > > > > > > Cloudera
> > > > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > > > ------------------------------
> > > > > > > > ------------------------------
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > *Email*: stoty@cloudera.com
> > > > > cloudera.com <https://www.cloudera.com>
> > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image:
> > > > Cloudera
> > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > ------------------------------
> > > > > ------------------------------
> > > > >
> > > >
> > > 
> > > 
> > > -- 
> > > *István Tóth* | Sr. Staff Software Engineer
> > > *Email*: stoty@cloudera.com
> > > cloudera.com <https://www.cloudera.com>
> > > [image: Cloudera] <https://www.cloudera.com/>
> > > [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> > > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
> > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > ------------------------------
> > > ------------------------------
> > > 
> > 
> 

Re: [DISCUSS] Use spotless to auto format pom and java code

Posted by Nihal Jain <ni...@apache.org>.
Hi all,

Updating the thread with the progress and requesting for reviews.

> - Add spotless plugin to format code in phoenix: Please review PR at https://github.com/apache/phoenix/pull/2023

PR to add spotless has been merged to codebase. Thank you Istvan for the help.

> - Run spotless:apply to format code in phoenix: Please review PR at https://github.com/apache/phoenix/pull/2024

We still need more reviewers for the spotless reformat using "mvn spotless:apply" on the entire code base which is done as part of https://github.com/apache/phoenix/pull/2024 (as the change is very huge).

> - Add spotless phoenix pre commit check:

Also I have raised PR for automated spotless check in pre commit at https://github.com/apache/phoenix/pull/2119

Regards,
Nihal

On 2025/04/10 11:13:42 Nihal Jain wrote:
> Hello everyone,
> 
> The PR to add spotless to Phoenix is ready for review. We plan to do this in 3 steps as discussed here before i.e.
> - Add spotless plugin to format code in phoenix: Please review PR at https://github.com/apache/phoenix/pull/2023
> - Run spotless:apply to format code in phoenix: Please review PR at https://github.com/apache/phoenix/pull/2024
> - Add spotless phoenix pre commit check: We will raise a new PR with yetus related change at https://github.com/apache/phoenix/commit/5c6da6415a9230715e8d7d732060a44c735de8b0 to automate. Once this final PR gets in, builds will require developers to fix spotless issues before changes are merged. 
> 
> Please go over the above-mentioned PRs once and let us know if any objections or any changes are needed.
> 
> Regrads,
> Nihal
> 
> On 2025/01/09 06:44:35 Istvan Toth wrote:
> > When we apply the big bang reformat step, we should also make sure that
> > spotless is included in the Yetus CI checks.
> > 
> > I'm not sure if Yetus would applies spotless automatically if it is present
> > in the maven, or if some changes are needed.
> > If changes are needed, I may be able to assist with them.
> > 
> > Istvan
> > 
> > On Mon, Oct 21, 2024 at 9:25 PM Nihal Jain <ni...@apache.org> wrote:
> > 
> > > Updated https://issues.apache.org/jira/browse/PHOENIX-6851 with a list of
> > > sub-tasks as summarised previously.
> > >
> > > On 2024/10/18 17:20:18 Istvan Toth wrote:
> > > > Thank you Nihal, I support the plan.
> > > >
> > > > I only ask that we delay landing the changes on 5.2 until after we have
> > > > released 5.2.1.
> > > > ( I really hope to cut the next RC next week, as all HBase 2.6.1 related
> > > > issues seem to be fixed.)
> > > >
> > > > On Fri, Oct 18, 2024 at 6:09 PM Nihal Jain <ni...@gmail.com>
> > > wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > Following  previous discussions on this thread and recent discussion
> > > in PR
> > > > > https://github.com/apache/phoenix/pull/1995, I would like to revisit
> > > the
> > > > > topic of implementing the Spotless plugin for code formatting in
> > > Phoenix.
> > > > > The goal is to improve code consistency across the project and make it
> > > > > easier for new contributors to onboard.
> > > > >
> > > > > Here is a summary of the proposed plan based on recent discussions and
> > > past
> > > > > experiences:
> > > > >
> > > > > 1) Integrate the Spotless plugin and update the code template:
> > > > >
> > > > > * Integrate the Spotless plugin into the Phoenix project. This will
> > > allow
> > > > > us to standardize code formatting through Maven, reducing reliance on
> > > > > IDE-specific formatting rules.
> > > > >
> > > > > * Update the development template (dev/PhoenixCodeTemplate.xml) to
> > > sync the
> > > > > formatting standards used in HBase.
> > > > >
> > > > > * Align the license header with the one used by HBase for consistency.
> > > > >
> > > > > 2) Apply Spotless to reformat the entire codebase:
> > > > >
> > > > > * Apply the Spotless plugin to reformat the entire codebase. This will
> > > be
> > > > > done in a single commit to minimize noise in future patches.
> > > > >
> > > > > * No manual changes should be made in this PR, for ease of review
> > > > >
> > > > > 3) Add Spotless to the pre-commit checks:
> > > > >
> > > > > * Integrate Spotless checks into the pre-commit process to ensure code
> > > > > consistency moving forward.
> > > > >
> > > > > * We may want to add this step only after the initial reformatting is
> > > > > complete to avoid build failures and ease of backport to other
> > > branches.
> > > > >
> > > > > Hence we plan to create 3 separate JIRA sub-tasks to handle each of
> > > above
> > > > > memtioned steps independently and repeat for all active branches i.e
> > > 5.1,
> > > > > 5.2 and master.
> > > > >
> > > > > I want to acknowledge that Aman Poonia initially raised this topic and
> > > > > began the work. My involvement was unintentional, and I am grateful
> > > for the
> > > > > foundation laid by Aman.
> > > > >
> > > > > Additionally, I would like to thank Istvan Toth and Lars Francke for
> > > their
> > > > > interest and for pointing me to the right resources. Your feedback and
> > > > > suggestions are crucial.
> > > > >
> > > > > Please let me know if you have any concerns or additional points to
> > > > > consider.
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Nihal Jain
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Fri, 18 Oct 2024 at 5:07 PM, Lars Francke <la...@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > Ah! Excellent, I managed to miss that in my research. Thank you very
> > > > > much.
> > > > > >
> > > > > > On Fri, Oct 18, 2024 at 1:26 PM Istvan Toth
> > > <st...@cloudera.com.invalid>
> > > > > > wrote:
> > > > > > >
> > > > > > > Nihal Jain has taken this up recently, and has opened
> > > > > > >
> > > > > > > https://github.com/apache/phoenix/pull/1995
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Fri, Oct 18, 2024 at 12:50 PM Lars Francke <
> > > larsfrancke@apache.org>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > Sorry to dig up this old thread.
> > > > > > > >
> > > > > > > > I'm working with the Phoenix source code for the first time in
> > > years
> > > > > > and
> > > > > > > > as Istvan said: The current codebase is not great in terms of
> > > > > > consistency.
> > > > > > > > It makes life for new contributors harder than it needs to be.
> > > > > > > >
> > > > > > > > I actually checked and there are old Eclipse style files checked
> > > in.
> > > > > I
> > > > > > > > can't load them in recent versions of IntelliJ and I suspect most
> > > > > > people
> > > > > > > > don't look at this at all....
> > > > > > > >
> > > > > > > > Aman, can I ask about your plans on this? Do you plan on pushing
> > > this
> > > > > > > > forward? If not, I might try to take over.
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > *István Tóth* | Sr. Staff Software Engineer
> > > > > > > *Email*: stoty@cloudera.com
> > > > > > > cloudera.com <https://www.cloudera.com>
> > > > > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera>
> > > [image:
> > > > > > > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image:
> > > > > > Cloudera
> > > > > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > > > > ------------------------------
> > > > > > > ------------------------------
> > > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > *István Tóth* | Sr. Staff Software Engineer
> > > > *Email*: stoty@cloudera.com
> > > > cloudera.com <https://www.cloudera.com>
> > > > [image: Cloudera] <https://www.cloudera.com/>
> > > > [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> > > > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image:
> > > Cloudera
> > > > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > > > ------------------------------
> > > > ------------------------------
> > > >
> > >
> > 
> > 
> > -- 
> > *István Tóth* | Sr. Staff Software Engineer
> > *Email*: stoty@cloudera.com
> > cloudera.com <https://www.cloudera.com>
> > [image: Cloudera] <https://www.cloudera.com/>
> > [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> > Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
> > on LinkedIn] <https://www.linkedin.com/company/cloudera>
> > ------------------------------
> > ------------------------------
> > 
>