Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ public static Path getOuterFilePathFromInlinePath(Path inlineFSPath) {
* input: "inlinefs://file1/s3a/?start_offset=20&length=40".
* output: 20
*/
public static int startOffset(Path inlineFSPath) {
public static long startOffset(Path inlineFSPath) {
assertInlineFSPath(inlineFSPath);

String[] slices = inlineFSPath.toString().split("[?&=]");
return Integer.parseInt(slices[slices.length - 3]);
return Long.parseLong(slices[slices.length - 3]);
}

/**
Expand All @@ -108,11 +108,11 @@ public static int startOffset(Path inlineFSPath) {
* input: "inlinefs:/file1/s3a/?start_offset=20&length=40".
* output: 40
*/
public static int length(Path inlinePath) {
public static long length(Path inlinePath) {
assertInlineFSPath(inlinePath);

String[] slices = inlinePath.toString().split("[?&=]");
return Integer.parseInt(slices[slices.length - 1]);
return Long.parseLong(slices[slices.length - 1]);
}

private static void assertInlineFSPath(Path inlinePath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
*/
public class InLineFsDataInputStream extends FSDataInputStream {

private final int startOffset;
private final long startOffset;
private final FSDataInputStream outerStream;
private final int length;
private final long length;

public InLineFsDataInputStream(int startOffset, FSDataInputStream outerStream, int length) throws IOException {
public InLineFsDataInputStream(long startOffset, FSDataInputStream outerStream, long length) throws IOException {
super(outerStream.getWrappedStream());
this.startOffset = startOffset;
this.outerStream = outerStream;
Expand Down