jackjlli commented on a change in pull request #5071: Support no
global-dictionary columns in data anonymizer
URL: https://github.com/apache/incubator-pinot/pull/5071#discussion_r379705673
##########
File path:
pinot-tools/src/main/java/org/apache/pinot/tools/anonymizer/PinotDataAndQueryAnonymizer.java
##########
@@ -287,6 +290,20 @@ public void buildGlobalDictionaries() throws Exception {
LOGGER.info("Finished building global dictionaries. Time taken: {}secs",
_timeToBuildDictionaries.elapsed(TimeUnit.SECONDS));
}
+ private void getSchemaFromFirstSegment(String segmentDirectory) throws
Exception {
+ LOGGER.info("Reading metadata from segment: " + segmentDirectory);
+ File segmentIndexDir = new File(segmentDirectory);
+ SegmentMetadataImpl segmentMetadata = new
SegmentMetadataImpl(segmentIndexDir);
+ if (_pinotSchema == null) {
+ // only do this for first segment
+ _pinotSchema = segmentMetadata.getSchema();
+ anonymizeColumnNames(_pinotSchema);
+ _avroSchema = getAvroSchemaFromPinotSchema(_pinotSchema);
+ LOGGER.info("Pinot schema: " + _pinotSchema.toPrettyJsonString());
Review comment:
It'd be good not just print the schemas for this particular edge case but
for all the cases.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]