commit | c2b1af2600e3702e4e81af607c8079f3d75b57cc | [log] [tgz] |
---|---|---|
author | Ke Wu <kwu@kwu-ld2.linkedin.biz> | Tue Dec 17 17:07:10 2019 -0800 |
committer | Ke Wu <kwu@kwu-ld2.linkedin.biz> | Tue Dec 17 17:12:45 2019 -0800 |
tree | d8735d1ba31df5c209c0edfe4c1fbd0e933ad7c4 | |
parent | 454bfabcbf702e02ad0678ae51a677a2c2230bd5 [diff] |
SAMZA-2406: Add ConfigLoader, ConfigLoaderFactory interface and default PropertiesConfigLoader as well as PropertiesConfigLoaderFactory implementations. Add ConfigLoader, ConfigLoaderFactory interface and default PropertiesConfigLoader as well as PropertiesConfigLoaderFactory implementations, which will be used on AM to fetch configs. It will also be used on LocalApplicationRunner to fetch configs as well. The existing ConfigFactory interface will be deprecated and removed as we do not fetch configs on start up script run-app.sh anymore. Design: https://cwiki.apache.org/confluence/display/SAMZA/SEP-23%3A+Simplify+Job+Runner Changes: 1. Add ConfigLoader interface which will be used in job coordinator to retrieve config from. 2. Add ConfigLoaderFactory interface which will be used to create an instance of ConfigLoader. 3. Add PropertiesConfigLoader which is a default implementation of ConfigLoader that reads a local properties file given the file path. 4. Add PropertiesConfigLoaderFactory which is a default implementation of ConfigLoaderFactory that reads properties file path from start up config and creates a PropertiesConfigLoader with the provided path. API Changes: N/A. This is part of a series PRs, detailed information will be provided in the last/main PR. Upgrade Instructions: N/A. This is part of a series PRs, detailed information will be provided in the last/main PR. Usage Instructions: N/A. This is part of a series PRs, detailed information will be provided in the last/main PR. Tests: Add TestPropertiesConfigLoader to unit test PropertiesConfigLoader.
Apache Samza is a distributed stream processing framework. It uses Apache Kafka for messaging, and Apache Hadoop YARN to provide fault tolerance, processor isolation, security, and resource management.
Samza's key features include:
Check out Hello Samza to try Samza. Read the Background page to learn more about Samza.
To build Samza from a git checkout, run:
./gradlew clean build
To build Samza from a source release, it is first necessary to download the gradle wrapper script above. This bootstrapping process requires Gradle to be installed on the source machine. Gradle is available through most package managers or directly from its website. To bootstrap the wrapper, run:
gradle -b bootstrap.gradle
After the bootstrap script has completed, the regular gradlew instructions below are available.
Samza builds with Scala 2.11 or 2.12 and YARN 2.6.1, by default. Use the -PscalaSuffix switches to change Scala versions. Samza supports building Scala with 2.11 and 2.12.
./gradlew -PscalaSuffix=2.11 clean build
To run all tests:
./gradlew clean test
To run a single test:
./gradlew clean :samza-test:test -Dtest.single=TestStatefulTask
To run key-value performance tests:
./gradlew samza-shell:kvPerformanceTest -PconfigPath=file://$PWD/samza-test/src/main/config/perf/kv-perf.properties
To run yarn integration tests:
./bin/integration-tests.sh <dir> yarn-integration-tests
To run standalone integration tests:
./bin/integration-tests.sh <dir> standalone-integration-tests
./gradlew checkstyleMain checkstyleTest
To run a job (defined in a properties file):
./gradlew samza-shell:runJob -PconfigPath=file:///path/to/job/config.properties
To inspect a job's latest checkpoint:
./gradlew samza-shell:checkpointTool -PconfigPath=file:///path/to/job/config.properties
To modify a job's checkpoint (assumes that the job is not currently running), give it a file with the new offset for each partition, in the format systems.<system>.streams.<topic>.partitions.<partition>=<offset>
:
./gradlew samza-shell:checkpointTool -PconfigPath=file:///path/to/job/config.properties \ -PnewOffsets=file:///path/to/new/offsets.properties
To get Eclipse projects, run:
./gradlew eclipse
For IntelliJ, run:
./gradlew idea
To start contributing on Samza please read Rules and Contributor Corner. Notice that Samza git repository does not support git pull request.
Apache Samza is a top level project of the Apache Software Foundation.