Skip to content

Commit 94096e7

Browse files
committed
kafka-server configuration added
1 parent 171b796 commit 94096e7

12 files changed

+495
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name=local-console-sink
17+
connector.class=org.apache.kafka.connect.file.FileStreamSinkConnector
18+
tasks.max=1
19+
topics=connect-test
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name=local-console-source
17+
connector.class=org.apache.kafka.connect.file.FileStreamSourceConnector
18+
tasks.max=1
19+
topic=connect-test
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
##
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
##
17+
18+
# These are defaults. This file just demonstrates how to override some settings.
19+
bootstrap.servers=localhost:9092
20+
21+
group.id=connect-cluster
22+
23+
# The converters specify the format of data in Kafka and how to translate it into Connect data. Every Connect user will
24+
# need to configure these based on the format they want their data in when loaded from or stored into Kafka
25+
key.converter=org.apache.kafka.connect.json.JsonConverter
26+
value.converter=org.apache.kafka.connect.json.JsonConverter
27+
# Converter-specific settings can be passed in by prefixing the Converter's setting with the converter we want to apply
28+
# it to
29+
key.converter.schemas.enable=true
30+
value.converter.schemas.enable=true
31+
32+
# The internal converter used for offsets and config data is configurable and must be specified, but most users will
33+
# always want to use the built-in default. Offset and config data is never visible outside of Copcyat in this format.
34+
internal.key.converter=org.apache.kafka.connect.json.JsonConverter
35+
internal.value.converter=org.apache.kafka.connect.json.JsonConverter
36+
internal.key.converter.schemas.enable=false
37+
internal.value.converter.schemas.enable=false
38+
39+
offset.storage.topic=connect-offsets
40+
# Flush much faster than normal, which is useful for testing/debugging
41+
offset.flush.interval.ms=10000
42+
config.storage.topic=connect-configs
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name=local-file-sink
17+
connector.class=FileStreamSink
18+
tasks.max=1
19+
file=test.sink.txt
20+
topics=connect-test
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name=local-file-source
17+
connector.class=FileStreamSource
18+
tasks.max=1
19+
file=test.txt
20+
topic=connect-test
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
log4j.rootLogger=INFO, stdout
17+
18+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
19+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
20+
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n
21+
22+
log4j.logger.org.apache.zookeeper=ERROR
23+
log4j.logger.org.I0Itec.zkclient=ERROR
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# These are defaults. This file just demonstrates how to override some settings.
17+
bootstrap.servers=localhost:9092
18+
19+
# The converters specify the format of data in Kafka and how to translate it into Connect data. Every Connect user will
20+
# need to configure these based on the format they want their data in when loaded from or stored into Kafka
21+
key.converter=org.apache.kafka.connect.json.JsonConverter
22+
value.converter=org.apache.kafka.connect.json.JsonConverter
23+
# Converter-specific settings can be passed in by prefixing the Converter's setting with the converter we want to apply
24+
# it to
25+
key.converter.schemas.enable=true
26+
value.converter.schemas.enable=true
27+
28+
# The internal converter used for offsets and config data is configurable and must be specified, but most users will
29+
# always want to use the built-in default. Offset and config data is never visible outside of Copcyat in this format.
30+
internal.key.converter=org.apache.kafka.connect.json.JsonConverter
31+
internal.value.converter=org.apache.kafka.connect.json.JsonConverter
32+
internal.key.converter.schemas.enable=false
33+
internal.value.converter.schemas.enable=false
34+
35+
offset.storage.file.filename=/tmp/connect.offsets
36+
# Flush much faster than normal, which is useful for testing/debugging
37+
offset.flush.interval.ms=10000

roles/kafka/files/default/kafka

Whitespace-only changes.

