Github user blrunner commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/482#discussion_r27782794
  
    --- Diff: 
tajo-storage/tajo-storage-kafka/src/main/java/org/apache/tajo/storage/kafka/SimpleConsumerManager.java
 ---
    @@ -0,0 +1,314 @@
    +/**
    + * 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.
    + */
    +
    +package org.apache.tajo.storage.kafka;
    +
    +import java.io.IOException;
    +import java.net.InetSocketAddress;
    +import java.util.ArrayList;
    +import java.util.HashMap;
    +import java.util.HashSet;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.Random;
    +import java.util.Set;
    +
    +import kafka.api.FetchRequest;
    +import kafka.api.FetchRequestBuilder;
    +import kafka.api.PartitionOffsetRequestInfo;
    +import kafka.cluster.Broker;
    +import kafka.common.ErrorMapping;
    +import kafka.common.TopicAndPartition;
    +import kafka.javaapi.FetchResponse;
    +import kafka.javaapi.OffsetResponse;
    +import kafka.javaapi.PartitionMetadata;
    +import kafka.javaapi.TopicMetadata;
    +import kafka.javaapi.TopicMetadataRequest;
    +import kafka.javaapi.consumer.SimpleConsumer;
    +import kafka.message.MessageAndOffset;
    +
    +import org.apache.commons.collections.IteratorUtils;
    +import org.apache.commons.logging.Log;
    +import org.apache.commons.logging.LogFactory;
    +import org.apache.tajo.util.NetUtils;
    +
    +// SimpleConsumerManager is kafka client for KafkaScanner.
    +// It's one per partition. Each partition instantiate this class.
    +public class SimpleConsumerManager {
    +  private static final Log LOG = 
LogFactory.getLog(SimpleConsumerManager.class);
    +  // TODO: configurable setting.
    +  static final int CONSUMER_TIMEOUT = 30000;
    +  static final int CONSUMER_BUFFER_SIZE = 64 * 1024;
    +  static final int CONSUMER_FETCH_SIZE = 300 * 1024;
    +  static final int FETCH_TRY_NUM = 3;
    --- End diff --
    
    How about separate configurable setting to interface? For example, the name 
of interface will be KafkaProperties.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to