// Path: src/main/java/kafka/common/Config.java
// public abstract class Config {
//     public  static  void validateChars(String prop, String value) {
//         String legalChars = "[a-zA-Z0-9\\._\\-]";
//         Pattern rgx = Pattern.compile(legalChars + "*");
// 
//         Matcher matcher = rgx.matcher(value);
//         if (!matcher.find()) {
//             throw new InvalidConfigException(prop + " " + value + " is illegal, contains a character other than ASCII alphanumerics, '.', '_' and '-'");
//         }
// 
//         String t = matcher.group();
// 
//         if (!t.equals(value))
//             throw new InvalidConfigException(prop + " " + value + " is illegal, contains a character other than ASCII alphanumerics, '.', '_' and '-'");
//     }
// }
// 
// Path: src/main/java/kafka/message/NoCompressionCodec.java
// public class NoCompressionCodec implements CompressionCodec {
//     public static final CompressionCodec instance = new NoCompressionCodec();
// 
//     @Override
//     public int codec() {
//         return 0;
//     }
// 
//     @Override
//     public String name() {
//         return "none";
//     }
// }


import kafka.common.Config;
import kafka.common.InvalidConfigException;
import kafka.message.CompressionCodec;
import kafka.message.CompressionCodecs;
import kafka.message.NoCompressionCodec;
import kafka.producer.async.AsyncProducerConfig;
import kafka.utils.Utils;
import kafka.utils.VerifiableProperties;
import java.util.List;
import java.util.Properties;
    public String partitionerClass;
    public String producerType;
    public CompressionCodec compressionCodec;
    public List<String> compressedTopics;
    public int messageSendMaxRetries;
    public int retryBackoffMs;
    public int topicMetadataRefreshIntervalMs;

    private void init() {
        /** This is for bootstrapping and the producer will only use it for getting metadata
         * (topics, partitions and replicas). The socket connections for sending the actual data
         * will be established based on the broker information returned in the metadata. The
         * format is host1:port1,host2:port2, and the list can be a subset of brokers or
         * a VIP pointing to a subset of brokers.
         */
        brokerList = props.getString("metadata.broker.list");

        /** the partitioner class for partitioning events amongst sub-topics */
        partitionerClass = props.getString("partitioner.class", "kafka.producer.DefaultPartitioner");

        /** this parameter specifies whether the messages are sent asynchronously *
         * or not. Valid values are - async for asynchronous send                 *
         *                            sync for synchronous send                   */
        producerType = props.getString("producer.type", "sync");

        /**
         * This parameter allows you to specify the compression codec for all data generated *
         * by this producer. The default is NoCompressionCodec
         */
        {
// Path: src/main/java/kafka/common/Config.java
// public abstract class Config {
//     public  static  void validateChars(String prop, String value) {
//         String legalChars = "[a-zA-Z0-9\\._\\-]";
//         Pattern rgx = Pattern.compile(legalChars + "*");
// 
//         Matcher matcher = rgx.matcher(value);
//         if (!matcher.find()) {
//             throw new InvalidConfigException(prop + " " + value + " is illegal, contains a character other than ASCII alphanumerics, '.', '_' and '-'");
//         }
// 
//         String t = matcher.group();
// 
//         if (!t.equals(value))
//             throw new InvalidConfigException(prop + " " + value + " is illegal, contains a character other than ASCII alphanumerics, '.', '_' and '-'");
//     }
// }
// 
// Path: src/main/java/kafka/message/NoCompressionCodec.java
// public class NoCompressionCodec implements CompressionCodec {
//     public static final CompressionCodec instance = new NoCompressionCodec();
// 
//     @Override
//     public int codec() {
//         return 0;
//     }
// 
//     @Override
//     public String name() {
//         return "none";
//     }
// }


// Path: src/main/java/kafka/producer/ProducerConfig.java
import kafka.common.Config;
import kafka.common.InvalidConfigException;
import kafka.message.CompressionCodec;
import kafka.message.CompressionCodecs;
import kafka.message.NoCompressionCodec;
import kafka.producer.async.AsyncProducerConfig;
import kafka.utils.Utils;
import kafka.utils.VerifiableProperties;
import java.util.List;
import java.util.Properties;

    public String partitionerClass;
    public String producerType;
    public CompressionCodec compressionCodec;
    public List<String> compressedTopics;
    public int messageSendMaxRetries;
    public int retryBackoffMs;
    public int topicMetadataRefreshIntervalMs;

    private void init() {
        /** This is for bootstrapping and the producer will only use it for getting metadata
         * (topics, partitions and replicas). The socket connections for sending the actual data
         * will be established based on the broker information returned in the metadata. The
         * format is host1:port1,host2:port2, and the list can be a subset of brokers or
         * a VIP pointing to a subset of brokers.
         */
        brokerList = props.getString("metadata.broker.list");

        /** the partitioner class for partitioning events amongst sub-topics */
        partitionerClass = props.getString("partitioner.class", "kafka.producer.DefaultPartitioner");

        /** this parameter specifies whether the messages are sent asynchronously *
         * or not. Valid values are - async for asynchronous send                 *
         *                            sync for synchronous send                   */
        producerType = props.getString("producer.type", "sync");

        /**
         * This parameter allows you to specify the compression codec for all data generated *
         * by this producer. The default is NoCompressionCodec
         */
        {
            String prop = props.getString("compression.codec", NoCompressionCodec.instance.name());