Re: [PR] PARQUET-2385: Allow user to specify CodecFactory for ParquetWriter [parquet-mr]

2023-12-03 Thread via GitHub


wgtmac merged PR #1203:
URL: https://github.com/apache/parquet-mr/pull/1203


-- 
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: dev-unsubscr...@parquet.apache.org

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



Re: [PR] PARQUET-2385: Allow user to specify CodecFactory for ParquetWriter [parquet-mr]

2023-11-30 Thread via GitHub


amousavigourabi commented on PR #1203:
URL: https://github.com/apache/parquet-mr/pull/1203#issuecomment-183334

   > @amousavigourabi It seems a rebase is required.
   
   @wgtmac Done, thanks for the heads up


-- 
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: dev-unsubscr...@parquet.apache.org

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



Re: [PR] PARQUET-2385: Allow user to specify CodecFactory for ParquetWriter [parquet-mr]

2023-11-30 Thread via GitHub


wgtmac commented on PR #1203:
URL: https://github.com/apache/parquet-mr/pull/1203#issuecomment-1833368029

   @amousavigourabi It seems a rebase is required.


-- 
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: dev-unsubscr...@parquet.apache.org

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



Re: [PR] PARQUET-2385: Allow user to specify CodecFactory for ParquetWriter [parquet-mr]

2023-11-27 Thread via GitHub


amousavigourabi commented on PR #1203:
URL: https://github.com/apache/parquet-mr/pull/1203#issuecomment-1828048073

   > > @wgtmac , after the comments on the code style I had a quick look 
through the repository and found that indentations and the such differ quite 
drastically between (and even within) files. ParquetWriter has indents of four 
spaces for the constructor arguments, where ParquetReader has them at 14 
spaces. Would you feel anything for a more extensive `.editorconfig` and 
easy-to-use linter such as spotless?
   > 
   > Yes, I think that would be good to make the style consistent across all 
files automatically.
   
   I'll get started on expanding the `.editorconfig` for at least IntelliJ and 
setting up a compatible Spotless configuration then.


-- 
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: dev-unsubscr...@parquet.apache.org

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



Re: [PR] PARQUET-2385: Allow user to specify CodecFactory for ParquetWriter [parquet-mr]

2023-11-27 Thread via GitHub


wgtmac commented on PR #1203:
URL: https://github.com/apache/parquet-mr/pull/1203#issuecomment-1828031389

   cc @Fokko 


-- 
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: dev-unsubscr...@parquet.apache.org

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



Re: [PR] PARQUET-2385: Allow user to specify CodecFactory for ParquetWriter [parquet-mr]

2023-11-27 Thread via GitHub


wgtmac commented on PR #1203:
URL: https://github.com/apache/parquet-mr/pull/1203#issuecomment-1828030327

   > @wgtmac , after the comments on the code style I had a quick look through 
the repository and found that indentations and the such differ quite 
drastically between (and even within) files. ParquetWriter has indents of four 
spaces for the constructor arguments, where ParquetReader has them at 14 
spaces. Would you feel anything for a more extensive `.editorconfig` and 
easy-to-use linter such as spotless?
   
   Yes, I think that would be good to make the style consistent across all 
files automatically.


-- 
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: dev-unsubscr...@parquet.apache.org

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



Re: [PR] PARQUET-2385: Allow user to specify CodecFactory for ParquetWriter [parquet-mr]

2023-11-27 Thread via GitHub


amousavigourabi commented on PR #1203:
URL: https://github.com/apache/parquet-mr/pull/1203#issuecomment-1827942202

   @wgtmac , after the comments on the code style I had a quick look through 
the repository and found that indentations and the such differ quite 
drastically between (and even within) files. ParquetWriter has indents of four 
spaces for the constructor arguments, where ParquetReader has them at 14 
spaces. Would you feel anything for a more extensive `.editorconfig` and 
easy-to-use linter such as spotless?


-- 
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: dev-unsubscr...@parquet.apache.org

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



Re: [PR] PARQUET-2385: Allow user to specify CodecFactory for ParquetWriter [parquet-mr]

2023-11-26 Thread via GitHub


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


##
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetWriter.java:
##
@@ -303,6 +303,32 @@ public ParquetWriter(Path file, Configuration conf, 
WriteSupport writeSupport
   int maxPaddingSize,
   ParquetProperties encodingProps,
   FileEncryptionProperties encryptionProperties) throws IOException {
+this(
+  file,
+  mode,
+  writeSupport,
+  compressionCodecName,
+  new CodecFactory(conf, encodingProps.getPageSizeThreshold()),
+  rowGroupSize,
+  validating,
+  conf,
+  maxPaddingSize,
+  encodingProps,
+  encryptionProperties);
+  }
+
+  ParquetWriter(
+OutputFile file,

Review Comment:
   It seems the indentation of constructor is 4 spaces elsewhere.



##
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetWriter.java:
##
@@ -321,17 +347,17 @@ public ParquetWriter(Path file, Configuration conf, 
WriteSupport writeSupport
   encodingProps.getPageWriteChecksumEnabled(), encryptionProperties);
 fileWriter.start();
 
-this.codecFactory = new CodecFactory(conf, 
encodingProps.getPageSizeThreshold());
+this.codecFactory = codecFactory;
 CompressionCodecFactory.BytesInputCompressor compressor = 
codecFactory.getCompressor(compressionCodecName);
 this.writer = new InternalParquetRecordWriter(
-fileWriter,
-writeSupport,
-schema,
-writeContext.getExtraMetaData(),
-rowGroupSize,
-compressor,
-validating,
-encodingProps);
+  fileWriter,

Review Comment:
   Could you please revert the irrelevant style change?



-- 
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: dev-unsubscr...@parquet.apache.org

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



[PR] PARQUET-2385: Allow user to specify CodecFactory for ParquetWriter [parquet-mr]

2023-11-24 Thread via GitHub


amousavigourabi opened a new pull request, #1203:
URL: https://github.com/apache/parquet-mr/pull/1203

   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [ ] My PR addresses the following [Parquet 
Jira](https://issues.apache.org/jira/browse/PARQUET/) issues and references 
them in the PR title. For example, "PARQUET-1234: My Parquet PR"
 - https://issues.apache.org/jira/browse/PARQUET-XXX
 - In case you are adding a dependency, check if the license complies with 
the [ASF 3rd Party License 
Policy](https://www.apache.org/legal/resolved.html#category-x).
   
   ### Tests
   
   - [ ] My PR adds the following unit tests __OR__ does not need testing for 
this extremely good reason:
   
   ### Commits
   
   - [ ] My commits all reference Jira issues in their subject lines. In 
addition, my commits follow the guidelines from "[How to write a good git 
commit message](http://chris.beams.io/posts/git-commit/)":
 1. Subject is separated from body by a blank line
 1. Subject is limited to 50 characters (not including Jira issue reference)
 1. Subject does not end with a period
 1. Subject uses the imperative mood ("add", not "adding")
 1. Body wraps at 72 characters
 1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [ ] In case of new functionality, my PR adds documentation that describes 
how to use it.
 - All the public functions and the classes in the PR contain Javadoc that 
explain what it does
   


-- 
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: dev-unsubscr...@parquet.apache.org

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