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


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/util/HadoopOutputFile.java:
##########
@@ -54,11 +54,19 @@ private static boolean supportsBlockSize(FileSystem fs) {
   private final Configuration conf;
 
   public static HadoopOutputFile fromPath(Path path, Configuration conf)
-      throws IOException {
+    throws IOException {
     FileSystem fs = path.getFileSystem(conf);
     return new HadoopOutputFile(fs, fs.makeQualified(path), conf);
   }
 
+  public static HadoopOutputFile fromPathUnchecked(Path path, Configuration 
conf) {

Review Comment:
   As we cannot yet get rid of some methods without(!) throws using Hadoop's 
Path where we do want to transition to the InputFile/OutputFile interfaces in 
the background, this is a DRYer way to avoid try catching `IOExceptions` and 
converting them to `RuntimeExceptions` (to avoid adding incompatible throws 
clauses) all the time. As an added bonus, this also allows for concisely 
converting collections of Paths to HadoopOutputFiles/HadoopInputFiles using 
Java Stream HOFs such as map.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to