Skip to content

Conversation

@keith-turner
Copy link
Contributor

Three tables in the "accumulo." namespace were defined as constants in the three classes in the code. The change gathers the definitions of these three tables into a single enum in the code. The motivation for this change was that the new fate code introduced in #4133 needed to know of the all the accumulo tables ids. The way the code was structured if a new accumulo.X table is added in the future someone may not realize the fate code needs to know about it. This change makes the dependency more apparent in the code.

Existing constants for the metadata and root table name and id were not inlined in the commit for two reasons. First, it would make this commit hard to review. Second, it would make merging main into the elasticity branch more difficult (its already tricky). Inlining these constants can easily be done as a stand alone commit later when the elasticity branch is ready to merge into main.

@keith-turner keith-turner requested a review from cshannon January 13, 2024 19:40

private static final Set<TableId> META_TABLES =
Set.of(RootTable.ID, MetadataTable.ID, FateTable.ID);
private static final Set<TableId> META_TABLES = Arrays.stream(AccumuloTables.values())
Copy link
Contributor Author

@keith-turner keith-turner Jan 13, 2024

Choose a reason for hiding this comment

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

This bit of code was the motivation for this PR.

@EdColeman
Copy link
Contributor

Would it help merging forward if the AccumuloTables enum and just those related changes were targeted for 3.1? The changes that are not directly retreaded to elasticity seem to be general enough and an improvement that maybe they could be in 3.1?

@ddanielr
Copy link
Contributor

I like the consolidation!

I also agree with @EdColeman that this change seems simple enough to target for main and hopefully reduce the merge conflicts for elasticity.

Then the only elasticity specific change is the creation of a new FATE table.

@keith-turner
Copy link
Contributor Author

@EdColeman and @ddanielr for making the change in main, thinking of the following strategy.

  • Create just the new AccumuloTables enum in main and merge it forward
  • Do the refactor in main to inline and merge that commit forward ignoring the changes in it
  • Do the refactor in elasticity as its own commit

If that strategy sounds good I can do that w/o any further PRs.

@ddanielr
Copy link
Contributor

@EdColeman and @ddanielr for making the change in main, thinking of the following strategy.

  • Create just the new AccumuloTables enum in main and merge it forward
  • Do the refactor in main to inline and merge that commit forward ignoring the changes in it
  • Do the refactor in elasticity as its own commit

If that strategy sounds good I can do that w/o any further PRs.

I think that's an easier strategy and keeps the elasticity complexity fixes from being hidden in a merge commit.

@keith-turner
Copy link
Contributor Author

Looks like elasticity is not currently up to do date with main. Working on that merge first.

keith-turner added a commit that referenced this pull request Jan 16, 2024
This was an automated change made by an IDE to inline constants that
defined accumulo table ids and names.
keith-turner added a commit that referenced this pull request Jan 16, 2024
This commit applies the same automated transformation to the elasticity
branch that was applied to main in da7866e
@keith-turner
Copy link
Contributor Author

Made multiple commits to add the new AccumuloTable enum to main and elasticity.

  • Added the enum in main in 0d5a87c
  • Merged the new enum into elasticity in 468e7fe
  • Did the inline refactoring in main in da7866e
  • Did the inline refactoring in elasticity in 90fcc0b
  • Merged -sours main into elasticity in ff98ee4

@keith-turner keith-turner merged commit 0c861fc into apache:elasticity Jan 16, 2024
@keith-turner keith-turner deleted the accumulo-tables-enum branch January 16, 2024 20:04
@cshannon
Copy link
Contributor

Just catching up on this now, this LGTM and makes a lot of sense, thanks for refactoring this.

cshannon added a commit that referenced this pull request Jun 21, 2024
Backport a combination of #4270 and part of #4163 to exclude all tables
in the accumulo namespace from being blocked on low memory detection
@ctubbsii ctubbsii added this to the 4.0.0 milestone Jul 12, 2024
@ctubbsii ctubbsii mentioned this pull request Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants