[
https://issues.apache.org/jira/browse/BEAM-6730?focusedWorklogId=213335&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-213335
]
ASF GitHub Bot logged work on BEAM-6730:
----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Mar/19 18:46
Start Date: 14/Mar/19 18:46
Worklog Time Spent: 10m
Work Description: chamikaramj commented on pull request #7875:
[BEAM-6730] Expose Java SDK's GenerateSequence in Python
URL: https://github.com/apache/beam/pull/7875#discussion_r265708559
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/io/GenerateSequence.java
##########
@@ -98,6 +103,46 @@
abstract GenerateSequence build();
}
+ /** Exposes GenerateSequence as an external transform for cross-language
usage. */
+ @AutoService(ExternalTransformRegistrar.class)
+ public static class External implements ExternalTransformRegistrar {
+
+ @Override
+ public Map<String, Class<? extends ExternalConfigBuilder>> knownBuilders()
{
+ return ImmutableMap.of(
+ "beam:external:java:generate_sequence:v1",
ExternalConfiguration.class);
+ }
+
+ /** Parameters class to expose the transform to an external SDK. */
+ public static class ExternalConfiguration
+ implements ExternalConfigBuilder<PBegin, PCollection<Long>> {
Review comment:
ExternalConfiguration extending ExternalConfigBuilder looks a bit weird and
looks like we'll have to put some effort into keeping transform builder and
external configuration in builder for each transform in sync. Instead how about
transforms that support cross-language having to directly implement
ExternalConfigBuilder and making ExternalConfiguration POJO a parameter of the
build() method ? Hopefully this will encourage developer to keep builders in
sync when transforms get updated. Another option will be to use the same
builder as the transform when possible.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 213335)
Time Spent: 6h 40m (was: 6.5h)
> Expose Java transforms (specifically IO) in other SDKs
> ------------------------------------------------------
>
> Key: BEAM-6730
> URL: https://issues.apache.org/jira/browse/BEAM-6730
> Project: Beam
> Issue Type: New Feature
> Components: runner-flink, sdk-java-core, sdk-py-core
> Reporter: Maximilian Michels
> Assignee: Maximilian Michels
> Priority: Major
> Time Spent: 6h 40m
> Remaining Estimate: 0h
>
> Since https://github.com/apache/beam/pull/7316 we can reference external
> transforms which are transforms only available in a "foreign" SDKs. This
> allows us to fill the gap in terms of missing transforms in the Python and Go
> SDK, specifically IO transforms.
> We can start collecting/exposing transforms that Beam users need. The
> following transforms could be interesting:
> - KafkaIO / KinesisIO
> - CassandraIO / ElasticserchIO / Hbase / Redis
> - JDBC
> - S3 file system
> - GenerateSequence
> See also https://s.apache.org/beam-cross-language-io and BEAM-6485.
> CC [~robertwb] [~chamikara] [~thw]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)