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

Adding custom metadata props into both segment metadata properties file and zk metadata record #6299

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented Nov 30, 2020

Description

Allow adding custom configs during the segment creation phase, and made those available in both segment metadata property file and zookeeper znRecord.

Note that those configs will have custom. prefix in metadata.properties file.

Sample output:
metadata.property file:
image

zk metadata:
image

@codecov-io
Copy link

codecov-io commented Nov 30, 2020

Codecov Report

Merging #6299 (1e8393f) into master (1beaab5) will decrease coverage by 20.65%.
The diff coverage is 51.88%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #6299       +/-   ##
===========================================
- Coverage   66.44%   45.79%   -20.66%     
===========================================
  Files        1075     1252      +177     
  Lines       54773    61233     +6460     
  Branches     8168     8866      +698     
===========================================
- Hits        36396    28043     -8353     
- Misses      15700    30897    +15197     
+ Partials     2677     2293      -384     
Flag Coverage Δ
integration 45.79% <51.88%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ot/broker/broker/AllowAllAccessControlFactory.java 100.00% <ø> (ø)
.../helix/BrokerUserDefinedMessageHandlerFactory.java 52.83% <0.00%> (-13.84%) ⬇️
...org/apache/pinot/broker/queryquota/HitCounter.java 0.00% <0.00%> (-100.00%) ⬇️
...che/pinot/broker/queryquota/MaxHitRateTracker.java 0.00% <0.00%> (ø)
...ache/pinot/broker/queryquota/QueryQuotaEntity.java 0.00% <0.00%> (-50.00%) ⬇️
...ker/routing/instanceselector/InstanceSelector.java 100.00% <ø> (ø)
...ceselector/StrictReplicaGroupInstanceSelector.java 0.00% <0.00%> (ø)
.../main/java/org/apache/pinot/client/Connection.java 22.22% <0.00%> (-26.62%) ⬇️
...not/common/assignment/InstancePartitionsUtils.java 64.28% <ø> (-8.89%) ⬇️
.../apache/pinot/common/exception/QueryException.java 90.27% <ø> (+5.55%) ⬆️
... and 1248 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 318c107...1e8393f. Read the comment docs.

@xiangfu0 xiangfu0 force-pushed the all_custom_metadata_props_in_segment_creation branch 3 times, most recently from a05ccdd to 2b0df65 Compare November 30, 2020 09:12
@xiangfu0 xiangfu0 force-pushed the all_custom_metadata_props_in_segment_creation branch from 2b0df65 to 1e8393f Compare November 30, 2020 22:07
Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

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

LGTM

for (String key : _customMap.keySet()) {
customConfigs.put(key, _customMap.get(key));
}
segmentMetadata.set("custom", customConfigs);
Copy link
Contributor

Choose a reason for hiding this comment

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

Use constant

Copy link
Contributor Author

Choose a reason for hiding this comment

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

here I kind of following the convention that all the previous field names are in strings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And this is only used by the rest api

@xiangfu0 xiangfu0 merged commit d6862a2 into master Dec 1, 2020
@xiangfu0 xiangfu0 deleted the all_custom_metadata_props_in_segment_creation branch December 1, 2020 03:56
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.

3 participants