[ 
https://issues.apache.org/jira/browse/TAJO-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14448804#comment-14448804
 ] 

ASF GitHub Bot commented on TAJO-1480:
--------------------------------------

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

    https://github.com/apache/tajo/pull/482#discussion_r27782170
  
    --- Diff: 
tajo-storage/tajo-storage-kafka/src/test/java/org/apache/tajo/storage/kafka/testUtil/EmbeddedZookeeper.java
 ---
    @@ -0,0 +1,90 @@
    +/**
    + * 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.testUtil;
    +
    +import static io.airlift.testing.FileUtils.deleteRecursively;
    +
    +import java.io.Closeable;
    +import java.io.File;
    +import java.io.IOException;
    +import java.net.InetSocketAddress;
    +import java.util.concurrent.atomic.AtomicBoolean;
    +
    +import org.apache.zookeeper.server.NIOServerCnxnFactory;
    +import org.apache.zookeeper.server.ZooKeeperServer;
    +import org.apache.zookeeper.server.persistence.FileTxnSnapLog;
    +
    +import com.google.common.io.Files;
    +
    +public class EmbeddedZookeeper implements Closeable {
    +  private final int port;
    +  private final File zkDataDir;
    +  private final ZooKeeperServer zkServer;
    +  private final NIOServerCnxnFactory cnxnFactory;
    +
    +  private final AtomicBoolean started = new AtomicBoolean();
    +  private final AtomicBoolean stopped = new AtomicBoolean();
    +
    +  public EmbeddedZookeeper() throws IOException {
    +    this(2181);
    --- End diff --
    
    If users already ran above port for running zookeeper, this might be failed 
to run. Currently, Tajo provides hbase storage manager and it already 
implemented unit test cases with zookeeper. HBaseTestClusterUtil will be 
helpful for you to use zookeeper.


> Kafka Consumer for kafka strage.
> --------------------------------
>
>                 Key: TAJO-1480
>                 URL: https://issues.apache.org/jira/browse/TAJO-1480
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: storage
>            Reporter: YeonSu Han
>            Assignee: YeonSu Han
>              Labels: kafka_storage
>
> Scanner of kafka storage needs to implement a Kafka Consumer for to fetch 
> data from kafka.
> The Kafka Consumer have methods like this,
> - getPartitions(): Get partition id list from specific topic.
> - fetch(): Fetch data from kafka.
> - getReadOffset(): Get offset from specific partition.
> - findLeader(): Find leader broker of specific partition.
> - etc..



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to