You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by "amousavigourabi (via GitHub)" <gi...@apache.org> on 2023/09/24 16:01:49 UTC

[GitHub] [parquet-mr] amousavigourabi commented on a diff in pull request #1141: PARQUET-2347: Add interface layer between Parquet and Hadoop Configuration

amousavigourabi commented on code in PR #1141:
URL: https://github.com/apache/parquet-mr/pull/1141#discussion_r1335207781


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/CodecFactory.java:
##########
@@ -246,9 +262,9 @@ protected CompressionCodec getCodec(CompressionCodecName codecName) {
         codecClass = Class.forName(codecClassName);
       } catch (ClassNotFoundException e) {
         // Try to load the class using the job classloader
-        codecClass = configuration.getClassLoader().loadClass(codecClassName);
+        codecClass = new Configuration(false).getClassLoader().loadClass(codecClassName);

Review Comment:
   Here, the code tries to load a Hadoop codec from its classloader. For this, the Hadoop classloader is needed. This is not available by just using getClassLoader() on any ParquetConfiguration.



-- 
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-unsubscribe@parquet.apache.org

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