Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions core/src/main/java/org/apache/accumulo/core/conf/Property.java
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,15 @@ public enum Property {
+ "indefinitely. Default is 0 to block indefinitely. Only valid when tserver available "
+ "threshold is set greater than 0.",
"1.10.0"),
SPLIT_PREFIX("split.", null, PropertyType.PREFIX,
"System wide properties related to splitting tablets.", "3.1.0"),
SPLIT_MAXOPEN("split.files.max", "300", PropertyType.COUNT,
"To find a tablets split points, all RFiles are opened and their indexes"
+ " are read. This setting determines how many RFiles can be opened at once."
+ " When there are more RFiles than this setting multiple passes must be"
+ " made, which is slower. However opening too many RFiles at once can cause"
+ " problems.",
"3.1.0"),
// properties that are specific to scan server behavior
@Experimental
SSERV_PREFIX("sserver.", null, PropertyType.PREFIX,
Expand Down Expand Up @@ -496,6 +505,8 @@ public enum Property {
TSERV_TOTAL_MUTATION_QUEUE_MAX("tserver.total.mutation.queue.max", "5%", PropertyType.MEMORY,
"The amount of memory used to store write-ahead-log mutations before flushing them.",
"1.7.0"),
@ReplacedBy(property = SPLIT_MAXOPEN)
@Deprecated(since = "3.1")
TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN("tserver.tablet.split.midpoint.files.max", "300",
PropertyType.COUNT,
"To find a tablets split points, all RFiles are opened and their indexes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.util.TreeMap;
import java.util.stream.Collectors;

import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.PartialKey;
Expand Down Expand Up @@ -214,8 +215,7 @@ public static double estimatePercentageLTE(ServerContext context, TableConfigura

Path tmpDir = null;

int maxToOpen =
context.getConfiguration().getCount(Property.TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN);
int maxToOpen = getMaxFilesToOpen(context.getConfiguration());
ArrayList<FileSKVIterator> readers = new ArrayList<>(dataFiles.size());

try {
Expand Down Expand Up @@ -276,6 +276,12 @@ public static double estimatePercentageLTE(ServerContext context, TableConfigura
}
}

@SuppressWarnings("deprecation")
private static int getMaxFilesToOpen(AccumuloConfiguration conf) {
return conf.getCount(
conf.resolve(Property.SPLIT_MAXOPEN, Property.TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN));
}

/**
*
* @param dataFiles - list of data files to find the mid point key
Expand All @@ -294,8 +300,7 @@ public static SortedMap<Double,Key> findMidPoint(ServerContext context,

Path tmpDir = null;

int maxToOpen =
context.getConfiguration().getCount(Property.TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN);
int maxToOpen = getMaxFilesToOpen(context.getConfiguration());
ArrayList<FileSKVIterator> readers = new ArrayList<>(dataFiles.size());

try {
Expand Down