You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by GitBox <gi...@apache.org> on 2021/02/02 16:14:19 UTC

[GitHub] [parquet-mr] gszadovszky opened a new pull request #861: PARQUET-1970: Make minor releases source compatible

gszadovszky opened a new pull request #861:
URL: https://github.com/apache/parquet-mr/pull/861


   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.

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



[GitHub] [parquet-mr] ggershinsky commented on a change in pull request #861: PARQUET-1970: Make minor releases source compatible

Posted by GitBox <gi...@apache.org>.
ggershinsky commented on a change in pull request #861:
URL: https://github.com/apache/parquet-mr/pull/861#discussion_r569412617



##########
File path: parquet-common/src/main/java/org/apache/parquet/io/OutputFile.java
##########
@@ -31,5 +31,7 @@
 
   long defaultBlockSize();
 
-  String getPath();
+  default String getPath() {
+    throw new UnsupportedOperationException();

Review comment:
       We're consuming this function in one of the encryption options:
   https://github.com/apache/parquet-mr/blob/master/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetWriter.java#L284
   If there is no encryption, or encryption is used with a crypto factory that doesn't need the file path - this exception will break the existing callers. A simple way to resolve this is by catching the exception here, and passing a null file path. This allows for these callers to run ok. The crypto factories that do need the file path sometimes (like the one we have in parquet-mr) should check `path==null` in situations where the file path is used, and throw an exception there. What do you think?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [parquet-mr] gszadovszky merged pull request #861: PARQUET-1970: Make minor releases source compatible

Posted by GitBox <gi...@apache.org>.
gszadovszky merged pull request #861:
URL: https://github.com/apache/parquet-mr/pull/861


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [parquet-mr] gszadovszky commented on pull request #861: PARQUET-1970: Make minor releases source compatible

Posted by GitBox <gi...@apache.org>.
gszadovszky commented on pull request #861:
URL: https://github.com/apache/parquet-mr/pull/861#issuecomment-775766526


   @shangxinli, if you have time could you please review this? The release is blocked on this one.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [parquet-mr] gszadovszky commented on a change in pull request #861: PARQUET-1970: Make minor releases source compatible

Posted by GitBox <gi...@apache.org>.
gszadovszky commented on a change in pull request #861:
URL: https://github.com/apache/parquet-mr/pull/861#discussion_r569549668



##########
File path: parquet-common/src/main/java/org/apache/parquet/io/OutputFile.java
##########
@@ -31,5 +31,7 @@
 
   long defaultBlockSize();
 
-  String getPath();
+  default String getPath() {
+    throw new UnsupportedOperationException();

Review comment:
       I think, I've added them. Please review the latest commit.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [parquet-mr] ggershinsky commented on a change in pull request #861: PARQUET-1970: Make minor releases source compatible

Posted by GitBox <gi...@apache.org>.
ggershinsky commented on a change in pull request #861:
URL: https://github.com/apache/parquet-mr/pull/861#discussion_r569550247



##########
File path: parquet-common/src/main/java/org/apache/parquet/io/OutputFile.java
##########
@@ -31,5 +31,7 @@
 
   long defaultBlockSize();
 
-  String getPath();
+  default String getPath() {
+    throw new UnsupportedOperationException();

Review comment:
       Oh, this is already covered in the commit. Looks good! 




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [parquet-mr] ggershinsky commented on a change in pull request #861: PARQUET-1970: Make minor releases source compatible

Posted by GitBox <gi...@apache.org>.
ggershinsky commented on a change in pull request #861:
URL: https://github.com/apache/parquet-mr/pull/861#discussion_r569545424



##########
File path: parquet-common/src/main/java/org/apache/parquet/io/OutputFile.java
##########
@@ -31,5 +31,7 @@
 
   long defaultBlockSize();
 
-  String getPath();
+  default String getPath() {
+    throw new UnsupportedOperationException();

Review comment:
       Cool, thanks. I'll add then the null checks in the crypto-factory (key management).




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [parquet-mr] shangxinli commented on a change in pull request #861: PARQUET-1970: Make minor releases source compatible

Posted by GitBox <gi...@apache.org>.
shangxinli commented on a change in pull request #861:
URL: https://github.com/apache/parquet-mr/pull/861#discussion_r573157999



##########
File path: parquet-common/src/main/java/org/apache/parquet/io/OutputFile.java
##########
@@ -31,5 +31,7 @@
 
   long defaultBlockSize();
 
-  String getPath();
+  default String getPath() {
+    throw new UnsupportedOperationException();

Review comment:
       +1 for using null instead of through exception, which is expensive.  




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [parquet-mr] ggershinsky commented on a change in pull request #861: PARQUET-1970: Make minor releases source compatible

Posted by GitBox <gi...@apache.org>.
ggershinsky commented on a change in pull request #861:
URL: https://github.com/apache/parquet-mr/pull/861#discussion_r569550247



##########
File path: parquet-common/src/main/java/org/apache/parquet/io/OutputFile.java
##########
@@ -31,5 +31,7 @@
 
   long defaultBlockSize();
 
-  String getPath();
+  default String getPath() {
+    throw new UnsupportedOperationException();

Review comment:
       Yep, haven't synched on the latest PR state. The checks look good!




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [parquet-mr] gszadovszky commented on a change in pull request #861: PARQUET-1970: Make minor releases source compatible

Posted by GitBox <gi...@apache.org>.
gszadovszky commented on a change in pull request #861:
URL: https://github.com/apache/parquet-mr/pull/861#discussion_r569483186



##########
File path: parquet-common/src/main/java/org/apache/parquet/io/OutputFile.java
##########
@@ -31,5 +31,7 @@
 
   long defaultBlockSize();
 
-  String getPath();
+  default String getPath() {
+    throw new UnsupportedOperationException();

Review comment:
       It sounds good to me. I'll exchange the default implementation to return `null`.




----------------------------------------------------------------
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:
users@infra.apache.org