<commit_before>#!/bin/sh
#
# Init file for Apache Kafka <%= @service_name.split(/-/)[1] and @service_name.split(/-/)[1].capitalize %>
#
<%- if @osfamily == 'Debian' -%>
### BEGIN INIT INFO
# Provides:          <%- @service_name -%>
# Required-Start:    zookeeper
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Apache Kafka is a distributed publish-subscribe messaging system
### END INIT INFO
<%- else -%>
# chkconfig: 35 85 15
# description: Apache Kafka is a distributed publish-subscribe messaging system
# pidfile: /var/run/<%= @service_name -%>.pid
<%- end -%>

NAME=<%= @service_name %>
PID_FILE="/var/run/$NAME.pid"
KAFKA_USER=kafka
<%- case @service_name
  when 'kafka' -%>
PGREP_PATTERN=kafka.Kafka

DAEMON="<%= @bin_dir %>/kafka-server-start.sh"
DAEMON_OPTS="<%= @config_dir %>/server.properties"

export KAFKA_JMX_OPTS="<%= @jmx_opts %>"
export KAFKA_LOG4J_OPTS="<%= @log4j_opts %>"
export KAFKA_HEAP_OPTS="<%= @heap_opts %>"

export KAFKA_OPTS="<%= @opts %>"
export LOG_DIR="<%= @log_dir %>"
<%- when 'kafka-consumer' -%><commit_msg>the init script now uses the service_requires_zookeeper parameter<commit_after>#!/bin/sh
#
# Init file for Apache Kafka <%= @service_name.split(/-/)[1] and @service_name.split(/-/)[1].capitalize %>
#
<%- if @osfamily == 'Debian' -%>
### BEGIN INIT INFO
# Provides:          <%- @service_name -%>
<%- if @service_requires_zookeeper -%>
# Required-Start:    zookeeper
<%- else -%>
# Required-Start:
<%- end -%>
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Apache Kafka is a distributed publish-subscribe messaging system
### END INIT INFO
<%- else -%>
# chkconfig: 35 85 15
# description: Apache Kafka is a distributed publish-subscribe messaging system
# pidfile: /var/run/<%= @service_name -%>.pid
<%- end -%>

NAME=<%= @service_name %>
PID_FILE="/var/run/$NAME.pid"
KAFKA_USER=kafka
<%- case @service_name
  when 'kafka' -%>
PGREP_PATTERN=kafka.Kafka

DAEMON="<%= @bin_dir %>/kafka-server-start.sh"
DAEMON_OPTS="<%= @config_dir %>/server.properties"

export KAFKA_JMX_OPTS="<%= @jmx_opts %>"
export KAFKA_LOG4J_OPTS="<%= @log4j_opts %>"
export KAFKA_HEAP_OPTS="<%= @heap_opts %>"

export KAFKA_OPTS="<%= @opts %>"
export LOG_DIR="<%= @log_dir %>"
<%- when 'kafka-consumer' -%>
{'fraction_non_alphanumeric': 0.189873417721519, 'fraction_numerical': 0.014345991561181435, 'mean_word_length': 4.3521444695259595, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1157834', 'n_tokens_mistral': 1005, 'n_tokens_neox': 909, 'n_words': 200}