Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created LoadFilesTest #5355

Merged
merged 5 commits into from
Feb 26, 2025
Merged

Conversation

dlmarion
Copy link
Contributor

No description provided.

Copy link
Contributor

@ddanielr ddanielr left a comment

Choose a reason for hiding this comment

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

Tested locally, seems to work fine.
I recommended adding a entry to the load plan to try and load a tablet file out of sequential order to see if that messed anything up.

Comment on lines +111 to +114
assertEquals(3, tablets.size());
assertEquals(tm.get(0), tablets.get(0));
assertEquals(tm.get(1), tablets.get(1));
assertEquals(tm.get(2), tablets.get(2));
Copy link
Contributor

Choose a reason for hiding this comment

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

Could use subList to shorten this check

Suggested change
assertEquals(3, tablets.size());
assertEquals(tm.get(0), tablets.get(0));
assertEquals(tm.get(1), tablets.get(1));
assertEquals(tm.get(2), tablets.get(2));
assertEquals(tm.subList(0,3), tablets);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While this is less lines of code, it's not as easy to identify where the issue is on a test failure.

Comment on lines +118 to +121
assertEquals(3, tablets.size());
assertEquals(tm.get(tm.size() - 3), tablets.get(tablets.size() - 3));
assertEquals(tm.get(tm.size() - 2), tablets.get(tablets.size() - 2));
assertEquals(tm.get(tm.size() - 1), tablets.get(tablets.size() - 1));
Copy link
Contributor

Choose a reason for hiding this comment

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

Could also use subList here

Suggested change
assertEquals(3, tablets.size());
assertEquals(tm.get(tm.size() - 3), tablets.get(tablets.size() - 3));
assertEquals(tm.get(tm.size() - 2), tablets.get(tablets.size() - 2));
assertEquals(tm.get(tm.size() - 1), tablets.get(tablets.size() - 1));
assertEquals(tm.subList(tm.size()-3, tm.size()), tablets);

Comment on lines +189 to +194
assertEquals(5, extents.size());
assertTrue(extents.contains(nke(null, "a")));
assertTrue(extents.contains(nke("a", "b")));
assertTrue(extents.contains(nke("b", "c")));
assertTrue(extents.contains(nke("l", "m")));
assertTrue(extents.contains(nke("m", "n")));
Copy link
Contributor

Choose a reason for hiding this comment

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

Could shorten using Set.of

Suggested change
assertEquals(5, extents.size());
assertTrue(extents.contains(nke(null, "a")));
assertTrue(extents.contains(nke("a", "b")));
assertTrue(extents.contains(nke("b", "c")));
assertTrue(extents.contains(nke("l", "m")));
assertTrue(extents.contains(nke("m", "n")));
assertEquals(Set.of(nke(null, "a"), nke("a", "b"), nke("b", "c"),nke("l", "m"),nke("m", "n")), extents);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While this is less lines of code, it's not as easy to identify where the issue is on a test failure.

loadRanges.put(nke("l", "n"), "f1 f2 f4 f5");
loadRanges.put(nke("n", "r"), "f2 f4");
loadRanges.put(nke("r", "w"), "f2 f5");
loadRanges.put(nke("w", null), "f2 f6");
Copy link
Contributor

Choose a reason for hiding this comment

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

This load mapping covers all data in the table w/ no gaps. Need to test that case. Additionally it would be nice to test other load mappings w/ gaps and not starting ending at -inf or +inf.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In b217cfe I added another test that uses non-contiguous ranges on a subset of the tables tablets.

@dlmarion dlmarion merged commit c817c97 into apache:2.1 Feb 26, 2025
8 checks passed
@dlmarion dlmarion deleted the load-files-overlapping-test branch February 26, 2025 13:05
dlmarion added a commit to dlmarion/accumulo that referenced this pull request Feb 27, 2025
When merging apache#5355 to main the FILES column ended up
not being fetched for the tablet metadata because the
Loader.pauseLimit variable had not been set. This variable
was set in the call to Loader.start, which happens after
the TabletsMetadata is configured
dlmarion added a commit that referenced this pull request Feb 27, 2025
When merging #5355 to main the FILES column ended up
not being fetched for the tablet metadata because the
Loader.pauseLimit variable had not been set. This variable
was set in the call to Loader.start, which happens after
the TabletsMetadata is configured
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants