Skip to content

SAMZA-2499: Add submission config file support#1336

Merged
cameronlee314 merged 1 commit into
apache:masterfrom
kw2542:SAMZA-2499
Apr 2, 2020
Merged

SAMZA-2499: Add submission config file support#1336
cameronlee314 merged 1 commit into
apache:masterfrom
kw2542:SAMZA-2499

Conversation

@kw2542
Copy link
Copy Markdown
Contributor

@kw2542 kw2542 commented Apr 1, 2020

Feature:
https://cwiki.apache.org/confluence/display/SAMZA/SEP-23:+Simplify+Job+Runner

Changes:

  1. Add config-path option in ApplicationRunnerCommandLine.
  2. Update loadConfig() to read property file specified by config-path as submission config.

Tests:
Followed https://samza.apache.org/startup/hello-samza/latest/ to test against Hello Samza example:

  1. Update wikipedia-feed.properties to include the following properties:

job.config.loader.factory=org.apache.samza.config.loaders.PropertiesConfigLoaderFactory
job.config.loader.properties.path=./__package/config/wikipedia-feed.properties

  1. Deploy the job:
    deploy/samza/bin/run-app.sh --config-path=$PWD/deploy/samza/config/wikipedia-feed.properties

API Changes:

  1. Add --config-path option support when running run-app.sh

Upgrade Instructions:
None

Usage Instructions:
Alternative way when submitting job,

deploy/samza/bin/run-app.sh
--config app.class=A
--config job.stream.factory=B
--config yarn.package.path=C
--config job.config.loader.factory=D
--config job.config.loader.properties.xx=E
--config job.name=F

can be simplied to

deploy/samza/bin/run-app.sh --config-path=/path/to/submission/properties/file/submission.properties

where submission.properties contains

app.class=A
job.stream.factory=B
yarn.package.path=C
job.config.loader.factory=D
job.config.loader.properties.xx=E
job.name=F

Feature:
https://cwiki.apache.org/confluence/display/SAMZA/SEP-23:+Simplify+Job+Runner

Changes:
1. Add config-path option in ApplicationRunnerCommandLine.
2. Update loadConfig() to read property file specified by config-path as submission config.

Tests:
Followed https://samza.apache.org/startup/hello-samza/latest/ to test against Hello Samza example:

1. Update wikipedia-feed.properties to include the following properties:

job.config.loader.factory=org.apache.samza.config.loaders.PropertiesConfigLoaderFactory
job.config.loader.properties.path=./__package/config/wikipedia-feed.properties

2. Deploy the job:
deploy/samza/bin/run-app.sh --config-path=$PWD/deploy/samza/config/wikipedia-feed.properties

API Changes:
1. Add --config-path option support when running run-app.sh

Upgrade Instructions:
None

Usage Instructions:
Alternative way when submitting job,

deploy/samza/bin/run-app.sh \
  --config app.class=A \
  --config job.stream.factory=B \
  --config yarn.package.path=C \
  --config job.config.loader.factory=D \
  --config job.config.loader.properties.xx=E \
  --config job.name=F

can be simplied to

deploy/samza/bin/run-app.sh --config-path=/path/to/submission/properties/file/submission.properties

where submission.properties contains

app.class=A
job.stream.factory=B
yarn.package.path=C
job.config.loader.factory=D
job.config.loader.properties.xx=E
job.name=F
@cameronlee314 cameronlee314 merged commit a086ae0 into apache:master Apr 2, 2020
@kw2542 kw2542 deleted the SAMZA-2499 branch April 4, 2020 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants