cshannon commented on code in PR #4317:
URL: https://github.com/apache/accumulo/pull/4317#discussion_r1509348628
##########
server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementIterator.java:
##########
@@ -69,7 +72,23 @@ public class TabletManagementIterator extends
SkippingIterator {
private TabletBalancer balancer;
private static boolean shouldReturnDueToSplit(final TabletMetadata tm,
- final long splitThreshold) {
+ final Configuration tableConfig) {
+
+ final long splitThreshold = ConfigurationTypeHelper
+
.getFixedMemoryAsBytes(tableConfig.get(Property.TABLE_SPLIT_THRESHOLD.getKey()));
+ final long maxEndRowSize = ConfigurationTypeHelper
+
.getFixedMemoryAsBytes(tableConfig.get(Property.TABLE_MAX_END_ROW_SIZE.getKey()));
+ final int maxFilesToOpen = (int)
ConfigurationTypeHelper.getFixedMemoryAsBytes(
+
tableConfig.get(Property.TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN.getKey()));
+
+ // If current config/files match unsplittable metadata then we can't split
+ if (Optional
+ .ofNullable(tm.getUnSplittable()).filter(um ->
um.equals(UnSplittableMetadata
+ .toUnSplittable(splitThreshold, maxEndRowSize, maxFilesToOpen,
tm.getFiles())))
+ .isPresent()) {
+ return false;
+ }
+
Review Comment:
Ah just saw this comment, this would take away the need from having the
compaction code having to deal with the marker so I like this better than
having the compaction code deal with cleaning things up as it handles all cases
if something changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]