You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "wgtmac (via GitHub)" <gi...@apache.org> on 2024/01/02 05:36:10 UTC

Re: [PR] PARQUET-2413: Support configurable extraMetadata in ParquetWriter [parquet-mr]

wgtmac commented on code in PR #1241:
URL: https://github.com/apache/parquet-mr/pull/1241#discussion_r1439164383


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetWriter.java:
##########
@@ -403,15 +405,29 @@ public ParquetWriter(Path file, Configuration conf, WriteSupport<T> writeSupport
 
     this.codecFactory = codecFactory;
     CompressionCodecFactory.BytesInputCompressor compressor = codecFactory.getCompressor(compressionCodecName);
+
+    final String extraMetadataConfPrefix = ParquetOutputFormat.EXTRA_WRITE_METADATA + ".";
+    final Map<String, String> extraMetadata = new HashMap<>(writeContext.getExtraMetaData());
+
+    conf.iterator().forEachRemaining(entry -> {

Review Comment:
   TBH, I don't think it is a good idea to add an overload of constructor (as we already have a bunch of constructors). What about adding a new method to ParquetWriter to set extra metadata? I have done similar things to parquet cpp: https://github.com/apache/arrow/commit/3bd57e35cc949bce6a04d7fbfed30c6db755b023



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org