# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

# Job
app.name=cowdata-application
app.id=cowdata-samza-1
#job.coordinator.factory=org.apache.samza.zk.ZkJobCoordinatorFactory

# Use a PassthroughJobCoordinator since there is no coordination needed
job.coordinator.factory=org.apache.samza.standalone.PassthroughJobCoordinatorFactory
job.coordination.utils.factory=org.apache.samza.standalone.PassthroughCoordinationUtilsFactory
processor.id=0

job.default.system=kafka
job.changelog.system=kafka
job.coordinator.zk.connect=localhost:2181
task.name.grouper.factory=org.apache.samza.container.grouper.task.GroupByContainerIdsFactory
# Use a single container to process all of the data
#task.name.grouper.factory=org.apache.samza.container.grouper.task.SingleContainerGrouperFactory


# Read from the beginning of the topic
# permet de corriger l'erreur : java.io.IOException: ps returned unexpected output: null
# at org.apache.samza.container.host.PosixCommandBasedStatisticsGetter.getPhysicalMemory(PosixCommandBasedStatisticsGetter.java:65)
#systems.system-name.default.stream.samza.offset.default    =====> system-name = job.default.system = kafka dans ce cas-ci
systems.kafka.default.stream.samza.offset.default=oldest

# Define a system called "kafka" for consuming and producing to a Kafka cluster
systems.kafka.samza.factory=org.apache.samza.system.kafka.KafkaSystemFactory

# Declare that we want our job's checkpoints to be written to Kafka
#task.checkpoint.factory=org.apache.samza.checkpoint.kafka.KafkaCheckpointManagerFactory
task.checkpoint.factory=org.apache.samza.checkpoint.file.FileSystemCheckpointManagerFactory
#task.checkpoint.system=kafka
task.checkpoint.path=opt/tmp/samza-local-chekpoint/

# By default, a checkpoint is written every 60 seconds. You can change this if you like.
task.commit.ms=5000

# To group data per partition
job.systemstreampartition.grouper.factory = org.apache.samza.container.grouper.stream.GroupByPartitionFactory

# Serializers
serializers.registry.string.class=org.apache.samza.serializers.StringSerdeFactory
serializers.registry.integer.class=org.apache.samza.serializers.IntegerSerdeFactory

# Key-value storage
#stores.wikipedia-stats.factory=org.apache.samza.storage.kv.RocksDbKeyValueStorageEngineFactory
#stores.wikipedia-stats.changelog=kafka.wikipedia-stats-changelog
#stores.wikipedia-stats.key.serde=string
#stores.wikipedia-stats.msg.serde=integer

group.id=samzaclient

task.log4j.system=kafka

