pinot-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xian...@apache.org
Subject [incubator-pinot] 03/23: Add PartitionGroupMetdataMap interface
Date Sun, 03 Jan 2021 01:22:09 GMT
This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch sharded_consumer_type_support_with_kinesis
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 1a8a80ac01836012419feaab45853b670d953afa
Author: KKcorps <kharekartik@gmail.com>
AuthorDate: Fri Dec 11 13:56:52 2020 +0530

    Add PartitionGroupMetdataMap interface
---
 .../src/main/java/org/apache/pinot/spi/stream/v2/FetchResult.java  | 7 +++++--
 .../org/apache/pinot/spi/stream/v2/PartitionGroupMetadataMap.java  | 4 ++++
 .../org/apache/pinot/spi/stream/v2/StreamConsumerFactoryV2.java    | 2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/FetchResult.java b/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/FetchResult.java
index b490835..78ae5ef 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/FetchResult.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/FetchResult.java
@@ -1,7 +1,10 @@
 package org.apache.pinot.spi.stream.v2;
 
-public interface FetchResult {
+import java.util.List;
+
+
+public interface FetchResult<T> {
   Checkpoint getLastCheckpoint();
-  byte[] getMessages();
+  List<T> getMessages();
 }
 
diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/PartitionGroupMetadataMap.java
b/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/PartitionGroupMetadataMap.java
new file mode 100644
index 0000000..3c344bc
--- /dev/null
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/PartitionGroupMetadataMap.java
@@ -0,0 +1,4 @@
+package org.apache.pinot.spi.stream.v2;
+
+public interface PartitionGroupMetadataMap {
+}
diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/StreamConsumerFactoryV2.java
b/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/StreamConsumerFactoryV2.java
index bd3017d..eb7f76e 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/StreamConsumerFactoryV2.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/stream/v2/StreamConsumerFactoryV2.java
@@ -8,7 +8,7 @@ public interface StreamConsumerFactoryV2 {
   void init(StreamConfig streamConfig);
 
   // takes the current state of partition groups (groupings of shards, the state of the consumption)
and creates the new state
-  Map<Long, PartitionGroupMetadata> getPartitionGroupsMetadata(Map<Long, PartitionGroupMetadata>
currentPartitionGroupsMetadata);
+  PartitionGroupMetadataMap getPartitionGroupsMetadata(PartitionGroupMetadataMap currentPartitionGroupsMetadata);
 
   // creates a name generator which generates segment name for a partition group
   SegmentNameGenerator getSegmentNameGenerator();


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


Mime
View raw message