{"record":{"id":"9377619ed01a6377","repo":"apache/seatunnel","slug":"start-timestamp-must-be-less-than-end-timestamp","errorCode":null,"errorMessage":"start_timestamp must be less than end_timestamp","messagePattern":"start_timestamp must be less than end_timestamp","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/client/HbaseClient.java","lineNumber":413,"sourceCode":"    private static void applyTimeRange(Scan scan, HbaseParameters hbaseParameters)\n            throws IOException {\n        Long startTimestamp = hbaseParameters.getStartTimestamp();\n        Long endTimestamp = hbaseParameters.getEndTimestamp();\n        if (startTimestamp == null && endTimestamp == null) {\n            return;\n        }\n\n        if (startTimestamp != null && startTimestamp < 0) {\n            throw new IllegalArgumentException(\"start_timestamp can't be negative\");\n        }\n        if (endTimestamp != null && endTimestamp < 0) {\n            throw new IllegalArgumentException(\"end_timestamp can't be negative\");\n        }\n\n        long min = startTimestamp == null ? 0L : startTimestamp;\n        long max = endTimestamp == null ? Long.MAX_VALUE : endTimestamp;\n        if (min >= max) {\n            throw new IllegalArgumentException(\"start_timestamp must be less than end_timestamp\");\n        }\n        scan.setTimeRange(min, max);\n    }\n\n    /**\n     * Get a RegionLocator.\n     *\n     * @param tableName table name (preferably fully qualified as {@code namespace:table})\n     * @return RegionLocator\n     * @throws IOException exception\n     * @deprecated Use {@link #getRegionLocator(String, String)} instead to avoid relying on the\n     *     default namespace behavior.\n     */\n    @Deprecated\n    public RegionLocator getRegionLocator(String tableName) throws IOException {\n        return this.connection.getRegionLocator(TableName.valueOf(tableName));\n    }\n","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/client/HbaseClient.java#L395-L431","documentation":"applyTimeRange enforces that the resolved time range is non-empty: after defaulting start to 0 and end to Long.MAX_VALUE, min >= max throws IllegalArgumentException('start_timestamp must be less than end_timestamp'). An empty or inverted range cannot be passed to Scan.setTimeRange, so the library fails fast.","triggerScenarios":"Setting start_timestamp >= end_timestamp (including both equal) in the connector options, so buildScan's applyTimeRange computes min >= max.","commonSituations":"Copy-pasting the same timestamp for both bounds; swapped start/end values; window computation producing a zero-width range.","solutions":["Ensure start_timestamp < end_timestamp in the job config","If you need an unbounded range, omit one or both options instead of setting equal values","Fix any generation logic that can emit start == end (e.g. zero-length windows)"],"exampleFix":"// before\nstart_timestamp = 1700003600000\nend_timestamp = 1700003600000\n// after\nstart_timestamp = 1700000000000\nend_timestamp = 1700003600000","handlingStrategy":"validation","validationCode":"if (start != null && end != null && start >= end) {\n    throw new IllegalArgumentException(\"start_timestamp must be < end_timestamp\");\n}","typeGuard":"static boolean validTimeRange(Long start, Long end) {\n    long s = start == null ? 0L : start;\n    long e = end == null ? Long.MAX_VALUE : end;\n    return s < e;\n}","tryCatchPattern":"try { client.buildScan(params); }\ncatch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"must be less than\")) {\n        // swap or correct start/end values in config\n    } else throw e;\n}","preventionTips":["Assert start < end whenever both bounds are set","Avoid zero-width time windows in scheduled jobs","Omit a bound instead of duplicating values"],"tags":["hbase","validation","timestamp","config"],"backgroundTag":"invalid-argument-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}