Skip to content

MINOR: remove old procesor API MockInternalProcessorContext#18103

Merged
mjsax merged 1 commit intoapache:trunkfrom
mjsax:minor-refactor-move-off-old-internal-mockcontext
Dec 11, 2024
Merged

MINOR: remove old procesor API MockInternalProcessorContext#18103
mjsax merged 1 commit intoapache:trunkfrom
mjsax:minor-refactor-move-off-old-internal-mockcontext

Conversation

@mjsax
Copy link
Copy Markdown
Member

@mjsax mjsax commented Dec 9, 2024

No description provided.

@mjsax mjsax added the streams label Dec 9, 2024
@github-actions github-actions Bot added the tests Test fixes (including flaky tests) label Dec 9, 2024
buffer.put(streamTime, new Record<>(key, new Change<>(value, null), 0L), recordContext);
}

@SuppressWarnings("resource")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side cleanup

@ParameterizedTest
@MethodSource("stores")
public void shouldRecordCorrectBlockCacheCapacity(final RocksDBStore store, final StateStoreContext ctx) {
withStore(store, ctx, () ->
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side cleanup

try (final Cache blockCache = tableFormatConfig.blockCache()) {
final long usage = blockCache.getUsage();
assertMetric(ctx, STATE_STORE_LEVEL_GROUP, RocksDBMetrics.USAGE_OF_BLOCK_CACHE, BigInteger.valueOf(usage));
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side cleanup

try (final Cache blockCache = tableFormatConfig.blockCache()) {
final long usage = blockCache.getPinnedUsage();
assertMetric(ctx, STATE_STORE_LEVEL_GROUP, RocksDBMetrics.PINNED_USAGE_OF_BLOCK_CACHE, BigInteger.valueOf(usage));
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side cleanup

});
}

@SuppressWarnings("resource")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side cleanup


private ProcessorNode currentNode;
private ProcessorNode<?, ?, ?, ?> currentNode;
private RecordCollector recordCollector;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add missing recordCollector "feature -- the old MockInternalProcessorContext that we remove with this PR had this, and the test we rewrite use this feature

private ProcessorNode currentNode;
private ProcessorNode<?, ?, ?, ?> currentNode;
private RecordCollector recordCollector;
private final Map<String, StateRestoreCallback> restoreCallbacks = new LinkedHashMap<>();
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same


@Override
public void setCurrentNode(final ProcessorNode currentNode) {
public void setCurrentNode(final ProcessorNode<?, ?, ?, ?> currentNode) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side cleanup

Copy link
Copy Markdown
Member

@bbejeck bbejeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mjsax mjsax merged commit 990c8c7 into apache:trunk Dec 11, 2024
@mjsax mjsax deleted the minor-refactor-move-off-old-internal-mockcontext branch December 11, 2024 23:09
peterxcli pushed a commit to peterxcli/kafka that referenced this pull request Dec 18, 2024
tedyu pushed a commit to tedyu/kafka that referenced this pull request Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants