-
Notifications
You must be signed in to change notification settings - Fork 31
InboundFileChannel
rmuthupandian edited this page Feb 11, 2015
·
1 revision
InboundFileChannel is a specialized Inbound channel that is used to replay events recorded in a CSV file. It can be used to train models
<bean id="InboundFileChannelBinder" scope="singleton"
class="com.ebay.jetstream.event.support.channel.ChannelBinding"
depends-on="MessageService">
<property name="channel" ref="InboundFileChannel">
</property>
</bean>
<bean id="InboundFileChannel"
class="com.ebay.jetstream.event.channel.file.InboundFileChannel">
<property name="address" ref="InboundFileChannelAddress" />
<property name="numOfEventPerSec" value="10240" />
<property name="eventSinks">
<list>
<ref bean="outboundMessageChannel" />
</list>
</property>
</bean>
<bean id="InboundFileChannelAddress"
class="com.ebay.jetstream.event.channel.file.CSVFileChannelAddress">
<property name="pathname" value="c:/temp/upload_file.txt"/>
<property name="columnNames">
<!-- the value type is important if the value is used to do some math calculation etc, otherwise,
all string is fine. Integer, Long, Float, and String are supported for now.
-->
<map>
<entry key="D1" value="java.lang.String"/>
<entry key="js_ev_type" value="java.lang.String"/>
<entry key="D2" value="java.lang.String"/>
<entry key="D3" value="java.lang.String"/>
<entry key="D4" value="java.lang.String"/>
<entry key="D5" value="java.lang.String"/>
<entry key="D6" value="java.lang.Long"/>
</map>
</property>
</bean>
The fields in the file must be of the types defined in column names property of the InboundFileChannel address bean and must be in the following order
D1, js_ev_type, D2, D3, D4, D5, D5
js_ev_type is a reserved key and specifies the JetstreamEvent alias or stream name. This is what is declared to the Esper engine as an Event Alias.