This repository was archived by the owner on Dec 23, 2023. It is now read-only.
Export SpanData in batches of maximum bufferSize.#1882
Merged
bogdandrutu merged 2 commits intocensus-instrumentation:masterfrom May 7, 2019
Merged
Export SpanData in batches of maximum bufferSize.#1882bogdandrutu merged 2 commits intocensus-instrumentation:masterfrom
bogdandrutu merged 2 commits intocensus-instrumentation:masterfrom
Conversation
songy23
reviewed
May 7, 2019
|
|
||
| final List<SpanData> spanDataList = fromSpanImplToSpanData(spansCopy); | ||
| private void exportBatches(ArrayList<RecordEventsSpanImpl> spanList) { | ||
| ArrayList<SpanData> spanDataList = new ArrayList<>(bufferSize); |
Contributor
There was a problem hiding this comment.
Why not just use Lists.partition?
Contributor
There was a problem hiding this comment.
Never mind, forgot we don't want to depend on Guava here.
Contributor
Author
There was a problem hiding this comment.
Not only that, but we want to remove the reference to the RecordEventsSpanImpl asap, with Lists.partitions they use List.subList which is implemented as a wrapper on top of the original list also immutable so it is harder to remove the reference to that object.
songy23
approved these changes
May 7, 2019
Contributor
songy23
left a comment
There was a problem hiding this comment.
LGTM, please fix the nullness checker.
dinooliva
approved these changes
May 7, 2019
| } | ||
|
|
||
| final List<SpanData> spanDataList = fromSpanImplToSpanData(spansCopy); | ||
| private void exportBatches(ArrayList<RecordEventsSpanImpl> spanList) { |
Contributor
There was a problem hiding this comment.
It might be worth noting that spanList is assumed not to be shared across other threads.
Closed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.