All Samza jobs have a configuration file that defines the job. A very basic configuration file looks like this:
{% highlight jproperties %}
job.factory.class=org.apache.samza.job.local.ThreadJobFactory job.name=hello-world
task.class=samza.task.example.MyJavaStreamerTask task.inputs=example-system.example-stream
serializers.registry.json.class=org.apache.samza.serializers.JsonSerdeFactory serializers.registry.string.class=org.apache.samza.serializers.StringSerdeFactory
systems.example-system.samza.factory=samza.stream.example.ExampleConsumerFactory systems.example-system.samza.key.serde=string systems.example-system.samza.msg.serde=json {% endhighlight %}
There are four major sections to a configuration file:
Configuration keys that absolutely must be defined for a Samza job are:
job.factory.class
job.name
task.class
task.inputs
A complete list of configuration keys can be found on the Configuration Table page. Note that configuration keys prefixed with “sensitive.” are treated specially, in that the values associated with such keys will be masked in logs and Samza's YARN ApplicationMaster UI. This is to prevent accidental disclosure only; no encryption is done.