mtauha commented on PR #37675: URL: https://github.com/apache/beam/pull/37675#issuecomment-3947872224
> Rather than rebuilding something from scratch, have you tried just using > > https://github.com/apache/beam/blob/4fe61733f7786dcccc214f2095feb61fc713e0ac/sdks/python/apache_beam/io/external/generate_sequence.py#L24 > > ? I'd expect it to work, I think the flink comment is probably outdated. If not, it would be better for us to address that Hey @damccorm, I went ahead and tested the existing external/generate_sequence.py on DirectRunner as you suggested. Unfortunately it fails without a Java expansion service running. Here's the exact test I ran: ```python import apache_beam as beam from apache_beam.io.external.generate_sequence import GenerateSequence from apache_beam.testing.util import assert_that, equal_to with beam.Pipeline() as p: result = p | GenerateSequence(start=0, stop=5) assert_that(result, equal_to([0, 1, 2, 3, 4])) ``` And here's the error I got: ```bash grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:8097: ConnectEx: Connection refused (No connection could be made because the target machine actively refused it. -- 10061)" ``` It's actively trying to connect to a Java expansion server on port 8097. So, it absolutely requires the expansion service to be running, confirming the "Flink only" comment is not outdated but accurate. This validates a native Python implementation that works on all runners without any Java dependency. Happy to continue with this approach unless there's a different direction you'd prefer. Thanks! -- 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]
