Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

NPE on seek #10

Closed
dankearns opened this issue Oct 13, 2014 · 4 comments
Closed

NPE on seek #10

dankearns opened this issue Oct 13, 2014 · 4 comments

Comments

@dankearns
Copy link

If the first call on an open s3a stream is to seek, the log statement chokes. This is one solution, but seems expensive vs just fixing the log statement?

--- a/src/main/java/org/apache/hadoop/fs/s3a/S3AInputStream.java
+++ b/src/main/java/org/apache/hadoop/fs/s3a/S3AInputStream.java
@@ -95,7 +95,7 @@ public class S3AInputStream extends FSInputStream {
     if (this.pos == pos) {
       return;
     }
-
+    openIfNeeded();
     LOG.info("Reopening " +  wrappedObject.getKey() + " to seek to new offset " + (pos - this.pos));
     reopen(pos);
   }
@thodemoor
Copy link

Hi Dan,

Good catch.

S3a is in the works of being merged into Apache Hadoop, see full source f.i. here trunk. This particular issue has been adressed but if you happen to find anything else it would be cool if you also report the issue on the Apache JIRA (dependent on https://issues.apache.org/jira/browse/HADOOP-10400).

@tarnfeld
Copy link

I opened a pull request with a fix for this a while back... #6

@dankearns
Copy link
Author

Are you not planning to maintain this repo for older hadoop versions?

@thodemoor
Copy link

That's up to Jordan (Aloisius) I guess. But hey this is github so you can always fork?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants