You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/04/15 21:48:09 UTC
[GitHub] [pinot] KKcorps opened a new pull request, #8554: Ensure all records are pushed in Pulsar Consumer Test
KKcorps opened a new pull request, #8554:
URL: https://github.com/apache/pinot/pull/8554
Also, use TestContainers instead of PulsarStandalone Java process which starts zookeeper on CLI.
Test containers provide more functionality with respect to port mappings and pulsar versions.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] xiangfu0 commented on a diff in pull request #8554: Ensure all records are pushed in Pulsar Consumer Test
Posted by GitBox <gi...@apache.org>.
xiangfu0 commented on code in PR #8554:
URL: https://github.com/apache/pinot/pull/8554#discussion_r851847552
##########
pinot-plugins/pinot-stream-ingestion/pinot-pulsar/src/test/java/org/apache/pinot/plugin/stream/pulsar/PulsarConsumerTest.java:
##########
@@ -273,16 +336,35 @@ public void testPartitionLevelConsumerBatchMessages()
}
}
- public MessageId getMessageIdForPartitionAndIndex(int partitionNum, int index) {
+ private MessageId getMessageIdForPartitionAndIndex(int partitionNum, int index) {
MessageId startMessageIdRaw = _partitionToFirstMessageIdMap.get(partitionNum);
MessageIdImpl startMessageId = MessageIdImpl.convertToMessageIdImpl(startMessageIdRaw);
return DefaultImplementation.newMessageId(startMessageId.getLedgerId(), index, partitionNum);
}
- public MessageId getBatchMessageIdForPartitionAndIndex(int partitionNum, int index) {
+ private MessageId getBatchMessageIdForPartitionAndIndex(int partitionNum, int index) {
MessageId startMessageIdRaw = _partitionToFirstMessageIdMapBatch.get(partitionNum);
BatchMessageIdImpl startMessageId = (BatchMessageIdImpl) MessageIdImpl.convertToMessageIdImpl(startMessageIdRaw);
return new BatchMessageIdImpl(startMessageId.getLedgerId(), index / BATCH_SIZE, partitionNum, index % BATCH_SIZE,
startMessageId.getBatchSize(), startMessageId.getAcker());
}
+
+ private void waitForCondition(Function<Void, Boolean> condition, long checkIntervalMs, long timeoutMs,
Review Comment:
remove 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.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] xiangfu0 merged pull request #8554: Ensure all records are pushed in Pulsar Consumer Test
Posted by GitBox <gi...@apache.org>.
xiangfu0 merged PR #8554:
URL: https://github.com/apache/pinot/pull/8554
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] codecov-commenter commented on pull request #8554: Ensure all records are pushed in Pulsar Consumer Test
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #8554:
URL: https://github.com/apache/pinot/pull/8554#issuecomment-1100450383
# [Codecov](https://codecov.io/gh/apache/pinot/pull/8554?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#8554](https://codecov.io/gh/apache/pinot/pull/8554?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (eba3dac) into [master](https://codecov.io/gh/apache/pinot/commit/05a7f28b7316a35b171637c3be836345e4ebbe74?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (05a7f28) will **decrease** coverage by `41.51%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #8554 +/- ##
=============================================
- Coverage 70.77% 29.25% -41.52%
=============================================
Files 1681 1669 -12
Lines 87957 87603 -354
Branches 13320 13282 -38
=============================================
- Hits 62252 25630 -36622
- Misses 21354 59602 +38248
+ Partials 4351 2371 -1980
```
| Flag | Coverage Δ | |
|---|---|---|
| integration1 | `27.06% <ø> (-0.15%)` | :arrow_down: |
| integration2 | `25.80% <ø> (-0.10%)` | :arrow_down: |
| unittests1 | `?` | |
| unittests2 | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/pinot/pull/8554?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../java/org/apache/pinot/spi/utils/BooleanUtils.java](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdXRpbHMvQm9vbGVhblV0aWxzLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...java/org/apache/pinot/spi/trace/BaseRecording.java](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdHJhY2UvQmFzZVJlY29yZGluZy5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...java/org/apache/pinot/spi/trace/NoOpRecording.java](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdHJhY2UvTm9PcFJlY29yZGluZy5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...ava/org/apache/pinot/spi/config/table/FSTType.java](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvY29uZmlnL3RhYmxlL0ZTVFR5cGUuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...ava/org/apache/pinot/spi/data/MetricFieldSpec.java](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvZGF0YS9NZXRyaWNGaWVsZFNwZWMuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...va/org/apache/pinot/spi/utils/BigDecimalUtils.java](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdXRpbHMvQmlnRGVjaW1hbFV0aWxzLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...java/org/apache/pinot/common/tier/TierFactory.java](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vdGllci9UaWVyRmFjdG9yeS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...a/org/apache/pinot/spi/config/table/TableType.java](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvY29uZmlnL3RhYmxlL1RhYmxlVHlwZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/pinot/spi/data/DimensionFieldSpec.java](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvZGF0YS9EaW1lbnNpb25GaWVsZFNwZWMuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../org/apache/pinot/spi/data/readers/FileFormat.java](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvZGF0YS9yZWFkZXJzL0ZpbGVGb3JtYXQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [1166 more](https://codecov.io/gh/apache/pinot/pull/8554/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/pinot/pull/8554?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/pinot/pull/8554?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [05a7f28...eba3dac](https://codecov.io/gh/apache/pinot/pull/8554?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] xiangfu0 commented on a diff in pull request #8554: Ensure all records are pushed in Pulsar Consumer Test
Posted by GitBox <gi...@apache.org>.
xiangfu0 commented on code in PR #8554:
URL: https://github.com/apache/pinot/pull/8554#discussion_r851847264
##########
pinot-plugins/pinot-stream-ingestion/pinot-pulsar/src/test/java/org/apache/pinot/plugin/stream/pulsar/PulsarConsumerTest.java:
##########
@@ -57,45 +68,90 @@ public class PulsarConsumerTest {
public static final int NUM_PARTITION = 1;
public static final int NUM_RECORDS_PER_PARTITION = 1000;
public static final int BATCH_SIZE = 10;
+ public static final int CONSUMER_FETCH_TIMEOUT_MILLIS = (int) Duration.ofMinutes(5).toMillis();
private PulsarClient _pulsarClient;
- private PulsarStandaloneCluster _pulsarStandaloneCluster;
+ private PulsarContainer _pulsar = null;
private HashMap<Integer, MessageId> _partitionToFirstMessageIdMap = new HashMap<>();
private HashMap<Integer, MessageId> _partitionToFirstMessageIdMapBatch = new HashMap<>();
@BeforeClass
public void setUp()
throws Exception {
try {
- _pulsarStandaloneCluster = new PulsarStandaloneCluster();
+ _pulsar = new PulsarContainer(PULSAR_IMAGE).withStartupTimeout(Duration.ofMinutes(5));
+ _pulsar.start();
- _pulsarStandaloneCluster.start();
+ // Waiting for namespace to be created.
+ // There should be a better approach.
+ Thread.sleep(20 * 1000L);
- PulsarAdmin admin =
- PulsarAdmin.builder().serviceHttpUrl("http://localhost:" + _pulsarStandaloneCluster.getAdminPort()).build();
+ PulsarAdmin admin = PulsarAdmin.builder().serviceHttpUrl(_pulsar.getHttpServiceUrl()).build();
- String bootstrapServer = "pulsar://localhost:" + _pulsarStandaloneCluster.getBrokerPort();
+ String bootstrapServer = _pulsar.getPulsarBrokerUrl();
_pulsarClient = PulsarClient.builder().serviceUrl(bootstrapServer).build();
- admin.topics().createPartitionedTopic(TEST_TOPIC, NUM_PARTITION);
- admin.topics().createPartitionedTopic(TEST_TOPIC_BATCH, NUM_PARTITION);
+ createTopics(admin);
publishRecords();
publishRecordsBatch();
+
+ waitForMessagesToPublish(admin, TEST_TOPIC);
+ waitForMessagesToPublish(admin, TEST_TOPIC_BATCH);
+
+ admin.close();
} catch (Exception e) {
- if (_pulsarStandaloneCluster != null) {
- _pulsarStandaloneCluster.stop();
+ if (_pulsar != null) {
+ _pulsar.stop();
+ _pulsar = null;
}
throw new RuntimeException("Failed to setUp test environment", e);
}
}
+ private void createTopics(PulsarAdmin admin)
+ throws PulsarAdminException {
+ InactiveTopicPolicies inactiveTopicPolicies = new InactiveTopicPolicies();
+ inactiveTopicPolicies.setDeleteWhileInactive(false);
+ admin.namespaces().setInactiveTopicPolicies("public/default", inactiveTopicPolicies);
+
+ admin.topics().createPartitionedTopic(TEST_TOPIC, NUM_PARTITION);
+ admin.topics().createPartitionedTopic(TEST_TOPIC_BATCH, NUM_PARTITION);
+ }
+
+ private void waitForMessagesToPublish(PulsarAdmin admin, String topicName) {
+ waitForCondition(new Function<Void, Boolean>() {
Review Comment:
We already have `TestUtils.waitForCondition`?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] xiangfu0 commented on pull request #8554: Ensure all records are pushed in Pulsar Consumer Test
Posted by GitBox <gi...@apache.org>.
xiangfu0 commented on PR #8554:
URL: https://github.com/apache/pinot/pull/8554#issuecomment-1101088927
Just realized that plugin has no pinot-common dependencies. I think it's fine.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org