goutamadwant opened a new pull request, #11803:
URL: https://github.com/apache/seatunnel/pull/11803

   ### Purpose of this pull request
   
   Part of #11007.
   
   HBase source timestamp constraints were validated only when `HbaseClient` 
created the scan. This PR adds the same constraints to 
`HbaseSourceFactory#optionRule()` so invalid connector configuration is 
rejected during factory validation.
   
   The change:
   
   - requires `start_timestamp` and `end_timestamp` to be non-negative when 
configured
   - requires `start_timestamp` to be less than `end_timestamp` when both are 
configured
   - preserves the existing runtime checks for direct or programmatic 
construction of `HbaseClient`
   - adds focused factory validation coverage for optional, valid, negative, 
equal and reversed timestamp ranges
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes.
   
   Invalid HBase timestamp configurations are now rejected during connector 
option validation instead of failing later while the HBase scan is created. 
Valid configurations keep the existing behavior.
   
   The HBase documentation already describes the non-negative timestamp 
requirement and the `start_timestamp < end_timestamp` constraint, so no 
documentation change is needed.
   
   ### How was this patch tested?
   
   Added factory validation tests covering:
   
   - neither timestamp configured
   - only `start_timestamp` configured
   - only `end_timestamp` configured
   - a valid timestamp range
   - negative start and end timestamps
   - equal start and end timestamps
   - a start timestamp greater than the end timestamp
   
   Focused verification:
   
   ```shell
   ./mvnw -pl seatunnel-connectors-v2/connector-hbase -Dtest=HbaseFactoryTest 
test
   ```
   
   The full `connector-hbase` package was also run locally. All 43 tests passed.
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License 
Notice according
     [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If necessary, please update `incompatible-changes.md` to describe the 
incompatibility caused by this PR.
   * [ ] If you are contributing the connector code, please check that the 
following files are updated:
     1. Update 
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
 and add new connector information in it
     2. Update the pom file of 
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
     3. Add ci label in 
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
     4. Add e2e testcase in 
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/)
     5. Update connector 
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
   
   No checklist item applies to this change. It does not add a binary, 
dependency, connector, packaging entry or incompatible behavior. The existing 
English and Chinese HBase documentation already states these timestamp 
constraints.


-- 
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]

Reply via email to