You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ne...@apache.org on 2022/04/01 01:42:41 UTC

[pinot] branch master updated: adding a constructor override (#8454)

This is an automated email from the ASF dual-hosted git repository.

nehapawar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new d454acd  adding a constructor override (#8454)
d454acd is described below

commit d454acdd44d4bc24de1dd1bfa8668fb445518919
Author: Navina Ramesh <na...@gmail.com>
AuthorDate: Thu Mar 31 18:42:20 2022 -0700

    adding a constructor override (#8454)
    
    Co-authored-by: Navina Ramesh <na...@apache.org>
---
 .../githubevents/PullRequestMergedEventsStream.java       | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/streams/githubevents/PullRequestMergedEventsStream.java b/pinot-tools/src/main/java/org/apache/pinot/tools/streams/githubevents/PullRequestMergedEventsStream.java
index ab45f45..a1703d8 100644
--- a/pinot-tools/src/main/java/org/apache/pinot/tools/streams/githubevents/PullRequestMergedEventsStream.java
+++ b/pinot-tools/src/main/java/org/apache/pinot/tools/streams/githubevents/PullRequestMergedEventsStream.java
@@ -64,6 +64,21 @@ public class PullRequestMergedEventsStream {
 
   private StreamDataProducer _producer;
 
+  public PullRequestMergedEventsStream(File schemaFile, String topicName, String personalAccessToken,
+      StreamDataProducer producer)
+      throws Exception {
+    _service = Executors.newFixedThreadPool(2);
+    try {
+      _avroSchema = AvroUtils.getAvroSchemaFromPinotSchema(org.apache.pinot.spi.data.Schema.fromFile(schemaFile));
+    } catch (Exception e) {
+      LOGGER.error("Got exception while reading Pinot schema from file: [" + schemaFile.getName() + "]");
+      throw e;
+    }
+    _topicName = topicName;
+    _gitHubAPICaller = new GitHubAPICaller(personalAccessToken);
+    _producer = producer;
+  }
+
   public PullRequestMergedEventsStream(String schemaFilePath, String topicName, String personalAccessToken,
       StreamDataProducer producer)
       throws Exception {

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