pinpoint-apm/pinpoint · error · IllegalArgumentException
splitKeys must not be empty
Error message
splitKeys must not be empty
What it means
The Manual SplitOption for CreateTableChange validates that the provided list of split keys is non-empty. Creating a table with an explicit split-key list requires at least one key; an empty list would produce a table with no region splits. The library rejects this at construction time.
Source
Thrown at hbase/hbase-schema/src/main/java/com/navercorp/pinpoint/hbase/schema/reader/core/CreateTableChange.java:64
SplitOption NONE = new SplitOption() {
@Override
public byte[][] getSplitKeys() {
return new byte[0][];
}
@Override
public String toString() {
return "NONE";
}
};
class Manual implements SplitOption {
private final List<String> splitKeys;
public Manual(List<String> splitKeys) {
if (CollectionUtils.isEmpty(splitKeys)) {
throw new IllegalArgumentException("splitKeys must not be empty");
}
this.splitKeys = splitKeys;
}
@Override
public byte[][] getSplitKeys() {
byte[][] splits = new byte[splitKeys.size()][];
for (int i = 0; i < splitKeys.size(); i++) {
splits[i] = Bytes.toBytesBinary(splitKeys.get(i));
}
return splits;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Manual manual = (Manual) o;View on GitHub (pinned to 744c3d3075)
Solutions
- Provide at least one split key to Manual(...)
- If the number of regions is unknown, use the Auto(numRegions) split option instead
- If no splitting is intended, pass the no-split option rather than Manual with an empty list
- Validate the source of split keys (config/DB) so an empty result surfaces before table creation
Example fix
// before
SplitOption option = new SplitOption.Manual(Collections.emptyList());
// after
SplitOption option = new SplitOption.Auto(8); // or Manual(Arrays.asList("key1", "key2")) Defensive patterns
Strategy: validation
Validate before calling
if (splitKeys == null || splitKeys.isEmpty()) {
throw new IllegalArgumentException("Provide at least one split key");
}
new CreateTableChange.SplitOption.Manual(splitKeys); Type guard
boolean hasSplitKeys(List<String> keys) {
return keys != null && !keys.isEmpty();
} Try / catch
try {
SplitOption opt = new CreateTableChange.SplitOption.Manual(keys);
} catch (IllegalArgumentException e) {
// fall back to no-split or Auto
opt = new CreateTableChange.SplitOption.Auto(4);
} Prevention
- Validate split-key sources (config files, ranges) before constructing Manual
- Use Auto(numRegions) when key distribution is unknown
- Never construct Manual from a possibly-empty dynamic list without a guard
When it happens
Trigger: Calling new CreateTableChange.SplitOption.Manual(Collections.emptyList()) or Manual(list) where list is null/empty, e.g. building a CreateTableChange with a manual split strategy but no keys.
Common situations: Split keys loaded from a config file or resource that is empty; a caller that computed keys dynamically (e.g. from rowkey ranges) and got zero results; copy-paste of Manual option without filling keys.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- Cannot add an existing column family :
- numRegions must be greater than 1
- Cyclic include detected for :
- Duplicate changeSet found. Id:
- not found
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/40b66e71fa2cef0c.
Report an issue: GitHub.