Skip to content

Commit

Permalink
Add javadocs for RunnerConfig class
Browse files Browse the repository at this point in the history
  • Loading branch information
zhilingc committed May 29, 2020
1 parent 0f8b97d commit 7b103c0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions core/src/main/java/feast/core/job/option/RunnerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,23 @@
import java.util.List;
import java.util.Map;

/**
* Value class containing the application-default configuration for a runner.
* When a job is started by core, all fields in the object will be converted into
* --key=value args to seed the beam pipeline options.
*
*/
public abstract class RunnerConfig {

/**
* Converts the fields in this class to a list of --key=value args to be
* passed to a {@link org.apache.beam.sdk.options.PipelineOptionsFactory}.
*
* Ignores values that are proto-default (e.g. empty string, 0).
*
* @return Array of string args in the format --key=value.
* @throws IllegalAccessException
*/
public String[] toArgs() throws IllegalAccessException {
List<String> args = new ArrayList<>();
for (Field field : this.getClass().getFields()) {
Expand Down

0 comments on commit 7b103c0

Please sign in to comment.