[ https://issues.apache.org/jira/browse/PARQUET-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14372983#comment-14372983 ]
Alex Levenson edited comment on PARQUET-20 at 3/21/15 8:07 PM: --------------------------------------------------------------- Hi A.Y, thanks for the contribution. We definitely want this exception to remain fatal, so wrapping it in a try { } catch { log } without re-throwing will actually change the behavior to make this error silently ignored instead of letting it propagate. Since this is a null pointer exception, hopefully we can just find the line of code that references a null pointer and instead change it to check for null, then throw a useful exception when it's null. If this NPE is coming from somewhere outside our control, then lets wrap the most narrow piece of code that we can in a try { } catch(NullPointerException e) { throw new ParquetRuntimeException("File not found...") } was (Author: alexlevenson): Hi A.Y, thanks for the contribution. We definitely want this exception to remain fatal, so wrapping it in a try { } catch { log } without re-throwing will actually change the behavior to make this error silently ignored instead of letting it propagate. Since this is a null pointer exception, hopefully we can just find the line of code that references a null pointer and instead change it to check for null, then throw a useful exception when it's null. If this NPE is coming from somewhere outside our control, then lets wrap the most narrow piece of code that we can in a try { } catch(NullPointerException e) { throw new ParquetRuntimeException("File not found...") } > Better exception when files are unaccessible > -------------------------------------------- > > Key: PARQUET-20 > URL: https://issues.apache.org/jira/browse/PARQUET-20 > Project: Parquet > Issue Type: Bug > Reporter: Julien Le Dem > Labels: newbie, pick-me-up > > In some cases the Hadoop filesystem API will throw NullPointerException when > trying to access files that have moved. > We'd want to catch those and give a better error message. > {noformat} > Caused by: java.lang.NullPointerException > at org.apache.hadoop.fs.FileSystem.globStatus(FileSystem.java:1043) > at > org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:211) > at > parquet.hadoop.ParquetInputFormat.listStatus(ParquetInputFormat.java:395) > at > parquet.hadoop.ParquetInputFormat.getFooters(ParquetInputFormat.java:443) > at > parquet.hadoop.ParquetInputFormat.getGlobalMetaData(ParquetInputFormat.java:467) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)