kangdw0x80 commented on issue #5661: URL: https://github.com/apache/seatunnel/issues/5661#issuecomment-1782165775
It is a bug. Iceberg Connector assign files to multiple reader with path information (in addPendingSplits function) - (https://github.com/apache/seatunnel/blob/dev/seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/source/enumerator/AbstractSplitEnumerator.java#L110C16-L111C16) ``` int ownerReader = newSplit.splitId().hashCode() % numReaders; ``` splitId in Iceberg source use path information. ``` public String splitId() { return task.file().path().toString(); } ``` However, It will generate negative values with too long path. This values is id of reader. So, the Connector can't assigned any reader by negative value Change the code ``` - int ownerReader = newSplit.splitId().hashCode() % numReaders; -> + int ownerReader = ( newSplit.splitId().hashCode() & Integer.MAX_VALUE ) % numReaders;% numReaders; ``` -- 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]
