Mirror of Apache Samza
Java Scala Python Shell HTML XSLT Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin SAMZA-1748: Standalone failure tests. Jun 22, 2018
checkstyle SAMZA-1268: Javadoc cleanup for public APIs for 0.13 release May 9, 2017
docs SAMZA-1794: setting application acl in launch context Aug 1, 2018
gradle SAMZA-1722: Upgrading avro from 1.7.0 to 1.7.1 May 22, 2018
samza-api/src SAMZA-1806: Allow `task.broadcast.inputs` to be set to empty string Aug 10, 2018
samza-autoscaling/src SAMZA-1548; Add start() and stop() to SystemAdmin Jan 26, 2018
samza-aws/src SAMZA-1632: KinesisConfig: Making getProxyHost and getProxyPort APIs … Mar 29, 2018
samza-azure SAMZA-1785: add retry logic in eventhubs system consumer for non tran… Jul 30, 2018
samza-core/src SAMZA-1733: Adding comments, adding emptyness check to MetricsSnapsho… Aug 18, 2018
samza-elasticsearch/src Misc. Util cleanup Apr 18, 2018
samza-hdfs/src Minor: Changing tests which use resource files to use Class.getResour… Jun 23, 2018
samza-kafka/src SAMZA-1745: Remove all usages of StreamSpec and ApplicationRunner fro… Jul 27, 2018
samza-kv-inmemory/src SAMZA-1773: Side inputs for local stores Jul 24, 2018
samza-kv-rocksdb/src SAMZA-1802: Enable host affinity when RocksDB is present Aug 7, 2018
samza-kv/src SAMZA-1763: Add async methods to Table API Aug 10, 2018
samza-log4j/src SAMZA-1733: Populating ListGauge metric using DiagnosticsAppender for… Jul 27, 2018
samza-rest/src SAMZA-1738: Merge in some minor additions from Linkedin branch Jun 28, 2018
samza-shell/src/main SAMZA-1534: Fix the visualization in job graph with the new Partition… Dec 12, 2017
samza-sql/src SAMZA-1752: Pass full config to the IO resolver Aug 10, 2018
samza-test/src SAMZA-1763: Add async methods to Table API Aug 10, 2018
samza-tools SAMZA-1755: Fix JsonRelConverter to recursively convert relRecords. Jul 13, 2018
samza-yarn/src SAMZA-1794: setting application acl in launch context Aug 1, 2018
.gitignore Ignore java fatal error log files from git and rat Nov 9, 2017
.reviewboardrc SAMZA-43; fix reviewboardrc to support rbt post Feb 3, 2014
.travis.yml SAMZA-1759: Stream Assert utilities for low level and high level api … Aug 2, 2018
HEADER initial import. Aug 12, 2013
KEYS Added Prateek's code signing public key to KEYS Oct 4, 2017
LICENSE SAMZA-975 - Initial Samza REST Implementation Aug 23, 2016
NOTICE SAMZA-1474: Bump up rocksdb version to 5.7.3 to include licensing cha… Nov 14, 2017
README.md SAMZA-1748: Standalone failure tests. Jun 22, 2018
RELEASE.md SAMZA-1762: Fix Memory link in the Timer Registry Map Jun 26, 2018
bootstrap.gradle SAMZA-283: Resolve gradle wrapper jar issue Jun 13, 2014
build.gradle SAMZA-1677: Make httpcore and httpclient dependencies consistent Jul 25, 2018
doap_Samza.rdf SAMZA-521; updating doap for TLP Jan 24, 2015
gradle.properties SAMZA-1702: Prepare 0.14.1 release on the master branch May 7, 2018
gradlew SAMZA-1051: merge operator APIs to master Nov 22, 2016
settings.gradle Initial version for in memory system. Apr 17, 2018
sonar-project.properties Initial version for in memory system. Apr 17, 2018

README.md

What is Samza? Build Status

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:

  • Simple API: Unlike most low-level messaging system APIs, Samza provides a very simple callback-based "process message" API comparable to MapReduce.
  • Managed state: Samza manages snapshotting and restoration of a stream processor's state. When the processor is restarted, Samza restores its state to a consistent snapshot. Samza is built to handle large amounts of state (many gigabytes per partition).
  • Fault tolerance: Whenever a machine in the cluster fails, Samza works with YARN to transparently migrate your tasks to another machine.
  • Durability: Samza uses Kafka to guarantee that messages are processed in the order they were written to a partition, and that no messages are ever lost.
  • Scalability: Samza is partitioned and distributed at every level. Kafka provides ordered, partitioned, replayable, fault-tolerant streams. YARN provides a distributed environment for Samza containers to run in.
  • Pluggable: Though Samza works out of the box with Kafka and YARN, Samza provides a pluggable API that lets you run Samza with other messaging systems and execution environments.
  • Processor isolation: Samza works with Apache YARN, which supports Hadoop's security model, and resource isolation through Linux CGroups.

Check out Hello Samza to try Samza. Read the Background page to learn more about Samza.

Building 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.

Scala and YARN

Samza builds with Scala 2.10 or 2.11 and YARN 2.6.1, by default. Use the -PscalaVersion switches to change Scala versions. Samza supports building Scala with 2.10 and 2.11.

./gradlew -PscalaVersion=2.11 clean build

Testing Samza

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

Running checkstyle on the java code

./gradlew checkstyleMain checkstyleTest

Job Management

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

Developers

To get Eclipse projects, run:

./gradlew eclipse

For IntelliJ, run:

./gradlew idea

Contribution

To start contributing on Samza please read Rules and Contributor Corner. Notice that Samza git repository does not support git pull request.

Apache Software Foundation

Apache Samza is a top level project of the Apache Software Foundation.

Apache Software Foundation Logo