blob: 7ebb2d79d0bc696c074430ef32770c430dd72965 [file] [log] [blame]
# Copyright 2017 Twitter. All rights reserved.
#
# Licensed 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.
---
name: "fibonacci-topology"
config:
topology.workers: 1
components:
- id: "property-holder"
className: "com.twitter.heron.examples.eco.TestPropertyHolder"
constructorArgs:
- "some argument"
properties:
- name: "numberProperty"
value: 11
- name: "publicProperty"
value: "This is public property"
spouts:
- id: "spout-1"
className: "com.twitter.heron.examples.eco.TestFibonacciSpout"
constructorArgs:
- ref: "property-holder"
parallelism: 1
bolts:
- id: "even-and-odd-bolt"
className: "com.twitter.heron.examples.eco.EvenAndOddBolt"
parallelism: 1
- id: "ibasic-print-bolt"
className: "com.twitter.heron.examples.eco.TestIBasicPrintBolt"
parallelism: 1
configMethods:
- name: "sampleConfigurationMethod"
args:
- "${ecoPropertyOne}"
- MB
- id: "sys-out-bolt"
className: "com.twitter.heron.examples.eco.TestPrintBolt"
parallelism: 1
streams:
- from: "spout-1"
to: "even-and-odd-bolt"
grouping:
type: SHUFFLE
- from: "even-and-odd-bolt"
to: "ibasic-print-bolt"
grouping:
type: SHUFFLE
streamId: "odds"
- from: "even-and-odd-bolt"
to: "sys-out-bolt"
grouping:
type: SHUFFLE
streamId: "evens"