roles/kafka/files/log4j.properties

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
log4j.rootLogger=INFO, stdout
17+
18+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
19+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
20+
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n
21+
22+
log4j.appender.kafkaAppender=org.apache.log4j.DailyRollingFileAppender
23+
log4j.appender.kafkaAppender.DatePattern='.'yyyy-MM-dd-HH
24+
log4j.appender.kafkaAppender.File=${kafka.logs.dir}/server.log
25+
log4j.appender.kafkaAppender.layout=org.apache.log4j.PatternLayout
26+
log4j.appender.kafkaAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
27+
28+
log4j.appender.stateChangeAppender=org.apache.log4j.DailyRollingFileAppender
29+
log4j.appender.stateChangeAppender.DatePattern='.'yyyy-MM-dd-HH
30+
log4j.appender.stateChangeAppender.File=${kafka.logs.dir}/state-change.log
31+
log4j.appender.stateChangeAppender.layout=org.apache.log4j.PatternLayout
32+
log4j.appender.stateChangeAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
33+
34+
log4j.appender.requestAppender=org.apache.log4j.DailyRollingFileAppender
35+
log4j.appender.requestAppender.DatePattern='.'yyyy-MM-dd-HH
36+
log4j.appender.requestAppender.File=${kafka.logs.dir}/kafka-request.log
37+
log4j.appender.requestAppender.layout=org.apache.log4j.PatternLayout
38+
log4j.appender.requestAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
39+
40+
log4j.appender.cleanerAppender=org.apache.log4j.DailyRollingFileAppender
41+
log4j.appender.cleanerAppender.DatePattern='.'yyyy-MM-dd-HH
42+
log4j.appender.cleanerAppender.File=${kafka.logs.dir}/log-cleaner.log
43+
log4j.appender.cleanerAppender.layout=org.apache.log4j.PatternLayout
44+
log4j.appender.cleanerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
45+
46+
log4j.appender.controllerAppender=org.apache.log4j.DailyRollingFileAppender
47+
log4j.appender.controllerAppender.DatePattern='.'yyyy-MM-dd-HH
48+
log4j.appender.controllerAppender.File=${kafka.logs.dir}/controller.log
49+
log4j.appender.controllerAppender.layout=org.apache.log4j.PatternLayout
50+
log4j.appender.controllerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
51+
52+
log4j.appender.authorizerAppender=org.apache.log4j.DailyRollingFileAppender
53+
log4j.appender.authorizerAppender.DatePattern='.'yyyy-MM-dd-HH
54+
log4j.appender.authorizerAppender.File=${kafka.logs.dir}/kafka-authorizer.log
55+
log4j.appender.authorizerAppender.layout=org.apache.log4j.PatternLayout
56+
log4j.appender.authorizerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
57+
58+
# Turn on all our debugging info
59+
#log4j.logger.kafka.producer.async.DefaultEventHandler=DEBUG, kafkaAppender
60+
#log4j.logger.kafka.client.ClientUtils=DEBUG, kafkaAppender
61+
#log4j.logger.kafka.perf=DEBUG, kafkaAppender
62+
#log4j.logger.kafka.perf.ProducerPerformance$ProducerThread=DEBUG, kafkaAppender
63+
#log4j.logger.org.I0Itec.zkclient.ZkClient=DEBUG
64+
log4j.logger.kafka=INFO, kafkaAppender
65+
66+
log4j.logger.kafka.network.RequestChannel$=WARN, requestAppender
67+
log4j.additivity.kafka.network.RequestChannel$=false
68+
69+
#log4j.logger.kafka.network.Processor=TRACE, requestAppender
70+
#log4j.logger.kafka.server.KafkaApis=TRACE, requestAppender
71+
#log4j.additivity.kafka.server.KafkaApis=false
72+
log4j.logger.kafka.request.logger=WARN, requestAppender
73+
log4j.additivity.kafka.request.logger=false
74+
75+
log4j.logger.kafka.controller=TRACE, controllerAppender
76+
log4j.additivity.kafka.controller=false
77+
78+
log4j.logger.kafka.log.LogCleaner=INFO, cleanerAppender
79+
log4j.additivity.kafka.log.LogCleaner=false
80+
81+
log4j.logger.state.change.logger=TRACE, stateChangeAppender
82+
log4j.additivity.state.change.logger=false
83+
84+
#Change this to debug to get the actual audit log for authorizer.
85+
log4j.logger.kafka.authorizer.logger=WARN, authorizerAppender
86+
log4j.additivity.kafka.authorizer.logger=false
87+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
log4j.rootLogger=WARN, stderr
17+
18+
log4j.appender.stderr=org.apache.log4j.ConsoleAppender
19+
log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
20+
log4j.appender.stderr.layout.ConversionPattern=[%d] %p %m (%c)%n
21+
log4j.appender.stderr.Target=System.err

0 commit comments

Comments
 (0)