Skip to content
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

In SegmentPurger, use table config to generate the segment #5325

Merged
merged 1 commit into from May 2, 2020

Conversation

Jackie-Jiang
Copy link
Contributor

All the indexing and partition info are stored in the table config.
Without the table config, purged segment will lose the indexing and partition info, which could cause performance issue.

In the following pr, we will enforce all segment creation to provide table config and schema to guarantee the consistent behavior.

Copy link
Contributor

@snleee snleee left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for working on this!

@@ -39,7 +41,7 @@ public static MinionContext getInstance() {

private File _dataDir;
private MinionMetrics _minionMetrics;
private String _minionVersion;
private ZkHelixPropertyStore<ZNRecord> _helixPropertyStore;
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for this!

I thought of fetching table config calling controller API. This approach is much simpler :)

@snleee
Copy link
Contributor

snleee commented May 1, 2020

testConvert(org.apache.pinot.minion.executor.PurgeTaskExecutorTest)  Time elapsed: 0.034 sec  <<< FAILURE!
java.lang.NullPointerException
	at org.apache.pinot.common.metadata.ZKMetadataProvider.getTableConfig(ZKMetadataProvider.java:211)

All the indexing and partition info are stored in the table config.
Without the table config, purged segment will lose the indexing and partition info, which could cause performance issue.

In the following pr, we will enforce all segment creation to provide table config and schema to guarantee the consistent behavior.
@Jackie-Jiang
Copy link
Contributor Author

testConvert(org.apache.pinot.minion.executor.PurgeTaskExecutorTest)  Time elapsed: 0.034 sec  <<< FAILURE!
java.lang.NullPointerException
	at org.apache.pinot.common.metadata.ZKMetadataProvider.getTableConfig(ZKMetadataProvider.java:211)

Yeah, need to modify the test to plug in the property store

@codecov-io
Copy link

Codecov Report

Merging #5325 into master will decrease coverage by 9.22%.
The diff coverage is 40.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5325      +/-   ##
==========================================
- Coverage   66.07%   56.85%   -9.23%     
==========================================
  Files        1072     1072              
  Lines       54562    54552      -10     
  Branches     8139     8137       -2     
==========================================
- Hits        36052    31015    -5037     
- Misses      15865    21105    +5240     
+ Partials     2645     2432     -213     
Impacted Files Coverage Δ
...rg/apache/pinot/core/minion/RawIndexConverter.java 0.00% <0.00%> (-62.50%) ⬇️
...in/java/org/apache/pinot/minion/MinionStarter.java 0.00% <0.00%> (-86.25%) ⬇️
...inot/minion/events/DefaultMinionEventObserver.java 0.00% <ø> (-60.00%) ⬇️
...ot/minion/events/EventObserverFactoryRegistry.java 0.00% <ø> (-100.00%) ⬇️
.../executor/BaseSingleSegmentConversionExecutor.java 4.54% <0.00%> (-87.13%) ⬇️
...minion/executor/ConvertToRawIndexTaskExecutor.java 0.00% <0.00%> (-100.00%) ⬇️
...indexsegment/generator/SegmentGeneratorConfig.java 58.38% <40.00%> (-3.51%) ⬇️
...pache/pinot/minion/executor/PurgeTaskExecutor.java 69.23% <60.00%> (-0.34%) ⬇️
...org/apache/pinot/core/minion/SegmentConverter.java 79.74% <100.00%> (+1.43%) ⬆️
...va/org/apache/pinot/core/minion/SegmentPurger.java 76.92% <100.00%> (-1.97%) ⬇️
... and 328 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 997853d...4db2ecd. Read the comment docs.

@Jackie-Jiang Jackie-Jiang merged commit c87be27 into apache:master May 2, 2020
@Jackie-Jiang Jackie-Jiang deleted the purge_take_table_config branch May 2, 2020 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants