-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flink registrar #40
Flink registrar #40
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.apache.beam.runners.flink; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. License missing here. I'm assuming this is going to be Apache 2.0 licensed? I'll add the following header:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ravwojdyla Perhaps you could explicitly state here that you're putting the work under the Apache license. Just to make sure we're doing everything correct here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that we clarified our contribution guidelines, we can merge your contribution. Thanks! |
||
|
||
import com.google.auto.service.AutoService; | ||
import org.apache.beam.runners.flink.FlinkPipelineOptions; | ||
import org.apache.beam.runners.flink.FlinkPipelineRunner; | ||
import com.google.cloud.dataflow.sdk.options.PipelineOptions; | ||
import com.google.cloud.dataflow.sdk.options.PipelineOptionsRegistrar; | ||
import com.google.cloud.dataflow.sdk.runners.PipelineRunner; | ||
import com.google.cloud.dataflow.sdk.runners.PipelineRunnerRegistrar; | ||
import com.google.common.collect.ImmutableList; | ||
|
||
|
||
/** | ||
* AuteService registrar - will register FlinkRunner and FlinkOptions | ||
* as possible pipeline runner services. | ||
* | ||
* It ends up in META-INF/services and gets picked up by Dataflow. | ||
* | ||
*/ | ||
public class FlinkRunnerRegistrar { | ||
private FlinkRunnerRegistrar() { } | ||
|
||
@AutoService(PipelineRunnerRegistrar.class) | ||
public static class Runner implements PipelineRunnerRegistrar { | ||
@Override | ||
public Iterable<Class<? extends PipelineRunner<?>>> getPipelineRunners() { | ||
return ImmutableList.<Class<? extends PipelineRunner<?>>>of(FlinkPipelineRunner.class); | ||
} | ||
} | ||
|
||
@AutoService(PipelineOptionsRegistrar.class) | ||
public static class Options implements PipelineOptionsRegistrar { | ||
@Override | ||
public Iterable<Class<? extends PipelineOptions>> getPipelineOptions() { | ||
return ImmutableList.<Class<? extends PipelineOptions>>of(FlinkPipelineOptions.class); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been restructured in the meantime. I won't merge this commit.