jtao15 commented on a change in pull request #6419:
URL: https://github.com/apache/incubator-pinot/pull/6419#discussion_r556375473



##########
File path: 
pinot-integration-tests/src/test/java/org/apache/pinot/compat/tests/StreamOp.java
##########
@@ -85,4 +116,118 @@ boolean runOp() {
   public void setTableConfigFileNames(List<String> tableConfigFileNames) {
     _tableConfigFileNames = tableConfigFileNames;
   }
+
+  public String getRecordReaderConfigFileName() {
+    return _recordReaderConfigFileName;
+  }
+
+  public void setRecordReaderConfigFileName(String recordReaderConfigFileName) 
{
+    _recordReaderConfigFileName = recordReaderConfigFileName;
+  }
+
+  @Override
+  boolean runOp() {
+    try {
+      File csvFile = new File(_inputDataFileName);
+      Map<String, String> streamConfigMap = JsonUtils.fileToObject(new 
File(_streamConfigFileName), HashMap.class);
+      final Map<String, Object> config = new HashMap<>();
+      config.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:" + 
ClusterDescriptor.KAFKA_PORT);
+      config.put(AdminClientConfig.CLIENT_ID_CONFIG, "Kafka2AdminClient-" + 
UUID.randomUUID().toString());
+      config.put(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, 15000);
+      AdminClient adminClient = KafkaAdminClient.create(config);
+
+      // create kafka topic
+      String topicName = streamConfigMap.get("stream.kafka.topic.name");
+      int partitions = 
Integer.parseInt(streamConfigMap.get("stream.kafka.numPartitions"));
+      String partitionColumn = 
streamConfigMap.get("stream.kafka.partitionColumn");
+      NewTopic newTopic = new NewTopic(topicName, partitions, (short) 1);

Review comment:
       Sure, let me update this.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to