You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/08/17 11:35:21 UTC
[jira] [Commented] (TAJO-1480) Kafka Consumer for kafka strage.
[ https://issues.apache.org/jira/browse/TAJO-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15424329#comment-15424329 ]
ASF GitHub Bot commented on TAJO-1480:
--------------------------------------
Github user jinossy commented on a diff in the pull request:
https://github.com/apache/tajo/pull/1041#discussion_r75105735
--- Diff: tajo-storage/tajo-storage-kafka/src/test/java/org/apache/tajo/storage/kafka/TestConstants.java ---
@@ -0,0 +1,56 @@
+/**
+ * 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 org.apache.kafka.clients.producer.Producer;
+import org.apache.kafka.clients.producer.ProducerRecord;
+
+import java.util.Collection;
+
+public class TestConstants {
+ private static final String[] TEST_DATA = { "1|abc|0.2", "2|def|0.4", "3|ghi|0.6", "4|jkl|0.8", "5|mno|1.0" };
+
+ static final String TOPIC_NAME = "test_topic";
+ static final String TEST_JSON_DATA = "{\"col1\":1, \"col2\":\"abc\", \"col3\":0.2}";
+ static final int DEFAULT_TEST_PARTITION_NUM = 3;
+
+ static void sendTestData(Producer<String, String> producer, String topic) throws Exception {
--- End diff --
This class name is constants but you defined method in the class.
> 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: Byunghwa Yun
> 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.
> - poll(): Fetch data from kafka.
> - getEarliestOffset(): Get earliest offset from specific partition.
> - getLatestOffset(): Get latest offset from specific partition.
> - etc..
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)