apache/seatunnel · error · IllegalArgumentException
startRowkey can't be bigger than endRowkey
Error message
startRowkey can't be bigger than endRowkey
What it means
Thrown by HBaseUtil.validateRowKeyRange when both startRowkey and endRowkey are configured and the start rowkey is lexicographically greater than the end rowkey (byte-wise comparison). A scan with such a range would return nothing or behave incorrectly, so SeaTunnel rejects the configuration up front.
Source
Thrown at seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/util/HBaseUtil.java:43
public class HBaseUtil {
public static byte[] convertRowKey(String rowKey, boolean isBinary) {
if (StringUtils.isEmpty(rowKey)) {
return HConstants.EMPTY_BYTE_ARRAY;
}
if (isBinary) {
return Bytes.toBytesBinary(rowKey);
} else {
return Bytes.toBytes(rowKey);
}
}
public static void validateRowKeyRange(byte[] startRowKey, byte[] endRowKey) {
if (startRowKey.length > 0 && endRowKey.length > 0) {
if (Bytes.compareTo(startRowKey, endRowKey) > 0) {
throw new IllegalArgumentException("startRowkey can't be bigger than endRowkey");
}
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Swap the values so startRowkey is lexicographically (byte-wise) less than or equal to endRowkey.
- Remember comparison is byte-wise, not locale order — check the raw bytes of your rowkeys if they are binary.
- Remove one of the bounds if you intended an open-ended scan (empty startRowkey or endRowkey skips the check).
- Test the rowkey range in the HBase shell with a Scan to confirm expected data before submitting the job.
Example fix
// before startRowkey = "z" endRowkey = "a" // after startRowkey = "a" endRowkey = "z"
Defensive patterns
Strategy: validation
Validate before calling
import org.apache.hadoop.hbase.util.Bytes;
if (startRowkey.length > 0 && endRowkey.length > 0
&& Bytes.compareTo(startRowkey.getBytes(), endRowkey.getBytes()) > 0) {
throw new IllegalArgumentException("startRowkey must be <= endRowkey");
} Try / catch
try {
hbaseSource.validate();
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("startRowkey can't be bigger")) {
// swap bounds or clear one before re-submitting
}
} Prevention
- Validate rowkey ordering in config-load tooling before submission.
- For binary rowkeys, generate config values from the raw bytes, not human-readable strings.
- Leave startRowkey/endRowkey empty for open-ended scans.
- Add unit tests for scan-range configs.
When it happens
Trigger: Setting 'startRowkey' > 'endRowkey' in byte order in the HBase source config — e.g. startRowkey="z", endRowkey="a" — triggers validateRowKeyRange during connector setup.
Common situations: Swapped start/end rowkey values in config; binary (non-string) rowkeys configured with values whose byte order differs from what the user expects; copy-paste errors when narrowing a scan range.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- start_timestamp can't be negative
- end_timestamp can't be negative
- start_timestamp must be less than end_timestamp
- Schema config can not be empty
- Unknown format type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/c71f6dc475de09c8.
Report an issue: GitHub.