blob: 7e9b614fa221b8d559835cf9028e8dd5909cb35c [file] [log] [blame]
# 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.
# YAML configuration to serve as a basic smoke test for what is supported.
#
# We should support comments, so if we've failed so far, things aren't good.
# we shouldn't choke if we see a document separator...
---
# topology definition
# name to be used when submitting
name: "yaml-topology"
# Components
# Components are analagous to Spring beans. They are meant to be used as constructor,
# property(setter), and builder arguments.
#components:
# - id: "myComponent"
# className: "com.foo.bar.MyComponent"
# properties:
# foo: "bar"
# bar: "foo"
# NOTE: We may want to consider some level of spring integration. For example, allowing component references
# to a spring `ApplicationContext`.
# topology configuration
# this will be passed to the submitter as a map of config options
#
config:
topology.workers: 1
# ...
# spout definitions
spouts:
- id: "spout-1"
className: "backtype.storm.testing.TestWordSpout"
parallelism: 1
# ...
# bolt definitions
bolts:
- id: "bolt-1"
className: "backtype.storm.testing.TestWordCounter"
parallelism: 1
# ...
- id: "bolt-2"
className: "org.apache.storm.flux.wrappers.bolts.LogInfoBolt"
parallelism: 1
# ...
#stream definitions
# stream definitions define connections between spouts and bolts.
# note that such connections can be cyclical
streams:
- name: "spout-1 --> bolt-1" # name isn't used (placeholder for logging, UI, etc.)
# id: "connection-1"
from: "spout-1"
to: "bolt-1"
grouping:
type: FIELDS
args: ["word"]
- name: "bolt-1 --> bolt2"
from: "bolt-1"
to: "bolt-2"
grouping:
type: CUSTOM
customClass:
className: "backtype.storm.testing.NGrouping"
constructorArgs:
- 1