Data loader (sampler component) - Kafka/Kinesis samplers#7566
Merged
clintropolis merged 3 commits intoapache:masterfrom May 17, 2019
dclim:kafka-kinesis-sampler-only
Merged
Data loader (sampler component) - Kafka/Kinesis samplers#7566clintropolis merged 3 commits intoapache:masterfrom dclim:kafka-kinesis-sampler-only
clintropolis merged 3 commits intoapache:masterfrom
dclim:kafka-kinesis-sampler-only
Conversation
| { | ||
| insertData(generateRecords(TOPIC)); | ||
|
|
||
| KafkaSupervisorSpec supervisorSpec = new KafkaSupervisorSpec(DATA_SCHEMA, null, new KafkaSupervisorIOConfig( |
|
|
||
| replayAll(); | ||
|
|
||
| KinesisSupervisorSpec supervisorSpec = new KinesisSupervisorSpec(DATA_SCHEMA, null, new KinesisSupervisorIOConfig( |
| private void assignAndSeek() throws InterruptedException | ||
| { | ||
| final Set<StreamPartition<PartitionIdType>> partitions = recordSupplier | ||
| .getPartitionIds(ioConfig.getStream()).stream() |
Member
There was a problem hiding this comment.
nit: .stream() should probably be on newline
| private final RecordSupplier<PartitionIdType, SequenceOffsetType> recordSupplier; | ||
|
|
||
| private Iterator<OrderedPartitionableRecord<PartitionIdType, SequenceOffsetType>> recordIterator; | ||
| private Iterator<byte[]> interRecordIterator; |
Member
There was a problem hiding this comment.
the starting bit of nextRowWithRaw might be a bit clearer if this variable was named something like recordBytesIterator or recordDataIterator?
| @Override | ||
| public SamplerResponse sample() | ||
| { | ||
| return firehoseSampler.sample(new FirehoseFactory() |
Contributor
|
Been testing and using this feature as a "user", seems to work really well. Check it out here: https://youtu.be/tAEp5BXVHYE |
clintropolis
approved these changes
May 17, 2019
Member
clintropolis
left a comment
There was a problem hiding this comment.
lgtm 👍
We really need builders for those indexing config classes, but not this PR
clintropolis
pushed a commit
to clintropolis/druid
that referenced
this pull request
May 17, 2019
* implement Kafka/Kinesis sampler * add KafkaSamplerSpecTest and KinesisSamplerSpecTest * code review changes
jihoonson
pushed a commit
to implydata/druid-public
that referenced
this pull request
Jun 25, 2019
* implement Kafka/Kinesis sampler * add KafkaSamplerSpecTest and KinesisSamplerSpecTest * code review changes
jihoonson
pushed a commit
to implydata/druid-public
that referenced
this pull request
Jun 26, 2019
* implement Kafka/Kinesis sampler * add KafkaSamplerSpecTest and KinesisSamplerSpecTest * code review changes
gianm
pushed a commit
to implydata/druid-public
that referenced
this pull request
Jul 3, 2019
* implement Kafka/Kinesis sampler * add KafkaSamplerSpecTest and KinesisSamplerSpecTest * code review changes
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implementation of the sampler component of #7502.
Depends on #7531.
Adds additional implementations to support sampling from Kafka and Kinesis.