Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 9adaa076ec
Fetching contributors…

Cannot retrieve contributors at this time

199 lines (166 sloc) 7.083 kB
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:s4_core.properties</value>
</property>
<property name="properties">
<props>
<prop key="kryoSerDeser.initialBufferSize">2048</prop>
<prop key="kryoSerDeser.maxBufferSize">262144</prop>
</props>
</property>
<property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>
<bean id="hasher" class="io.s4.dispatcher.partitioner.DefaultHasher" />
<bean id="commLayerEmitterToAdapter" class="io.s4.emitter.CommLayerEmitter"
init-method="init">
<property name="serDeser" ref="serDeser" />
<property name="listener" ref="rawListener" />
<property name="listenerAppName" value="${adapter_app_name}" />
<property name="monitor" ref="monitor" />
</bean>
<bean id="commLayerEmitter" class="io.s4.emitter.CommLayerEmitter"
init-method="init">
<property name="serDeser" ref="serDeser" />
<property name="listener" ref="rawListener" />
<property name="monitor" ref="monitor" />
</bean>
<bean id="serDeser" class="io.s4.serialize.KryoSerDeser">
<property name="initialBufferSize" value="${kryoSerDeser.initialBufferSize}" />
<property name="maxBufferSize" value="${kryoSerDeser.maxBufferSize}" />
</bean>
<!--START: Dispatchers for control event processor. If stream name in Response
is @adapter or @client, then the event is sent to the adapter (via ctrlDispatcherAdapter).
Else it is sent to the S4 cluster itself (via ctrlDispatcherS4) -->
<bean id="ctrlDispatcher" class="io.s4.dispatcher.MultiDispatcher">
<property name="dispatchers">
<list>
<ref bean="ctrlDispatcherFilteredS4" />
<ref bean="ctrlDispatcherFilteredAdapter" />
</list>
</property>
</bean>
<bean id="ctrlDispatcherFilteredAdapter" class="io.s4.dispatcher.StreamSelectingDispatcher">
<property name="dispatcher" ref="ctrlDispatcherAdapter" />
<property name="streams">
<list>
<value>@${adapter_app_name}</value>
</list>
</property>
</bean>
<bean id="ctrlDispatcherFilteredS4" class="io.s4.dispatcher.StreamExcludingDispatcher">
<property name="dispatcher" ref="ctrlDispatcherS4" />
<property name="streams">
<list>
<value>@${adapter_app_name}</value>
</list>
</property>
</bean>
<bean id="genericPartitioner" class="io.s4.dispatcher.partitioner.DefaultPartitioner">
<property name="hasher" ref="hasher" />
<property name="debug" value="false" />
</bean>
<bean id="ctrlDispatcherS4" class="io.s4.dispatcher.Dispatcher"
init-method="init">
<property name="partitioners">
<list>
<ref bean="genericPartitioner" />
</list>
</property>
<property name="eventEmitter" ref="commLayerEmitter" />
<property name="loggerName" value="s4" />
</bean>
<bean id="ctrlDispatcherAdapter" class="io.s4.dispatcher.Dispatcher"
init-method="init">
<property name="partitioners">
<list>
<ref bean="genericPartitioner" />
</list>
</property>
<property name="eventEmitter" ref="commLayerEmitterToAdapter" />
<property name="loggerName" value="s4" />
</bean>
<!-- END: Dispatchers for control events -->
<!-- Control Events handler -->
<bean id="ctrlHandler" class="io.s4.processor.ControlEventProcessor">
<property name="dispatcher" ref="ctrlDispatcher" />
</bean>
<bean id="peContainer" class="io.s4.processor.PEContainer"
init-method="init" lazy-init="true">
<property name="maxQueueSize" value="${pe_container_max_queue_size}" />
<property name="monitor" ref="monitor" />
<property name="trackByKey" value="true" />
<property name="clock" ref="clock" />
<property name="controlEventProcessor" ref="ctrlHandler" />
<property name="safeKeeper" ref="safeKeeper" />
</bean>
<bean id="rawListener" class="io.s4.listener.CommLayerListener"
init-method="init">
<property name="serDeser" ref="serDeser" />
<property name="clusterManagerAddress" value="${zk_address}" />
<property name="appName" value="${s4_app_name}" />
<property name="maxQueueSize" value="${listener_max_queue_size}" />
<property name="monitor" ref="monitor" />
</bean>
<bean id="eventListener" class="io.s4.collector.EventListener"
init-method="init">
<property name="rawListener" ref="rawListener" />
<property name="peContainer" ref="peContainer" />
<property name="monitor" ref="monitor" />
</bean>
<bean id="monitor" class="io.s4.logger.Log4jMonitor" lazy-init="true"
init-method="init">
<property name="flushInterval" value="30" />
<property name="loggerName" value="monitor" />
</bean>
<bean id="watcher" class="io.s4.util.Watcher" init-method="init"
lazy-init="true">
<property name="monitor" ref="monitor" />
<property name="peContainer" ref="peContainer" />
<property name="minimumMemory" value="52428800" />
</bean>
<!-- Some useful beans related to client-adapter for apps -->
<!-- Dispatcher to send to all adapter nodes. -->
<bean id="dispatcherToClientAdapters" class="io.s4.dispatcher.Dispatcher"
init-method="init">
<property name="partitioners">
<list>
<ref bean="broadcastPartitioner" />
</list>
</property>
<property name="eventEmitter" ref="commLayerEmitterToAdapter" />
<property name="loggerName" value="s4" />
</bean>
<!-- Partitioner to achieve broadcast -->
<bean id="broadcastPartitioner" class="io.s4.dispatcher.partitioner.BroadcastPartitioner" />
<bean id="loopbackDispatcher" class="io.s4.dispatcher.Dispatcher"
init-method="init">
<property name="partitioners">
<list>
<ref bean="loopbackPartitioner" />
</list>
</property>
<property name="eventEmitter" ref="commLayerEmitter" />
<property name="loggerName" value="s4" />
</bean>
<bean id="loopbackPartitioner" class="io.s4.dispatcher.partitioner.LoopbackPartitioner">
<property name="eventEmitter" ref="commLayerEmitter"/>
</bean>
<bean id="safeKeeper" class="io.s4.ft.SafeKeeper" init-method="init">
<property name="stateStorage" ref="bkStateStorage" />
<property name="loopbackDispatcher" ref="loopbackDispatcher" />
<property name="serializer" ref="serDeser"/>
<property name="hasher" ref="hasher"/>
<property name="storageCallbackFactory" ref="loggingStorageCallbackFactory"/>
</bean>
<bean id="loggingStorageCallbackFactory" class="io.s4.ft.LoggingStorageCallbackFactory"/>
<bean id="bkStateStorage" class="io.s4.ft.BookKeeperStateStorage" init-method="init">
<!-- if not specified, default is <current_dir>/tmp/storage
<property name="storageRootPath" value="${storage_root_path}" /> -->
<property name="zkServers" value="localhost:21810"/>
</bean>
</beans>
Jump to Line
Something went wrong with that request. Please try again.