apache / apache/parquet-java

Better exception when files are unaccessible

Open
#1,422 5 comments 0 reactions 0 assignees View on GitHub
Component: Parquet Priority: Major Type: bug
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

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.
```
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)
```

**Reporter**: [Julien Le Dem](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=julienledem) / @julienledem

**Note**: *This issue was originally created as [PARQUET-20](https://issues.apache.org/jira/browse/PARQUET-20). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing parquet.hadoop.ParquetInputFormat.listStatus, getFooters, and getGlobalMetaData against the Hadoop FileSystem.globStatus and FileInputFormat.listStatus calls shown in the stack trace. Determine where inaccessible or moved files surface as NullPointerException, then verify that the resulting failure reports a useful error instead; the issue does not name a test file.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.