-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Remove support for High level consumers in Apache Pinot #11017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a5dc303
Do not support HLC in pinot
navina cab5167
disallow hlc table creation
navina 4dd0e91
Deprecating StreamLevelConsumer in pinot-spi
navina beaabe5
Removing since from deprecated annotation as jdk8 doesn't support it
navina 8ee011e
Fix unit tests - TableConfigUtilsTest
navina 77d397e
Fix failing unit test - realtime table without streamconfigs map
navina ea562ad
Fix failing tests in pinot-broker
navina 3e2ff75
linter
navina cb2ed8c
Deleting integration tests related to HLC
navina 50c582d
allow consumer type string "simple" . Future TODO: Remove support for…
navina 863aac3
Use streamType as prefix to parse consumer type from config map
navina bb5ba14
Addressing PR feedback. Removing FakeStreamConsumerFactory
navina 5446e00
Making the check as a util
navina 18d18b2
bring back FakeStreamConsumerFactory so that HelixBrokerTest can pass
navina 5cb5bf1
moving consumer type validation into StreamConfig. Create streamconfi…
navina 19ddf8a
fixing unit tests
navina 22d24ae
lint
navina 9c2d34c
Fix tablecnfig test
navina 458ea7e
fix SchemaUtilsTest
navina e3eb8ce
fix linter
navina 3078c8a
Remove since from @Deprecated annotations
navina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
pinot-broker/src/test/java/org/apache/pinot/broker/broker/FakeStreamConsumerFactory.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| /** | ||
| * 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.pinot.broker.broker; | ||
|
|
||
| import java.io.IOException; | ||
| import java.util.Collections; | ||
| import java.util.List; | ||
| import java.util.Set; | ||
| import java.util.concurrent.TimeoutException; | ||
| import org.apache.pinot.spi.stream.LongMsgOffset; | ||
| import org.apache.pinot.spi.stream.MessageBatch; | ||
| import org.apache.pinot.spi.stream.OffsetCriteria; | ||
| import org.apache.pinot.spi.stream.PartitionGroupConsumptionStatus; | ||
| import org.apache.pinot.spi.stream.PartitionGroupMetadata; | ||
| import org.apache.pinot.spi.stream.PartitionLevelConsumer; | ||
| import org.apache.pinot.spi.stream.StreamConfig; | ||
| import org.apache.pinot.spi.stream.StreamConsumerFactory; | ||
| import org.apache.pinot.spi.stream.StreamLevelConsumer; | ||
| import org.apache.pinot.spi.stream.StreamMetadataProvider; | ||
| import org.apache.pinot.spi.stream.StreamPartitionMsgOffset; | ||
|
|
||
|
|
||
| public class FakeStreamConsumerFactory extends StreamConsumerFactory { | ||
| @Override | ||
| public PartitionLevelConsumer createPartitionLevelConsumer(String clientId, int partition) { | ||
| return new FakePartitionLevelConsumer(); | ||
| } | ||
|
|
||
| @Override | ||
| public StreamLevelConsumer createStreamLevelConsumer(String clientId, String tableName, Set<String> fieldsToRead, | ||
| String groupId) { | ||
| return null; | ||
| } | ||
|
|
||
| @Override | ||
| public StreamMetadataProvider createPartitionMetadataProvider(String clientId, int partition) { | ||
| return new FakesStreamMetadataProvider(); | ||
| } | ||
|
|
||
| @Override | ||
| public StreamMetadataProvider createStreamMetadataProvider(String clientId) { | ||
| return new FakesStreamMetadataProvider(); | ||
| } | ||
|
|
||
| public class FakePartitionLevelConsumer implements PartitionLevelConsumer { | ||
|
|
||
| @Override | ||
| public MessageBatch fetchMessages(long startOffset, long endOffset, int timeoutMillis) | ||
| throws TimeoutException { | ||
| return null; | ||
| } | ||
|
|
||
| @Override | ||
| public void close() | ||
| throws IOException { | ||
| } | ||
| } | ||
|
|
||
| public class FakesStreamMetadataProvider implements StreamMetadataProvider { | ||
|
|
||
| @Override | ||
| public List<PartitionGroupMetadata> computePartitionGroupMetadata(String clientId, StreamConfig streamConfig, | ||
| List<PartitionGroupConsumptionStatus> partitionGroupConsumptionStatuses, int timeoutMillis) | ||
| throws IOException, TimeoutException { | ||
| return Collections.singletonList(new PartitionGroupMetadata(0, new LongMsgOffset(0))); | ||
| } | ||
|
|
||
| @Override | ||
| public int fetchPartitionCount(long timeoutMillis) { | ||
| return 1; | ||
| } | ||
|
|
||
| @Override | ||
| public StreamPartitionMsgOffset fetchStreamPartitionOffset(OffsetCriteria offsetCriteria, long timeoutMillis) | ||
| throws TimeoutException { | ||
| return new LongMsgOffset(0); | ||
| } | ||
|
|
||
| @Override | ||
| public void close() | ||
| throws IOException { | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.