Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ base_dir=`pwd`

mvn clean package
mkdir -p $base_dir/deploy/samza
tar -xvf $base_dir/target/hello-samza-1.5.0-SNAPSHOT-dist.tar.gz -C $base_dir/deploy/samza
tar -xvf $base_dir/target/hello-samza-1.7.0-SNAPSHOT-dist.tar.gz -C $base_dir/deploy/samza
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

SAMZA_VERSION=1.6.0-SNAPSHOT
SAMZA_VERSION=1.7.0-SNAPSHOT
KAFKA_VERSION=0.11.0.2
HADOOP_VERSION=2.7.1

Expand Down
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ under the License.

<groupId>org.apache.samza</groupId>
<artifactId>hello-samza</artifactId>
<version>1.6.0-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Samza Example</name>
<description>
Expand All @@ -36,6 +36,12 @@ under the License.
<url>https://samza.apache.org/</url>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-http -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>9.4.38.v20210224</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -294,7 +300,7 @@ under the License.
<properties>
<!-- maven specific properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<samza.version>1.6.0-SNAPSHOT</samza.version>
<samza.version>1.7.0-SNAPSHOT</samza.version>
<hadoop.version>2.6.1</hadoop.version>
</properties>

Expand Down
7 changes: 5 additions & 2 deletions src/main/config/filter-example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
# Application/Job
app.class=samza.examples.cookbook.FilterExample
job.factory.class=org.apache.samza.job.yarn.YarnJobFactory
job.name=pageview-filter
job.container.count=2
job.name=startpoint-test-4
job.container.count=1
job.systemstreampartition.grouper.factory=org.apache.samza.container.grouper.stream.AllSspToSingleTaskGrouperFactory
task.checkpoint.factory=org.apache.samza.checkpoint.kafka.KafkaCheckpointManagerFactory
task.commit.ms=30000

# YARN
yarn.package.path=file://${basedir}/target/${project.artifactId}-${pom.version}-dist.tar.gz
Expand Down
245 changes: 0 additions & 245 deletions src/main/java/samza/examples/cookbook/CouchbaseTableExample.java

This file was deleted.

20 changes: 10 additions & 10 deletions src/main/java/samza/examples/cookbook/FilterExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@
* <ol>
* <li>
* Ensure that the topic "pageview-filter-input" is created <br/>
* ./deploy/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic pageview-filter-input --partitions 2 --replication-factor 1
* ./deploy/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic startpoint-test-input-4 --partitions 2 --replication-factor 1
* </li>
* <li>
* Run the application using the run-app.sh script <br/>
* ./deploy/samza/bin/run-app.sh --config-path=$PWD/deploy/samza/config/filter-example.properties
* </li>
* <li>
* Produce some messages to the "pageview-filter-input" topic <br/>
* ./deploy/kafka/bin/kafka-console-producer.sh --topic pageview-filter-input --broker-list localhost:9092 <br/>
* {"userId": "user1", "country": "india", "pageId":"google.com"} <br/>
* {"userId": "invalidUserId", "country": "france", "pageId":"facebook.com"} <br/>
* {"userId": "user2", "country": "china", "pageId":"yahoo.com"}
* Produce some messages to the "startpoint-test-input-4" topic <br/>
* ./deploy/kafka/bin/kafka-console-producer.sh --topic startpoint-test-input-4 --broker-list localhost:9092 --property "parse.key=true" --property "key.separator=|" <br/>
* 0|{"userId": "user1", "country": "india", "pageId":"google.com"} <br/>
* 0|{"userId": "invalidUserId", "country": "france", "pageId":"facebook.com"} <br/>
* 1|{"userId": "user2", "country": "china", "pageId":"yahoo.com"}
* </li>
* <li>
* Consume messages from the "pageview-filter-output" topic (e.g. bin/kafka-console-consumer.sh)
* ./deploy/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic pageview-filter-output --property print.key=true
* Consume messages from the "startpoint-test-output-4" topic (e.g. bin/kafka-console-consumer.sh)
* ./deploy/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic startpoint-test-output-4 --property print.key=true
* </li>
* </ol>
*/
Expand All @@ -72,8 +72,8 @@ public class FilterExample implements StreamApplication {
private static final List<String> KAFKA_PRODUCER_BOOTSTRAP_SERVERS = ImmutableList.of("localhost:9092");
private static final Map<String, String> KAFKA_DEFAULT_STREAM_CONFIGS = ImmutableMap.of("replication.factor", "1");

private static final String INPUT_STREAM_ID = "pageview-filter-input";
private static final String OUTPUT_STREAM_ID = "pageview-filter-output";
private static final String INPUT_STREAM_ID = "startpoint-test-input-4";
private static final String OUTPUT_STREAM_ID = "startpoint-test-output-4";
private static final String INVALID_USER_ID = "invalidUserId";

@Override
Expand Down
Loading