# 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.

#This example will write to hdfs/maprfs after 10k records or 6 seconds which ever comes first. 
#In addition it uses a file chanel instead of a memory channel to aid in reliability on the data flow.

# The configuration file needs to define the sources, 
# the channels and the sinks.

agent.sources=syslogsource-1
agent.channels=fileChannel-1
agent.sinks=MapRFS

agent.sources.syslogsource-1.type=syslogtcp
agent.sources.syslogsource-1.port=13073
agent.sources.syslogsource-1.host=0.0.0.0
agent.sources.syslogsource-1.channels=fileChannel-1

agent.channels.fileChannel-1.type=file
agent.channels.fileChannel-1.capacity=100000
agent.channels.fileChannel-1.transactionCapacity=1000

agent.sinks.MapRFS.channel=fileChannel-1
agent.sinks.MapRFS.type=hdfs
agent.sinks.MapRFS.hdfs.path=maprfs:///flume_import/%Y/%m/%H/
agent.sinks.MapRFS.hdfs.filePrefix=logdata-%Y-%m-%H-%M-%S
agent.sinks.MapRFS.hdfs.file.Type=DataStream
agent.sinks.MapRFS.hdfs.rollInterval=0
agent.sinks.MapRFS.hdfs.rollSize=16384000
agent.sinks.MapRFS.hdfs.rollCount=0
agent.sinks.MapRFS.hdfs.batchSize=1000
agent.sinks.MapRFS.hdfs.txnEventMax=1000
agent.sinks.MapRFS.serializer=avro_event
agent.sinks.MapRFS.hdfs.threadsPoolSize=20

