zhangshenghang commented on code in PR #9938:
URL: https://github.com/apache/seatunnel/pull/9938#discussion_r2425100173
##########
seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/source/HbaseSourceSplitEnumerator.java:
##########
@@ -152,23 +172,60 @@ private void assignSplit(int taskId) {
context.signalNoMoreSplits(taskId);
}
- /** Get all splits of table */
- private Set<HbaseSourceSplit> getTableSplits() {
- List<HbaseSourceSplit> splits = new ArrayList<>();
+ @VisibleForTesting
+ public Set<HbaseSourceSplit> getTableSplits() {
try {
RegionLocator regionLocator =
hbaseClient.getRegionLocator(hbaseParameters.getTable());
byte[][] startKeys = regionLocator.getStartKeys();
byte[][] endKeys = regionLocator.getEndKeys();
- if (startKeys.length != endKeys.length) {
- throw new IOException(
- "Failed to create Splits for HBase table {}. HBase
start keys and end keys not equal."
- + hbaseParameters.getTable());
- }
Review Comment:
Why delete it?
--
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]